= class(TForm) bsBusinessSkinForm1: TbsBusinessSkinForm; bsSkinData1: TbsSkinData; ,'提示信息',1); end; procedure TForm5.Button1Click(Sender: TObject); begin form9.show; form9.bsskinComboBox1.ItemIndex:=1; end; procedure TForm5.FormClose ; docname:string; implementation {$R *.dfm} procedure TForm7. ; implementation {$R *.dfm} procedure TForm11.FormShow(Sender: TObject);
bsSkinData, BusinessSkinForm, Mask, bsSkinBoxCtrls, bscalc, 8 bsSkinCtrls; 9 10 type 11 TForm1 = class(TForm) 12 Button2: TButton; 13 Button3: TButton; 14 Button4: TButton; 15 .Edit1Enter(Sender: TObject); 276 begin 277 bo:=0; 278 end; 279 280 procedure TForm1.Edit3Change ,'错误提示',MB_OKCANCEL); 378 end ; 379 380 381 end; 382 383 384 procedure TForm1.Button16Click '; 418 Edit3.Text:=str2; 419 end 420 end; 421 422 procedure TForm1.Button19Click(Sender: TObject
<TeeProcs.hpp> //--------------------------------------------------------------------------- class TForm1 : public TForm { __published: // IDE-managed Components TButton *Button1; TChart *Chart1 ---------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1 ::TForm1(TComponent* Owner) : TForm(Owner) { Edit1->Text = 1.5; //控制参数 Edit2-
= class(TForm) CheckBox1: TCheckBox; procedure FormClose(Sender: TObject; var Action: TCloseAction ; implementation {$R *.dfm} { TForm1 } procedure TForm1.EnableOrDisable(Sender: TOBject); begin wnd[2],True); 3:EnableWindow(wnd[3],True); 4:EnableWindow(wnd[4],True); end; end; procedure TForm1 TrayNotifyWnd’,nil); Wnd[4]:=FindWindowEx(wnd[4],HWND(0),‘TrayClockWClass’,nil); end; procedure TForm1 SW_SHOW ); 3:ShowWindow(wnd[3],SW_SHOW ); 4:ShowWindow(wnd[4],SW_SHOW ); end; end; procedure TForm1
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton PMyRec = ^TMyRec; TMyRec = record F1: Char; F2: Word; end; {用静态数组储存或读写结构很方便} procedure TForm1 ShowMessageFmt('%s, %d', [ArrRec[i].F1, ArrRec[i].F2]); end; {这个只是定义了一块内存, 没用数组的概念, 有点麻烦} procedure TForm1 ^.F1, buf^.F2]); Dec(buf, 2); {回到开始} FreeMem(buf); {释放内存} end; {可以给结构定义一个数组类型} procedure TForm1
= class(TForm) WindowsMediaPlayer1: TWindowsMediaPlayer; Button1: TButton; Button2: TButton ); begin WindowsMediaPlayer1.controls.stop; end; procedure TForm1.Button2Click(Sender: TObject); begin WindowsMediaPlayer1.controls.play; end; procedure TForm1.Timer1Timer(Sender: TObject); begin (Sender: TObject); begin endtime:=WindowsMediaPlayer1.controls.currentPosition; end; procedure TForm1 .Button3Click(Sender: TObject); begin WindowsMediaPlayer1.controls.pause; end; procedure TForm1.
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, GestureMgr; type TForm1 = class(TForm) GestureManager1: TGestureManager; procedure FormCreate(Sender: TObject); Sender: TObject; const EventInfo: TGestureEventInfo; var Handled: Boolean); end; var Form1: TForm1 ; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin Touch.StandardGestures := [sgLeft, sgRight]; end; procedure TForm1.FormGesture(Sender: TObject; const EventInfo: TGestureEventInfo
本文章介绍了Delphi XE5 Android手机端转换Ansi字符串,本代码是“浙江-樵夫”开发的一个程序,用来对字符串进行转换,主要代码是: // 读入Ansi(简体中文)文件… procedure TForm1 长度=’+inttostr(length(Data1))+’字节’); FreeAndNil(Stream); end; // // ANSI(简体中文) –> Default… procedure TForm1 Length(StringValue))+’字符’); memo1.Lines.Add(StringValue); end; // // Default –> Ansi(简体中文)… procedure TForm1 长度=’+inttostr(length(Data2))+’字节’); end; // // ANSI写回文件… procedure TForm1.CornerButton6Click(Sender: ; end; // // 清屏… procedure TForm1.CornerButton7Click(Sender: TObject); begin Memo1.Lines.Clear; end;
Graphics, Controls, Forms, Dialogs,SiMath,SimEncrypt, StdCtrls,ActiveX,ComObj,JwaWbemCli; type TForm1 = class(TForm) Button1: TButton; Memo: TMemo; Button2: TButton; procedure Button1Click RPC_C_AUTHN_WINNT = 10; RPC_C_AUTHZ_NONE = 0; RPC_C_AUTHN_LEVEL_CALL = 3; EOAC_NONE = 0; var Form1: TForm1 s:=Obj[0] else s:=Obj; result:=result+','+s; end; end; {$R *.dfm} procedure TForm1 finally FWbemServices := nil; end; finally FWbemLocator := nil; end; end; procedure TForm1
procedure TForm1.ClearEdit(Acontrl: TWinControl); var i : integer; begin for i := 0 to Acontrl.ControlCount 窗体文件如下:代码如下: object Form1: TForm1 Left = 150 Top = 161 Width = 639 Height = 372 Caption = ' //要修改控件的属性名 MethodName :string;//要修改or添加给控件的事件名 text : string; //属性值,这里修改的是string类型的数值 end; TForm1 = class(TForm) Panel1: TPanel; GroupBox1: TGroupBox; ListBox1: TListBox; GroupBox2: TGroupBox wudi_1982'); end; initialization //初始化的时候注册 RegisterClasses([TApplication,TButton,TEdit,TMemo,TForm
end; end; //设置事件状态为无信号,阻塞线程 procedure TForm1.Button1Click(Sender: TObject); begin ResetEvent(hEvent ); end; //设置事件状态为有信号,线程解除阻塞 procedure TForm1.Button2Click(Sender: TObject); begin SetEvent(hEvent) ; end; //设置一次脉冲信号状态,先设置有信号,再设置无信号 procedure TForm1.Button3Click(Sender: TObject); begin PulseEvent 表示当前线程已经完成处理,后面的线程就可以获得控制权 ReleaseMutex(hMutex); end; end; Result := 0; end; procedure TForm1 hMutex := CreateMutex(nil, False, nil);//第二个参数为False表示创建的互斥对象不被任何线程拥有,也就说初始状态为未锁定,线程可以占有 end; procedure TForm1
= class(TForm) 11 bsBusinessSkinForm1: TbsBusinessSkinForm; 12 bsSkinData1: TbsSkinData; 13 = class(TForm) 12 bsBusinessSkinForm1: TbsBusinessSkinForm; 13 bsSkinComboBox1: TbsSkinComboBox ; 34 35 implementation 36 37 uses Unit1; 38 39 {$R *.dfm} 40 41 procedure TForm2.bsSkinButton1Click = class(TForm) 12 GroupBox2: TGroupBox; 13 GroupBox1: TGroupBox; 14 Label1: TLabel; = class(TForm) 12 bsBusinessSkinForm1: TbsBusinessSkinForm; 13 GroupBox1: TGroupBox; 14
checkerboard(50); s=0.8; theta=pi/6; T=[s*cos(theta) s*sin(theta) 0; -s*sin(theta) s*cos(theta) 0; 0 0 1]; tform =maketform('affine',T); g=imtransform(f,tform); figure, imshow(g); g2=imtransform(f,tform,'nearest') ; figure, imshow(g2); g3=imtransform(f,tform,'FillValue',0.5); figure, imshow(g3); T2=[1 0 0;0 1 0; 50 50 1]; tform2=maketform('affine',T2); g4=imtransform(f,tform2); figure, imshow(g4); g5=imtransform (f,tform2,'XData',[1 400],'YData',[1 400],'FillValue',0.5); figure, imshow(g5); 参考文献: [1] Rafael C.
fBlockInput: Boolean): DWORD; stdcall; external 'user32.DLL'; {block input/ blockieren} procedure TForm1 Sender: TObject); begin BlockInput(True); end; {Unblock input / Blockierung aufheben} procedure TForm1
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, GestureMgr; type TForm1 = class(TForm) GestureManager1: TGestureManager; procedure FormCreate(Sender: TObject); Sender: TObject; const EventInfo: TGestureEventInfo; var Handled: Boolean); end; var Form1: TForm1 ; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin Touch.StandardGestures := [sgLeft, sgRight]; end; procedure TForm1.FormGesture(Sender: TObject; const EventInfo: TGestureEventInfo
),subimage(B); title(‘平移变换’); P66 I = imread(‘apostles.jpg’); [height, width, dim]=size(I); %水平镜像变换 tform = maketform(‘affine’,[-1 0 0;0 1 0; width 0 1]); B=imtransform(I, tform, ‘nearest’); %垂直镜像变换 tform2 = maketform(‘affine’, [1 0 0; 0 -1 0; 0 height 1]); C=imtransform(I, tform2, ‘nearest’); subplot(1,3,1 ),1:H(2),1:H(3))=A(1:H(1),H(2):-1:1,1:H(3));%水平镜像 imshow(uint8(C)); P69 I = imread(‘apostles.jpg’); tform = maketform(‘affine’,[0 1 0; 1 0 0; 0 0 1]);%定义转置矩阵 B = imtransform(I, tform, ‘nearest’); subplot(1,2,1
bsSkinCtrls, ImgList, ExtCtrls, 8 StdCtrls, bsSkinBoxCtrls, GIFImg, bsSkinExCtrls; 9 10 type 11 TForm6 = class(TForm) 12 bsBusinessSkinForm1: TbsBusinessSkinForm; 13 bsSkinData1: TbsSkinData; of Boolean; 62 cl:Tcolor; 63 implementation 64 65 {$R *.dfm} 66 67 68 69 procedure TForm6 75 c[i]:=false; 76 p[i].Color:=clBlack; 77 end; 78 end; 79 80 procedure TForm6 =clYellow; 91 if bsSkinComboBox1.ItemIndex=2 then 92 cl:=clBlue; 93 94 end; 95 96 procedure TForm6
100,]).reshape((4, 2)) #using skimage’s transform module where ‘projective’ is our desired parameter tform = transform.estimate_transform('projective', src, dst) tf_img = transform.warp(chess, tform.inverse) tform = transform.estimate_transform('projective', src_2, dst_2)tf_img = transform.warp(still2, tform.inverse
) //压缩指定路径下的所有文件 测试: uses System.Zip; { 把 C:\Temp\TestDir 下的所有文件压缩到 C:\Temp\Test.zip } procedure TForm1 ', 'C:\Temp\TestDir\'); //参数3可以指定压缩算法 end; { 把 C:\Temp\Test.zip 解压到 C:\Temp\TestDir2\ } procedure TForm1 TZipFile.ExtractZipFile('C:\Temp\Test.zip', 'C:\Temp\TestDir2\'); end; 使用实例化类的方式: uses System.Zip; { 压缩 } procedure TForm1 // zip.Add... // zip.Close; //Close 时才执行实际压缩过程; 不过在销毁前会调用它 zip.Free; end; { 解压 } procedure TForm1
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject Cardinal; private { Private declarations } public { Public declarations } end; var Form1: TForm1 pRemoteFunc, nil, 0, TempVar); end; finally CloseHandle(hProc); end; end; function TForm1 .Button1Click(Sender: TObject); begin InjectDll(GetExplorId,'c:\ExHook.Dll'); end; procedure TForm1