archive-com.com » COM » E » EFG2.COM

Total: 878

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • function IsOpen Boolean procedure SetBaud BaudToSet LongInt procedure SetPort PortToSet Integer procedure SetRtsOn OnOff boolean procedure SetDtrOn OnOff boolean function GetInCount LongInt function GetOutCount LongInt protected Protected declarations public Public declarations constructor Create AOwner TComponent override destructor Destroy override function Open Boolean function WriteByte ch byte boolean function WriteData var data size integer boolean function ReadByte byte function ReadData var data size integer integer procedure Flush procedure Close published Published declarations property Port Integer read FPort write SetPort property Baud LongInt read FBaud write SetBaud property InCount LongInt read GetInCount number of characters received property OutCount LongInt read GetOutCount number of characters pending on transmit property Active Boolean read IsOpen is port open property RtsOn Boolean read FRtsOn write SetRtsOn property DtrOn Boolean read FDtrOn write SetDtrOn end procedure Register function MsecTime longint procedure Delay msec longint implementation Register the component with the Delphi IDE procedure Register begin RegisterComponents SUP TComm end function MsecTime longint var Present TDateTime Hour Min Sec MSec Word begin Present Now DecodeTime Present Hour Min Sec MSec Result Hour 60 Min 60 Sec 1000 MSec end procedure Delay msec longint var nTimeOut longint begin nTimeOut MsecTime msec while MsecTime INVALID HANDLE VALUE end Set the baud rate property procedure TComm SetBaud BaudToSet LongInt begin if BaudToSet FPort then begin FPort PortToSet if port was open then close and reopen it if IsOpen then begin Close Open end end end procedure TComm SetRtsOn OnOff boolean begin FRtsOn OnOff if IsOpen then begin if OnOff then EscapeCommFunction FHandle SETRTS else EscapeCommFunction FHandle CLRRTS end end procedure TComm SetDtrOn OnOff boolean begin FDtrOn OnOff if IsOpen then begin if OnOff then EscapeCommFunction FHandle SETDTR else EscapeCommFunction FHandle CLRDTR end end Opens the COM port returns True if ok function TComm Open Boolean var sCom String dcbPort TDCB device

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/1104b.txt (2016-02-14)
    Open archived version from archive



  • TransmitSingleChar theChar Char procedure TransmitString theString String function ReadCommPort Integer end implementation function TCommDemoObject OpenCommPort whichPort String Boolean begin undo comm port if open if commPortOpen then CloseCommPort set flag state commPortOpen false open COMM port use COM1 COM2 COM3 and COM4 to choose which port to open commPortHandle CreateFile PChar whichPort GENERIC READ OR GENERIC WRITE 0 nil OPEN EXISTING 0 0 commPortHandle CreateFile COM1 GENERIC READ OR GENERIC WRITE 0 nil OPEN EXISTING 0 0 exit on failure if commPortHandle INVALID HANDLE VALUE then begin Result false exit end get comm port state errorFlag GetCommState commPortHandle dcbInfo bail on failure if NOT errorFlag then begin CloseHandle commPortHandle Result false exit end setup COMM port settings dcbInfo BaudRate 9600 dcbInfo ByteSize 8 dcbInfo Parity NOPARITY dcbInfo StopBits ONESTOPBIT set COMM port state errorFlag SetCommState commPortHandle dcbInfo bail on failure if NOT errorFlag then begin CloseHandle commPortHandle Result false exit end show opened port ShowMessage Opened Comm Port whichPort set flag commPortOpen true set flag Result true end procedure TCommDemoObject CloseCommPort begin close comm port handle CloseHandle commPortHandle end procedure TCommDemoObject TransmitSingleChar theChar Char label CHECKSTATUS begin you can use escape function to manually raise lower DTR EscapeCommFunction commPortHandle SETDTR

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0521b.txt (2016-02-14)
    Open archived version from archive


  • the usual values or get an error Any ideas It all depends on how you are accessing the COM port If dealng with the API and not a wrapper you can get a handle to a COM port like so PortHandle CreateFile COM1 GENERIC READ or GENERIC WRITE 0 nil OPEN EXISTING 0 0 To fill out basic COM device infomation GetCommProperties PortHandle ComProp To display a COM config dialog CommConfigDialog COM1 SomeForm Handle ComConfig In regards to you baud rate question check out the VERY cool BuildCommDCB function It takes and init string such as baud 7680 parity N data 8 stop 1 and converts it into a BCD You can then bind that data to the COM device using SetCommState PortHandle BCD To re initializes a communications resource use the SetupComm function Of course all this stuff is SCREAMING for an object wrapper so I thought this might help get you started with a class interface declaration type TParity paEven paMark paNone paOdd TComPort class private FDBC TDBC FHandle THandle FPort Integer function GetBaud Integer procedure SetBaud const Value Integer procedure SetHandle Value THandle function GetParity TPariy procedure SetParity const Value TPariy procedure SetPort Value Integer public constructor

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/1104a.txt (2016-02-14)
    Open archived version from archive


  • 1 Organization TeamB Mime Version 1 0 Reply To pandeng telepath com Newsgroups borland public delphi graphics On Wed 3 Nov 1999 17 46 38 0100 Jonas Nyström wrote it draws an bezier line like method TCanvas polyline but i want a solid object like TCanvas polygon without afterwards filling it Is that possible Well the code you posted doesn t create a closed path so I m not sure

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/1103b.txt (2016-02-14)
    Open archived version from archive


  • perhaps generate vectorial fonts stroke or wire fonts not truetype How about using any Truetype font as a vector path HOWTO How to Use Paths to Create Text Effects http support microsoft com support kb articles Q128 0 91 asp Here is some code I downloaded from somewhere I can t find a name to give proper credit that demonstrates using Path commands procedure TForm1 btnConvertClick Sender TObject procedure ClearBitmap begin with imgPreview Picture Bitmap do begin Canvas Brush Style bsSolid Canvas Brush Color clWhite Canvas FillRect Rect 0 0 Width Height end end procedure Convert var Canvas TCanvas DC hDC aPoints Array of TPoint dynamic array of TPoint structures aTypes Array of Byte dynamic array of bytes iNumPoints integer number of points in path rOut TRect clipping rectangle for DrawText begin get handle to target canvas Canvas imgPreview Picture Bitmap Canvas draw text transparently Canvas Brush Style bsClear assign Font Canvas Font Label2 Font build Clipping rectangle rOut Rect 0 0 imgPreview Width imgPreview height Get DC DC Canvas Handle Start path BeginPath DC draw text DrawText DC pchar edText Text length edText Text rOut DT LEFT or DT WORDBREAK end path EndPath DC retrieve number of points in

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/0510a.txt (2016-02-14)
    Open archived version from archive


  • Height h bmp Canvas Pen Color pClr bmp Canvas Brush Color bClr bmp Canvas Rectangle 0 0 w h BitBlt ToDC xpos ypos w h bmp Canvas Handle 0 0 SRCCOPY end procedure TForm1 Button1Click Sender TObject var b TBitmap begin b TBitmap Create FillAndBlitRect b 128 128 clBlack clRed 60 60 Form1 Canvas Handle b Free end Harm http www users uswest net sharman1 Cool Graphics for free Ran

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2000/0723.txt (2016-02-14)
    Open archived version from archive


  • 1 Organization Another Netscape Collabra Server User Mime Version 1 0 Newsgroups borland public delphi graphics Yes it s no big deal Just make sure the USER really wants to do this Also at the same time you can change the screen s color depth bpp Here s a small snipet for you to play with Davie sample code Function VideoSwitch Bits Word Integer Var DevMode TDevMode DevModePtr TDevMode Begin

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0204a.txt (2016-02-14)
    Open archived version from archive


  • borland delphi If you have 2 polygon regions you can get the intersection of the 2 with CombineRgn hPolyRgn1 hPolyRgn2 hPolyRgn1 RGN AND I have a tip on my Delphi Tip of the Day that creates form shapes doing this It is at http members truepath com delphi Lewis Howell lewishowell yahoo com Lou s Delphi Tip of the Day http members truepath com delphi Lou s personal webpage http

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0420b.txt (2016-02-14)
    Open archived version from archive



  •