Re: OpenPictureDialog Problems




This is the code I am trying. It works fine with Tshape!
The component is here
http://downloads.delphi32.com/740/1221/manysh.zip

procedure TForm1.BitBtn1Click(Sender: TObject);
var OpenPicDlg : TOpenPictureDialog;
Bitmap: TBitmap;

begin
Bitmap := TBitmap.Create;
OpenPicDlg := TOpenPictureDialog.Create(Self);
if OpenPicDlg.Execute then
begin
bitmap.LoadFromFile(OpenPicDlg.FileName);
manyshape1.Image := Bitmap;
end;
OpenPicDlg.Free;
end;






On Mon, 25 Jul 2005 08:59:54 +1000, "Henry Bartlett"
<hambar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

><cybatech@xxxxxxxxxxxxx> wrote in message
>news:20r5e114gr4i03ikisi76ungv52tivs5r9@xxxxxxxxxx
>> Thanks Guys but I'm still getting accessvoilation.
>
>Show us the full code you are currently using for the method in which
>you are getting the AV
>
>---
>Henry Bartlett
>Delphi Links Page:
>( http://www.hotkey.net.au/~hambar/habit/delflink.htm )
>
>
>
>
>
>

.



Relevant Pages

  • OpenPictureDialog Problems
    ... var OpenPicDlg: TOpenPictureDialog; ... Bitmap: TBitmap; ... NewShape: TManyShape; ...
    (comp.lang.pascal.delphi.misc)
  • Re: TImage vs TBitmap Verwirrung
    ... TPicture hat eine Eigenschaft Bitmap mit der man sich eine Bitmap ... TBitmap in Picture.Graphic steckte. ... Dir dieser Canvas das Malen erlaubt - siehe oben, es kann ... Leite eine neue Komponente von TGraphicControl oder TWinControl ab, ...
    (de.comp.lang.delphi.misc)
  • Re: Please make a new AutoVar Statement
    ... Bitmap: TBitmap; ... in your tbitmap example you'd still ... need to set the bitmap's size, pixel format, load it from a file, etc. So ... programmer has to keep track of when reading through someone else's code. ...
    (borland.public.delphi.non-technical)
  • Re: wo hier den Destructor platzieren
    ... Es ging mir ja um die Funktion vom Typ TBitmap mit dem Namen Real2Bitmap. ... Das bitmap das du in der Function Real2Bitmap erzeugst, ... Var fQuellBitmap: TBitmap; ...
    (de.comp.lang.delphi.misc)
  • Re: ownerdrawing (on a components canvas): comitting any sins here?
    ... R: TRect; s1: string; s2: string; BM: TBitmap; BM2: TBitmap; begin ... BM2:= TBitmap.create; ... this means that you have created a blank bitmap and then have the object pointer replaced by another bitmap that was created from the ...
    (alt.comp.lang.borland-delphi)