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

  • s a bug in TIcon ReleaseHandle It reads function TIcon ReleaseHandle HICON begin with FImage do begin if FRefCount 1 then NewImage CopyIcon FHandle nil Result FHandle FHandle 0 end Changed Self end It should read function TIcon ReleaseHandle HICON begin with FImage do if FRefCount 1 then NewImage CopyIcon FHandle nil with FImage do begin Result FHandle FHandle 0 end Changed Self end You get the problem when you have two TIcons that share the same TIconImage Suppose you want to change one of the icon s handles you say oldIcon icon1 ReleaseHandle if oldIcon 0 then DestroyIcon oldIcon icon1 Handle newIcon but if you use the buggy version of ReleaseHandle on Icon1 it 1 Creates a separate image for icon1 with a ref count of 1 and decrements the ref count for the original image which is still used by icons2 so far so good 2 It returns the handle of the original image and sets the handle to 0 The original image is still used by icon2 which goes mad The fixed version 1 Creates a separate image for icon1 with a ref count of 1 and decrements the ref count for the original image which is

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



  • can use the parent of the Image which is the panel it rests on Here s some code procedure TForm1 Panel1MouseDown Sender TObject Button TMouseButton Shift TShiftState X Y Integer var p TPanel begin ReleaseCapture if Sender is TImage then p TPanel TImage Sender Parent else p TPanel Sender Select p p Perform WM Syscommand SC Dragmove 0 end There s actually more here than neccessary but I m adding some sizing and selection code which isn t finished I may just throw out the Image and draw directly to panel I can do it by creating a DC but it would nice to add a canvas property to a TPanel Any hints Strangely this seems to only work with TCustomControl descendents Anybody know why Mitch Wolberg RockWare Inc Toni Sanders wrote Agreed If you have one image on one panel you can set the ImageMouseDown to PanelMouseDown event but Beno wrote he d like to move pictures and in this case you don t know the exact panel unless you really want to write x times the same code Regards Toni Sim Zacks schrieb Actually the panel can be the same size as the timage maybe a pixel or

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


  • MSMail Priority Normal NNTP Posting Date Tue 30 May 2000 22 25 01 GMT Newsgroups comp lang pascal delphi misc wrote in message news 8h0ni9 dt2 1 nnrp1 deja com First thanks for any help Situation I have ten images whose names are imgQ1 imgQ10 Why not just have an array of images and use an index Put five TImages on a form and two TButtons Set Button1 Tag to 2 and Button2 Tag to 4 or whatever Wire the OnClick events for these buttons to the ButtonClick method below You can access any TImage with just a single number unit Unit1 interface uses Windows Messages SysUtils Classes Graphics Controls Forms Dialogs StdCtrls ExtCtrls type TForm1 class TForm Image1 TImage Image2 TImage Image3 TImage Image4 TImage Image5 TImage Button1 TButton Button2 TButton procedure FormCreate Sender TObject procedure ButtonClick Sender TObject private ImageArray ARRAY 1 5 OF TImage public Public declarations end var Form1 TForm1 implementation R DFM procedure TForm1 FormCreate Sender TObject begin wire up array elements ImageArray is an array of pointers to the TImage instances ImageArray 1 Image1 ImageArray 2 Image2 ImageArray 3 Image3 ImageArray 4 Image4 ImageArray 5 Image5 end procedure TForm1 ButtonClick Sender TObject VAR Bitmap

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


  • ButtonTestClick Sender TObject begin IF Image1 Picture Graphic Empty THEN ShowMessage Image is empty end The following seems to work OK procedure TForm1 ButtonTestClick Sender TObject begin IF Image1 Picture Graphic NIL THEN ShowMessage Image is empty end I m not sure when the Empty property helps much You can create a TBitmap and assign it procedure TForm1 Button1Click Sender TObject begin Image1 Picture Graphic TBitmap Create end This results

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


  • empty then showmessage Empty Image else showmessage Valid Image Hope it helps Jay Jackson wrote Simple one How do I determine is a timage field has an image in it or not Neither of the following work if imagezoom1 picture

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


  • delphi graphics 51229 In article Michael Fullerton wrote For large images in an app I resize the TImage to fit the screen Because I have some code to draw a rectangle with the mouse using DrawFocusRect I want to select part of the image I also need to resize Image Picture Bitmap If I don t resize Image Picture Bitmap for the large images the rectangle is drawn in the

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


  • draw on the Canvas property of TImage if the Picture is empty or contains a bitmap as its graphic You cannot draw on the Canvas of TImage if the image contains an icon or a metafile as its graphic The GetCanvas read method of TImage demonstrates why function TImage GetCanvas TCanvas var Bitmap TBitmap begin if Picture Graphic nil then begin Bitmap TBitmap Create try Bitmap Width Width Bitmap Height

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


  • en MIME Version 1 0 Newsgroups borland public delphi graphics Subject Re D6 flickering in graphics References Content Type text plain charset us ascii Content Transfer Encoding 7bit NNTP Posting Host 217 2 1 36 X Trace dnews 997537327 217 2 1 36 11 Aug 2001 06 42 07 0700 Lines 10 Path dnews Xref dnews borland public delphi graphics 41193 David Lively schrieb 1 You re drawing to the

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



  •