Author Topic: automatically select device com port  (Read 1328 times)

weggin

  • Newbie
  • *
  • Posts: 8
    • View Profile
automatically select device com port
« on: June 17, 2010, 02:10:26 pm »
Hi Roman:
   in Windows Device Manager, my phone device is connected with USB and be assigned to com10.
How could i add the auto select settings below when the GSM program start working initially?

__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{ //add the code about selecting device com port automatically
  ...
}
It could automatically be assigned to com10 in the "nrDeviceBox1Change" without me selecting manually.

Best Regard,
weggin

« Last Edit: June 18, 2010, 02:53:20 am by weggin »

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: automatically select device com port
« Reply #1 on: June 18, 2010, 08:23:44 am »
Hello

You can try something like this:

nrComm1.ComPortNo = 10;

Roman Novgorodov
DeepSoftware.Com
« Last Edit: June 18, 2010, 08:29:36 am by Roman Novgorodov »
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.