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

  • http www atlantic coast com va Organization My Company Message ID Subject Re 24 bit color bmps in Resource File From Bob Villiers Reply To bob villiers lineone net References NNTP Posting Host 80 225 52 33 X Trace dnews 1012803874 80 225 52 33 3 Feb 2002 22 24 34 0800 Lines 28 Path dnews Xref dnews borland public delphi graphics 45851 Alan Store the bitmap as RT RCDATA

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



  • enter all lines in uppercase only Be sure to pick a name for the file different from your PAS unit for your form PATTERN BITMAP PATTERN BMP 3 Create a BAT file and execute it or enter from command line C Program Files Borland Delphi5 Bin BRCC32 EXE BACKGROUND RC After executing this BAT file a Background RES file will be created 4 In the Interface section of the unit

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


  • In article Stephen T Siobbel wrote I can t achieve an Xor effect like you get for instance in mspaint rubberbanding a fixed color line over different colors Try something like this but you have to use a paintbox for this not a TImage You can draw your graphics as background and do any temporary drawing on the paintbox canvas on top of it In your form Declare a method variable RubberPaint Procedure xorg yorg xmov ymov integer of object and a procedure procedure DrawRubber xorg yorg xmov ymov integer In FormCreate create a bitmap MyBitmap and assign your graphic to it Make the paintbox the same dimensions as the bitmap Also do with PaintBox1 do ControlStyle ControlStyle csOpaque avoids flicker In the paintbox s OnPaint TForm1 Paintbox1Paint begin BitBlt paintbox1 canvas handle 0 0 width height MyBitmap canvas handle 0 0 SRCCopy blast the bitmap to screen if assigned RubberPaint then RubberPaint xorg yorg xmov ymov do any temporary drawing end Now the implementation of DrawRubber procedure TForm1 DrawRubber begin with paintbox1 canvas do begin brush style bsClear pen color clLime Rectangle Rect xorg yorg xmov ymov end end Then in PaintBox1MouseDown you just have to say RubberPaint DrawRubber

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


  • reduces flicker of thick lines except for long diagonals On mouse up we BLT the original bitmap back to the form canvas to make sure everything is cleaned up This is close to how MSPaint behaves but not exact I can t discern any flicker in MSPaint rubberband lines There must be some trick that we are ignorant of that they are using Maybe synchronizing with vertical retrace will stop the flicker but I doubt they are doing that just for a simple drawing program I can t think of a way to restore the pixels that the rubberband line has erased except by restoring a whole rect around the line Unit1 dfm file object Form1 TForm1 Left 222 Top 107 Width 383 Height 366 Caption Form1 Color clBtnFace Font Charset DEFAULT CHARSET Font Color clWindowText Font Height 11 Font Name MS Sans Serif Font Style OldCreateOrder False OnCreate FormCreate OnDestroy FormDestroy OnMouseDown FormMouseDown OnMouseMove FormMouseMove OnMouseUp FormMouseUp PixelsPerInch 96 TextHeight 13 end Unit1 pas file unit Unit1 interface uses Windows Messages SysUtils Classes Graphics Controls Forms Dialogs type TForm1 class TForm procedure FormCreate Sender TObject procedure FormMouseDown Sender TObject Button TMouseButton Shift TShiftState X Y Integer procedure FormMouseUp Sender TObject Button TMouseButton Shift TShiftState X Y Integer procedure FormMouseMove Sender TObject Shift TShiftState X Y Integer procedure FormDestroy Sender TObject private Private declarations public Public declarations end var Form1 TForm1 TrackMouse boolean MouseDownX integer MouseDownY integer OldX OldY integer bmRestore TBitmap implementation R DFM procedure TForm1 FormCreate Sender TObject begin Self Canvas Pen Color clLime Self Canvas Pen Width 4 bmRestore TBitmap Create bmRestore PixelFormat pf24bit bmRestore Width ClientWidth bmRestore Height ClientHeight end procedure TForm1 FormDestroy Sender TObject begin bmRestore Free bmRestore nil end procedure TForm1 FormMouseDown Sender TObject Button TMouseButton Shift TShiftState X Y Integer begin TrackMouse true

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


  • Microsoft Outlook Express 5 00 2919 6700 X MimeOLE Produced By Microsoft MimeOLE V5 00 2919 6700 NNTP Posting Host 206 50 62 204 Message ID X Trace dnews 990831879 206 50 62 204 25 May 2001 16 04 39 0700 Path dnews Xref dnews borland public delphi graphics 39201 If your background isn t complex but you still need control over color you can use DrawColor BackgroundColor xor DesiredColor

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


  • with a single button click Yes there is Oh I suppose you would like an example o focusing the window I assume you want to get a snapshot of another app then as you have guessed you need to focus or bring to top that window The following example seraches for notepad and brings it top var wnd HWND begin wnd FindWindow notepad Nil if IsWindow wnd then begin SetForegroundWindow wnd end pressing Alt PrintWnd Key You can simulate the Print Screen key which will put the image on to the clipboard You will then need to extract that image to a bitmap But it is not necessary to do all that it can be done directly by grabing screen directly to bitmap The following routine by Joe Hect will give a Bitmap on the top most window Call it like var myBMP TBitmap begin myBMP TBitmap Create ScreenShot 0 0 1024 800 myBMP or use own dimensioning end procedure ScreenShot x y Width Height integer bm TBitMap By Joe Hecht var dc HDC lpPal PLOGPALETTE begin test width and height if Width 0 OR Height 0 then begin exit end bm Width Width bm Height Height get the screen dc dc GetDc 0 if dc 0 then begin exit end do we have a palette device if GetDeviceCaps dc RASTERCAPS AND RC PALETTE RC PALETTE then begin allocate memory for a logical palette GetMem lpPal sizeof TLOGPALETTE 255 sizeof TPALETTEENTRY zero it out to be neat FillChar lpPal sizeof TLOGPALETTE 255 sizeof TPALETTEENTRY 0 fill in the palette version lpPal palVersion 300 grab the system palette entries lpPal palNumEntries GetSystemPaletteEntries dc 0 256 lpPal palPalEntry if lpPal PalNumEntries Pasting into application like wordpad word etc Sending it to the printer Well you could paste it to another app but

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


  • 1101 compuXXserve com Newsgroups borland public delphi winapi In article wrote How can I grab the active screen like the alt print screen buttons but then in source code Procedure SaveScreenImageToFile Const afilename String var ScreenCanvas TCanvas bmp TBitmap R TRect begin ScreenCanvas TCanvas Create try ScreenCanvas handle CreateDC DISPLAY Nil Nil Nil R Rect 0 0 Screen Width Screen Height bmp TBitmap Create try bmp width screen width bmp

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


  • or similar methods Could someone in the world halp me Gustavo Becker gpbecker compuletra com br procedure ScreenShot x integer y integer Width integer Height integer bm TBitMap var dc HDC lpPal PLOGPALETTE begin test width and height if Width 0 OR Height 0 then begin exit end bm Width Width bm Height Height get the screen dc dc GetDc 0 if dc 0 then begin exit end do we

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



  •