Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Delphi Thread

Ö÷´°Ìå:
Delphi(Pascal) code:

procedure TfrmMain.btnResumeClick(Sender: TObject);
begin
myThread := TClientThread.Create(LeftPart(cbbServer.Text, ':'), StrToInt(RightPart(cbbServer.Text, ':')));
myThread.Resume;
mmoLog.Lines.Add('Ïß³ÌÒѼ¤»î');
end;

procedure TfrmMain.btnSuspendClick(Sender: TObject);
begin
if myThread = nil then
begin
ShowMessage('Ïß³Ìδ´´½¨!');
Exit;
end;
myThread.Suspend;
mmoLog.Lines.Add('Ïß³ÌÒÑ¹ÒÆð');
end;

procedure TfrmMain.btnStopClick(Sender: TObject);
begin
if myThread = nil then
begin
ShowMessage('Ïß³Ìδ´´½¨!');
Exit;
end;
myThread.Terminate;
myThread.WaitFor;
mmoLog.Lines.Add('Ïß³ÌÒÑÍ£Ö¹');
end;



Ï̵߳¥Ôª:
Delphi(Pascal) code:

unit uClientThread;

interface

uses
Windows, Classes, SysUtils, IdTCPClient, uString, Main, uCommon, Messages, Dialogs;

const
CM_DIAL = WM_USER + $100;
CM_HUNGUP = WM_USER + $101;

type
TClientThread = class(TThread)
private
FClient: TIdTCPClient;
FRequest: TStrings;
FResponse: TStrings;
FNotifyHandle: HWND;
// FPioneerCtrl: HWND;

procedure DoDial;
procedure DoDrop;
procedure DoUpload;
procedure DoSave;
protected
procedur


Ïà¹ØÎÊ´ð£º

DELPHIÕâÖÖÇé¿öÔõô°ì£¿ - Delphi / Windows SDK/API

¾ÍÊÇÒ»¸ö·þÎñ¶ËºÍÒ»¸ö¿Í»§¶Ë£¬Àï±ßÓÐһЩ¹²Óõ¥Ôª £¬ÎÒÔÚ ¹¤³ÌµÄSEARCH PATHÀïÉèÖõÄ·¾¶£¬
Àï±ßÓиö½á¹¹Ì壬ÎÒÔÚ·þÎñ¶Ë´ò¿ª£¬¼ÓÁ˳ÉÔ±£¬µ«ÊÇÎÒÔÚ¿Í»§¶ËÆäËûµ¥Ôª·ÃÎʲ»µ½ÎÒмӵģ¬ÎÒÔÚ¿Í»§¶Ë´ò¿ªÄǸöµ¥Ôª£¬È·Êµ¼ÓÁ ......

Õâ¸öSQLÓï¾äÓÐʲôÎÊÌâ? - Delphi / ·Ç¼¼ÊõÇø

select * from shuju.DB where ¿ªÅ̼Û-ÊÕÅ̼Û<=0.02
¿ªÅÌ¼Û ÓëÊÕÅÌ¼Û ÊÇÊý¾Ý¿âÀïµÄ×Ö¶Î
select * from aTableName where ((¿ªÅ̼Û-ÊÕÅ̼Û) <=0.02 )

¿ªÅ̼۱ÈÊÕÅ̼۵ÍÁ½·ÖÒÔϵÄÇé¿ö

Mark!!!!!!

se ......

xml´´½¨ºóÈçºÎÏú»Ù? - Delphi / ÍøÂçͨÐÅ/·Ö²¼Ê½¿ª·¢

xml := CreateOleObject('Microsoft.XMLHTTP');
  xml.Open('GET','http://www.google.com', False);
  xml.Send;
  xml.responseText;
ʹÓÃxml.responseText¿ÉÒÔ»ñÈ¡ÍøÒ³Ô´Âë,µ«ÊÇÔÙ´Î ......

ÎÊ2¸ödelphiµÄСÎÊÌâ

listboxµÄOndrawltemʼþÔÚʲôÇé¿öÏ´¥·¢£¿
var
thepchar:array[0..79] of char;
thestring:string;
begin
...
strpcopy(thepchar,thestring);
longint(@thepchar);
......
end;
ÎÒÏëÎÊ
strpcopy(thepch ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ