Delphi UÅ̲åÈ벦³ö¼ì²â
Delphi UÅ̲åÈ벦³ö¼ì²â£º
1¡¢Ð½¨¹¤³Ì£»
2¡¢ÔÚform1ÉÏ·ÅÒ»¸öLabel£»
3¡¢¶¨ÒåÒ»¸ö˽Óйý³Ì
procedure WMDeviceChange(var Msg: TMessage); message WM_DEVICECHANGE;
ÍêÕû´úÂëÈçÏ£º
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, AppEvnts, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
private
{ Private declarations }
procedure WMDeviceChange(var Msg: TMessage); message WM_DEVICECHANGE;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.WMDeviceChange (var Msg: TMessage);
var
myMsg : String;
begin
Case Msg.WParam of
32768:
begin
myMsg :='UÅ̲åÈë';
Label1.Caption:=myMsg
end;
32772:
begin
myMsg :='UÅ̰γö';
Label1.Caption:=myMsg;
end;
end;
end;
end.
Ïà¹ØÎĵµ£º
procedure frmMain.CLS; //Ö÷´°Ìå×Ô¶¨ÒåʼþCLS
var i:integer;
begin
for i:=0 to panel5.ControlCount -1 do
begin
if panel5.Controls[i] is TEdit then //Edit×é¼þ
begin
((panel5.Contro ......
ÔÚWIN32ÖеĴ®¿ÚͨѶ£¨Delphi£©
ÓÉÔÚWIN32²Ù×÷ϵͳÖнûÖ¹Ó¦ÓóÌÐòÏóDOSÖÐÄÇÑùÖ±½Ó·ÃÎʼÆËã»úÓ²¼þ£¬Òò´Ë£¬ÎÞ·¨ÏóÒÔǰÄÇÑù²ÉÓÃÖж϶Áд´®¿Ú¡£µ«ÊÇÔÚWIN32ÖÐÎÒÃǿɷ¢²ÉÓÃÁ½ÖÖ·½·¨·ÃÎÊ´®¿Ú£º1¡¢Ê¹ÓÃVBÖеÄMSCOMM´®¿Ú¿Ø¼þ£»2¡¢²ÉÓÃAPIº¯Êý£¬±¾ÎÄÖ÷Òª½éÉܲÉÓÃAPIº¯ÊýʵÏÖ´®¿ÚͨѶ¡£
ÓÉÓÚWM_COMMNOTIFYÏûÏ¢Òѱ»È¡Ïû£¬¹Ê±¾ÎÄ×Ô¶ ......
²Î¿¼×ÊÁÏ
“dz̸Object PascalµÄÖ¸Õë”
“Delphi Ö¸ÕëÈëÃÅ”
»ù±¾ÖªÊ¶
Ö¸Õë
Ö¸ÕëÊÇÒ»¸öÌØÊâµÄ±äÁ¿£¬ËüÀïÃæ´æ´¢µÄÊýÖµ±»½âÊͳÉΪÄÚ´æÀïµÄÒ»¸öµØÖ·¡£
×¢Ò⣺
£¨1£©¡¢Ö¸Õë¶ÔÓ¦×ÅÒ»¸öÊý¾ÝÔÚÄÚ´æÖеĵØÖ·£¬µÃµ½ÁËÖ¸Õë¾Í¿ÉÒÔ×ÔÓɵØÐ޸ĸÃÊý¾Ý¡£
£¨2£©¡¢Ò»¸öÖ¸Õë±äÁ¿½ö½öÊÇ´æ´¢Ò ......
Delphi TStream Ïêϸ½éÉÜ
Stream¶ÔÏó£¬ÓÖ³ÆÁ÷ʽ¶ÔÏó£¬ÊÇTStream¡¢THandleStream¡¢TFileStream¡¢TMemoryStream¡¢TResourceStreamºÍTBlobStreamµÈµÄͳ³Æ¡£ËüÃÇ·Ö±ð´ú±íÁËÔÚ¸÷ÖÖý½éÉÏ´æ´¢Êý¾ÝµÄÄÜÁ¦£¬ËüÃǽ«¸÷ÖÖÊý¾ÝÀàÐÍ(°üÀ¨¶ÔÏóºÍ²¿¼þ)
ÔÚÄÚ´æ¡¢Íâ´æºÍÊý¾Ý¿â×Ö¶ÎÖеĹÜÀí²Ù×÷³éÏóΪ¶ÔÏó·½·¨£¬²¢ÇÒ³ä·ÖÀûÓÃÁËÃæÏò¶Ô ......
procedure TForm1.Button2Click(Sender: TObject);
var
name:String ;
begin
name := edit2.Text ;
name := '%' + name ;
query1.Close ;
query1.SQL.Clear ;
query1.SQL.Add('select * from gjh_t where name like '''+name+'''') ;
&nb ......