摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, DB, ADODB;type PNodeInfoEx = ^TNodeInfoEx; TNodeInfoEx = Packed Record NodeID : Integer; ParentID : Integer; NodeType : Integer; ChnNodeTitle ... 阅读全文
posted @ 2013-10-19 11:38 无悔的勇气 阅读(220) 评论(0) 推荐(0) 编辑
摘要: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, Grids; type TForm1 = class(TForm) Button1: TButton; Edit1: TEdit; procedure Button1Click(Sender: TObject); private protected { Private declarations... 阅读全文
posted @ 2013-10-19 11:37 无悔的勇气 阅读(503) 评论(0) 推荐(0) 编辑
摘要: TStrings是一个抽象类,在实际开发中,是除了基本类型外,应用得最多的。TStringList 常用方法与属性:var List: TStringList; i: Integer;begin List := TStringList.Create; List.Add('Strings1'); {添加} List.Add('Strings2'); List.Exchange(0,1); {置换} List.Insert(0,'Strings3'); {插入} i := List.IndexOf('Strings1'); {... 阅读全文
posted @ 2013-10-19 11:35 无悔的勇气 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 找到Delphi XE5的安装根目录 .... \Program Files (x86)\Embarcadero\RAD Studio\12.0\bin下的cglm.ini文件,打开cglm.ini文件[Embarcadero License Management]RootDir=${MODULE_DIR}\..LicenseDir=${ROOTDIR}\LicenseInfoDir=${COMMON_APPDATA}\Embarcadero\.licensesSlipDir=${COMMON_APPDATA}\Embarcadero\RegExe=bdsreg.exeLockType=5[E 阅读全文
posted @ 2013-10-19 11:35 无悔的勇气 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 建立一个webservices stand-alone vcl application 作为手机访问的服务端1、new->other->webservices2、选择stand-alone vcl application3、这里使用 默认端口80804、选择创建接口5、给服务起个名字6、点ok后保存工程,保存为目录如下:7、至此为止,什么代码都不写,点击运行,我们看到8、启动并点击 open browser按钮在浏览器里看到一个web服务就创建完成了。================================================================== 阅读全文
posted @ 2013-10-19 11:16 无悔的勇气 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 其实都可以通过intent和URI调用系统功能.Windows程序员可以理解成是ShellExecute.这个是万金油.可以有调用各种功能.后面会介绍.1.短信息.很简单方法a.不使用Intent而是直接发短信. smsManager对应的Delphi代码应该是:uses Androidapi.JNI.JavaTypes,Androidapi.JNI.Telephony;var j: JSmsManager;begin j := tjsmsmanager.Create; j.sendTextMessage(stringtojstring('137114553XX'), nil, 阅读全文
posted @ 2013-10-19 11:15 无悔的勇气 阅读(300) 评论(0) 推荐(0) 编辑
摘要: This is the only code that changes between the first and second code snippets: dlg.ShowModal(procedure(ModalResult: TModalResult) begin if ModalResult = mrOK then // if OK was pressed and an item is selected, pick it if dlg.ListBox1.ItemIndex >= 0 then edit1.Text := dlg.List... 阅读全文
posted @ 2013-10-19 11:15 无悔的勇气 阅读(811) 评论(0) 推荐(0) 编辑
摘要: 用以下代码中的接口实现控制蓝牙的开、关及详细信息unit Androidapi.JNI.BluetoothAdapter;// (c) RedTitan Technology 2013// JNI BLUETOOTH import demo// Note - REQUIRES - PROJECT OPTIONS - USES PERMISSIONS - BLUETOOTHinterfaceusesAndroidapi.JNIBridge,Androidapi.JNI.JavaTypes, Classes;type/////////////////////////// BluetoothDevi 阅读全文
posted @ 2013-10-19 11:11 无悔的勇气 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 本篇文章我们来看一下delphi xe5 在android程序里怎样启动照相机并获取所拍的照片,本代码取自xe自带打sample,路径为:C:\Users\Public\Documents\RAD Studio\12.0\Samples\MobileCodeSnippets\AccessCameraApp1、前两步骤新建firemonkey mobile application 然后 选择blank application2、界面摆放如下: toolbar 、image 、actionlist2、右键点击new standard action然后选择 TakePhotoFromCameraAc 阅读全文
posted @ 2013-10-19 11:10 无悔的勇气 阅读(341) 评论(0) 推荐(0) 编辑
摘要: C:\Users\Public\Documents\RAD Studio\12.0\Samples\FireMonkeyMobile例子中的绑定方式如下图:1、拖拽一个listview到界面上,然后用绑定向导2、选择listview3、选择tprototypebindsource4、点击增加5、选择前九个类型6、在绑定设计界面将 colorname1 拖拽至 item.text 就完成了帮点显示颜色名称了如图7、imagelist 如图:选择listview的itemapperance属性为 imagelistitem然后在绑定向导里 将contactbitmap1 拖拽至 itm.bitma 阅读全文
posted @ 2013-10-19 11:04 无悔的勇气 阅读(240) 评论(0) 推荐(0) 编辑
摘要: procedure SetBack(const AAction : JString); //后台运行。。varIntent: JIntent;beginIntent:= TJIntent.JavaClass.init(AAction);intent.addCategory(TJIntent.JavaClass.CATEGORY_HOME);Intent.setFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK);SharedActivityContext.startActivity(Intent);end;调用SetBack(TJIntent.Jav 阅读全文
posted @ 2013-10-19 11:03 无悔的勇气 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 手机号不是存在SIM卡上的,SIM卡只有一个串号.在运营商的服务器上有手机号和序号对应的一张表.所以你SIM卡办理遗失,运营商只要把新SIM卡的串号和你原来的手机号绑定即可.获取手机号的唯一办法是收个短信,短信里面有你的手机号码.所以很多程序为了获取手机号会要求你注册时发短信,然后它给你回个短信.usesAndroidapi.JNI.GraphicsContentViewText, Androidapi.JNIBridge,Androidapi.JNI.Telephony, Androidapi.JNI.JavaTypes, FMX.Helpers.Android;varTelephonyMa 阅读全文
posted @ 2013-10-19 11:02 无悔的勇气 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 其实都可以通过intent和URI调用系统功能.Windows程序员可以理解成是ShellExecute.这个是万金油.可以有调用各种功能.后面会介绍.1.短信息.很简单方法a.不使用Intent而是直接发短信.smsManager对应的Delphi代码应该是:usesAndroidapi.JNI.JavaTypes,Androidapi.JNI.Telephony;varj: JSmsManager;beginj := tjsmsmanager.Create;j.sendTextMessage(stringtojstring('137114553XX'), nil, stri 阅读全文
posted @ 2013-10-19 11:01 无悔的勇气 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 在VCL中,关闭程序的主窗体也就意味着程序的主循环结束,主程序自然而然结束。所以在主窗体中使用窗体的关闭函数(Close)即可,如下:procedure TfrmMain.btncloseClick(Sender: TObject);begin Close;end;在FMX中,由Activity替代了Form的概念,虽然TForm类仍然存在,但MainForm通过关闭函数无法结束程序,使用Application.Terminate均无效,调整为:uses FMX.Platform.Android;procedure TForm2.SpeedButton1Click(Sender: TObjec 阅读全文
posted @ 2013-10-19 10:56 无悔的勇气 阅读(370) 评论(0) 推荐(0) 编辑