{"id":3694,"date":"2014-06-09T21:15:00","date_gmt":"2014-06-09T19:15:00","guid":{"rendered":"http:\/\/www.karadere.com\/blog\/?p=3694"},"modified":"2014-06-09T21:15:00","modified_gmt":"2014-06-09T19:15:00","slug":"mscommlib_tlb-pas-delphi-xe-6","status":"publish","type":"post","link":"https:\/\/www.karadere.com\/blog\/mscommlib_tlb-pas-delphi-xe-6.html","title":{"rendered":"MSCommLib_TLB.pas Delphi, XE 6"},"content":{"rendered":"<p>http:\/\/code1.okbase.net\/codefile\/Unit1.pas_201211268773_2.htm<\/p>\n<p>http:\/\/www.ecsdn.com\/search.php?keyword=MSCommLib_TLB.pas<\/p>\n<p>http:\/\/support.microsoft.com\/kb\/194922\/tr<\/p>\n<p>&nbsp;<\/p>\n<h3 class=\"r\" style=\"color: #222222;\"><a style=\"color: #660099;\" href=\"http:\/\/read.pudn.com\/downloads144\/sourcecode\/delphi_control\/626962\/MSComm\/MSCommLib_TLB.pas__.htm\">MSComm<\/a>\u00a0kullan\u0131m\u0131<\/h3>\n<pre class=\"syntax csharp raw highlighted\" style=\"color: #000000;\">unit Unit1;\n\/\/Download by http:\/\/www.codefans.net\ninterface\n\nuses\n  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,\n  Dialogs, ExtCtrls, RzPanel, StdCtrls, RzCmboBx, RzButton, ComCtrls,\n  RzEdit, OleCtrls, MSCommLib_TLB;\n\ntype\n  TForm1 = class(TForm)\n    mscm1: TMSComm;\n    edt1: TRzRichEdit;\n    rzbtbtn1: TRzBitBtn;\n    cbb1: TRzComboBox;\n    rzpnl1: TRzPanel;\n    rzbtbtn2: TRzBitBtn;\n    rzbtbtn3: TRzBitBtn;\n    edt2: TEdit;\n    procedure mscm1Comm(Sender: TObject);\n    procedure rzbtbtn1Click(Sender: TObject);\n    procedure rzbtbtn2Click(Sender: TObject);\n    procedure rzbtbtn3Click(Sender: TObject);\n  private\n    { Private declarations }\n  public\n    { Public declarations }\n  end;\n\nvar\n  Form1: TForm1;\n\nimplementation\n\n{$R *.dfm}\n\nprocedure TForm1.mscm1Comm(Sender: TObject);\nvar\n  n  : Integer;\n  rx :Integer;\n  recstr : Variant;\n  t  : string;\n  i  : Integer;\n  tr : Integer;\n  strintext :string;\nbegin\n  recstr:= Copy(mscm1.Input,1,2);\n  strintext:= recstr ;\n  edt2.Text:=Trim(strintext);\n\/\/ if   mscm1.CommEvent =comEventBreak then\n\/\/ begin\n\/\/   edt1.Text:='PRINT';\n\/\/ end;\n  {\n  if mscm1.CommEvent =  ComEventRxParity then\n    tr:=1;\n  if   mscm1.CommEvent = 2 then\n  begin\n    n:=mscm1.InBufferCount;\n    inc(rx,n);\n    recstr :=mscm1.Input;\n    if mscm1.InputMode = 0 then\n    begin\n      t:='';\n      t:= recstr;\n      if t&lt;&gt;'' then\n      begin\n        for i:= 0 to n do\n        begin\n          if t[i]='?' then\n          begin\n             tr:=1\n          end\n          else\n           if (tr=0) then\n           begin\n             strintext:=strintext+' ' + IntToHex(Byte(t[i]),2)\n           end\n           else\n           begin\n             strintext:= strintext+' ' + IntToHex(Byte(t[i])+126,2)   ;\n             tr:=0;\n           end;\n        end;\n      end;\n    end;\n  end;  }\nend;\n\nprocedure TForm1.rzbtbtn1Click(Sender: TObject);\nbegin\n if mscm1.PortOpen then\n  begin\n    mscm1.PortOpen:=False;\n  end;\n  try\n    mscm1.CommPort:=1;\n    mscm1.Settings:='9600,N,8,1';\n    mscm1.InputLen:=0; \/\/ default 0\n    mscm1.RThreshold:=1;\n    mscm1.InputMode:=comInputModeText;\n    mscm1.InputLen:=0;\n    mscm1.PortOpen:=True;\n    except\n      mscm1.PortOpen:=False;\n      end;\n\/\/  end\nend;\n\nprocedure TForm1.rzbtbtn2Click(Sender: TObject);\nbegin\n  Application.Terminate;\nend;\n\nprocedure TForm1.rzbtbtn3Click(Sender: TObject);\nbegin\n if mscm1.PortOpen = True then\n mscm1.PortOpen := False;\nend;\n\nend.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/code1.okbase.net\/codefile\/Unit1.pas_201211268773_2.htm http:\/\/www.ecsdn.com\/search.php?keyword=MSCommLib_TLB.pas http:\/\/support.microsoft.com\/kb\/194922\/tr &nbsp; MSComm\u00a0kullan\u0131m\u0131 unit Unit1; \/\/Download by http:\/\/www.codefans.net interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, RzPanel, StdCtrls, RzCmboBx, RzButton, ComCtrls, RzEdit, OleCtrls, MSCommLib_TLB; type TForm1 = class(TForm) mscm1: TMSComm; edt1: TRzRichEdit; rzbtbtn1: TRzBitBtn; cbb1: TRzComboBox; rzpnl1: TRzPanel; rzbtbtn2: TRzBitBtn; rzbtbtn3: TRzBitBtn; edt2: TEdit; procedure mscm1Comm(Sender: TObject); procedure rzbtbtn1Click(Sender: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[6],"tags":[776,1512,2287],"class_list":["post-3694","post","type-post","status-publish","format-standard","hentry","category-bilisim-it-haber","tag-delphi","tag-mscommlib_tlb-pas","tag-xe-6","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"views":1799,"_links":{"self":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/3694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/comments?post=3694"}],"version-history":[{"count":0,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/3694\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/media?parent=3694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/categories?post=3694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/tags?post=3694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}