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".

  • 00 GMT Message ID X Priority 3 X MimeOLE Produced By Microsoft MimeOLE V5 00 2919 6600 Organization Another Netscape Collabra Server User X MSMail Priority Normal Newsgroups borland public delphi graphics Wolfgang Kaeckenmeister wrote in message news 385810E7 39BEA3D9 compuserce com Joris Van Damme schrieb Wolfgang Kaeckenmeister wrote How can I get the dpi of an BMP Image But can you give me a hint how I can get this structure Is there a function within Delphi or must I create one myself Here s some code that shows you how to access fields in a bitmap s header record BUT I cannot find a Bitmap that has anything but 0s for both these values biXPelsPerMeter and biYPelsPerMeter PROCEDURE GetPelsPerMeter CONST Bitmap TBitmap VAR xPelsPerMeter yPelsPerMeter INTEGER VAR BitmapHeader pBitmapInfo BitmapImage POINTER HeaderSize DWORD ImageSize DWORD BEGIN GetDIBSizes Bitmap Handle HeaderSize ImageSize GetMem BitmapHeader HeaderSize GetMem BitmapImage ImageSize TRY GetDIB Bitmap Handle Bitmap Palette BitmapHeader BitmapImage xPelsPerMeter BitmapHeader bmiHeader biXPelsPerMeter yPelsPerMeter BitmapHeader bmiHeader biYPelsPerMeter FINALLY FreeMem BitmapHeader FreeMem BitmapImage END END GetPelsPerMeter procedure TForm1 Button1Click Sender TObject VAR Bitmap TBitmap xPelsPerMeter INTEGER yPelsPerMeter INTEGER begin IF OpenPictureDialog Execute THEN BEGIN Bitmap TBitmap Create TRY Bitmap LoadFromFile OpenPictureDialog Filename GetPelsPerMeter

    Original URL path: http://www.efg2.com/Lab/Library/Delphi/Graphics/BMPPelsPerMeter.TXT (2016-02-14)
    Open archived version from archive



  • 2919 6700 X MimeOLE Produced By Microsoft MimeOLE V5 00 2919 6700 NNTP Posting Host 209 242 148 46 Message ID X Trace dnews 988330480 209 242 148 46 26 Apr 2001 17 14 40 0700 Path dnews Xref dnews borland public delphi objectpascal 186151 Doug You have to use a TStringAdapter as in procedure TForm1 Button1Click Sender TObject var S IStream FS TFileStream begin FS TFileStream Create c output

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


  • process Yes it is not very complicated You save the bitmap to a memory stream first using its SaveToStream method To store it into a file that contains other data as well you first write the size of the memorystream to the file then the memory stream itself This is easiest if you access the file via TFilestream Procedure SaveBitmapToStream aBitmap TBitmap aStream TStream Var ms TMemoryStream size Integer Begin

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


  • 0 Reply To pandeng telepath com Newsgroups borland public delphi winapi On Wed 06 Oct 1999 11 56 38 0400 Gokhan Ergul wrote How do I copy the contents of a TMemoryStream after I opened a MMF and getting a view to it Use an intermediate buffer procedure CopyStreamToFile S TStream F THandle var BytesWritten DWord Buf array 0 8191 of Byte NumBytes DWord begin while S Position SizeOf Buf

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


  • MIME Version 1 0 Newsgroups borland public delphi winapi Jerry Adriane Gonçalves wrote Hi settle I need populate a combobox with machine s COM ports and other combobox with machine s LPT ports Is there an way to do this Can anyone help me Thanks in advance Jerry Brazil The following procedure will list all the devices on your computer You can then extract the com ports and printer ports

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


  • Note these function use Delphi 2 3 register calling convention and thus will get the first parameter in eax the second in edx function PortIn IOport word byte assembler asm mov dx ax in al dx end function PortInW IOport word word assembler asm mov dx ax in ax dx end procedure PortOut IOport word Value byte assembler asm xchg ax dx out dx al end procedure PortOutW IOport word

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


  • to help me If you want to send data to the ports then following functions work for Delphi 3 5 with Win95 98 But not for NT or W2K For NT W2K you need a driver function PortIn IOport word byte assembler asm mov dx ax in al dx end function PortInW IOport word word assembler asm mov dx ax in ax dx end procedure PortOut IOport word Value byte

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


  • dflt ParityErrorChecking property ParityErrorChar Byte read fParityErrorChar write SetParityErrorChar default dflt ParityErrorChar property ParityErrorReplacement Boolean read fParityErrorReplacement write SetParityErrorReplacement default dflt ParityErrorReplacement property StopBits TStopBits read fStopBits write SetStopBits default dflt StopBits property DataBits TDataBits read fDataBits write SetDataBits default dflt DataBits property XONChar byte read fXONChar write SetXONChar default dflt XONChar property XOFFChar byte read fXOFFChar write SetXOFFChar default dflt XOFFChar property XONLim word read fXONLim write SetXONLim default dflt XONLim property XOFFLim word read fXOFFLim write SetXOFFLim default dflt XOFFLim property ErrorChar byte read fErrorChar write SetErrorChar default dflt ErrorChar property FlowControl TFlowControl read fFlowControl write SetFlowControl default dflt FlowControl property StripNullChars Boolean read fStripNullChars write SetStripNullChars default dflt StripNullChars property EOFChar byte read fEOFChar write SetEOFChar default dflt EOFChar property OnTransmit TNotifyTXEvent read fOnTransmit write fOnTransmit property OnReceive TNotifyRXEvent read fOnReceive write fOnReceive property AfterTransmit TNotifyTXEvent read fAfterTransmit write fAfterTransmit property AfterReceive TNotifyRXEvent read fAfterReceive write fAfterReceive end procedure Register implementation Public method to open the port and assign the handle to it function TSerialPort OpenPort MyCommPort TCommPort Boolean var MyPort PChar begin Make sure that the port is Closed first ClosePort MyPort PChar COM IntToStr ord fCommPort 1 hCommPort CreateFile MyPort GENERIC READ OR GENERIC WRITE 0 nil OPEN EXISTING 0 0 Initialize the port Initialize DCB Was successful if not and invalid handle result hCommPort Specifies the number of bytes received by the serial provider but not yet read by a ReadFile operation BytesInQueue LongInt Number of bytes in the input buffer oStatus TComStat Variable for the ComStat structure dwErrorCode DWord Variable to put the error codes in begin if hCommPort INVALID HANDLE VALUE then exit if assigned fOnReceive then fONReceive self ReadBuffer Get the total number of bytes that are waiting to be read from the input buffer ClearCommError hCommPort dwErrorCode oStatus BytesInQueue oStatus cbInQue if BytesInQueue 0 then begin SetLength ReadBuffer BytesInQueue 1 ReadFile hCommPort PChar ReadBuffer BytesInQueue NumBytesRead nil SetLength ReadBuffer StrLen PChar ReadBuffer end if assigned fAfterReceive then fAfterReceive self ReadBuffer result ReadBuffer end Create method constructor TSerialPort Create AOwner TComponent begin inherited Create AOwner Initalize the handle to the port as an invalid handle value We do this because the port hasn t been opened yet and it allows us to test for this condition in some functions thereby controlling the behavior of the function hCommPort INVALID HANDLE VALUE Set initial settings Even though the default parameter was specified in the property if you were to create a component at runtime the defaults would not get set So it is important to call them again in the create of the component fCommPort dflt CommPort fBaudRate dflt BaudRate fParityType dflt ParityType fParityErrorChecking dflt ParityErrorChecking fParityErrorChar dflt ParityErrorChar fParityErrorReplacement dflt ParityErrorReplacement fStopBits dflt StopBits fDataBits dflt DataBits fXONChar dflt XONChar fXOFFChar dflt XOFFChar fXONLim dflt XONLim fXOFFLim dflt XOFFLim fErrorChar dflt ErrorChar fFlowControl dflt FlowControl fStripNullChars dflt StripNullChars fEOFChar dflt EOFChar fOnTransmit nil fOnReceive nil end Destroy method destructor TSerialPort Destroy begin Close the port first ClosePort inherited Destroy end Initialize the

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



  •