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

Delphi spcomm ¿Ø¼þ - Delphi / ÍøÂçͨÐÅ/·Ö²¼Ê½¿ª·¢

´óÏÀÃÇ°ï濴һϣ¬ÓÃspcomm¿Ø¼þ½øÐд®¿ÚͨÐÅ¡£
·¢ËÍÊý¾Ý£º
procedure TForm1.Button2Click(Sender: TObject);
var
 strPressure:string;
begin
 
 strPressure:='SEND'+#13;
 comm1.WriteCommData(pchar(strPressure),Length(strPressure));
end; 

½ÓÊÕÊý¾Ý£º
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
  BufferLength: Word);
var
 RecvBuf:string;
 strPressure:string;
 str:string;
begin
 Setlength(RecvBuf,BufferLength);
 move(buffer^,pchar(recvbuf)^,bufferlength);
 strPressure:=recvbuf;
 strPressure:=MidStr(strPressure,7,bufferlength-6);
 strPressure:=LeftStr(strPressure,bufferlength-10);
 str:='ѹǿÊÇ£º'+strPressure;
 memo1.Lines.Add(str);
end 
end;
¸øÆøѹ´«¸ÐÆ÷ͨÐÅ£¬µ«ÊÇTForm1.Comm1ReceiveData´Ëʼþ¾ÍûÓд¥·¢¹ý£¬ÎªºÎѽ?
Õ⼸ÌìÕâ¸öÎÊÌâºÃ¶à¡£¡£¡£

°ÑÄãµÄSpComm¿Ø¼þÊôÐÔÒ³ÀËùÓÐTrueµÄµØ·½¶¼¸ÄΪFalseÔÙÊÔ¡£


ÊDz»ÊÇ這個ÃüÁî無Ч°¡

(Ц°ÔÍõ) :

ÄÜÏêϸ½²½âÉèÖÃfalseÄǼ¸¸öÊôÐÔµÄ×÷ÓÃÂð£¿

ÄãÓ¦¸Ãµ½ÍøÉÏÈ¥Ê×ÏÈÑо¿Ò»Ï£¬Õ⼸¸öÊôÐÔµÄ×÷Óã¬ÄãÕâÑù±à³ÌÐò£¬¿Ï¶¨±à²»ºÃ


Ïà¹ØÎÊ´ð£º

delphi ±¾µØ×°ÔØÇý¶¯ - Delphi / Windows SDK/API

delphi ÊÖ¶¯×°ÔØÇý¶¯ÎļþÌáʾ£º
RROR (1058): The driver is marked as disabled (Start=4) in its service database entry.
ÊDz»ÊÇÕâ¸öÇý¶¯±ØÐèÒªÓÃINFÀ´°²×°¡£¡£ÓÃ×Ô´øµÄINFÀ´×°ÊÇÕý³£µÄ¡£ÓÃÊÖ¶¯×°ÔؾÍÌáʾÈçÉÏ¡ ......

DelphiµÄÓï·¨ÎÊÌâ - Delphi / ÓïÑÔ»ù´¡/Ëã·¨/ϵͳÉè¼Æ

Àý×Ó³ÌÐò¼û¸½¼þ£¬ÓÃDelphi 7½øÐбàÒë
ÎÊÌâ´úÂëΪ 
Delphi(Pascal) code:
if Node.ChildNodes <> nil then
begin
for i := 0 to Node.ChildNodes.Count - 1 do
begin
cNode := N ......

sqlÓï¾ä´íÎó - Delphi / Êý¾Ý¿âÏà¹Ø

¶¨Òå±äÁ¿s,sqlΪstringÀàÐÍ£¬sΪº¯Êý²ÎÊý£¬sql£º='select field1 from table1 where'+s;ÔËÐÐʱs¸³ÖµÎªid>7»òÕßid<7¡¢id=7,µ«ÊÇÔËÐÐʱ×ÜÊdzö´í£¬Çë¸÷λ°ïÎÒ¸Ä´í£¬¶àл£¡

showMessage(sql)Ï¿´¿´
sql£º='sel ......

DelphiÒì³£ - Delphi / ·Ç¼¼ÊõÇø

³ÌÐò¹Ø±ÕµÄʱºò³öÏÖÒì³££º
exception EAccessviolation in moudule JGJC.exe at C08BB35B Access wiolation at address C08BC35B.Read of address C08BC35B.
ÇëÎÊÒ»ÏÂÕâÊÇʲôÒâ˼°¡£¿
·ÃÎÊÔ½½ç
ÊÇ·ñ·ÃÎÊÁËÒѱ»Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ