LoadPicture(Filename) Equivalent?

Started by Michael Meeks, March 12, 2005, 09:43:19 PM

Previous topic - Next topic

Michael Meeks

Hi,

In VB:  MyControl1.Picture = LoadPicture(Filename)

What's PB's equivalent to:  LoadPicture(Filename)

1)  Can I load it via binary - copy to clipboard - then grab it from the clipboard:

  MyControl1.Picture = (grab from clipboard-2)

2)  Or is there a better way?

Haakon Birkeland

Coming from a trivial and nice VB background myself, I perfectly know what you expect. Unfortunately that's kinda far from how the API goes some(most)times.. Have a look at this thread.

Michael Meeks

Haakon,

Thanks... I should have seen that!  Found some other sources also.
RTFM... my wife says...  :twisted:

Regards
Mike

Jose Roca

One little apportation. When the control is an OCX, it usually needs an IPicture object, not an handle to an icon or image. I don't know if this is the case here, but maybe you will need it in the future.

See this thread and you will learn a couple of things that VB makes under the hood :)

http://www.powerbasic.com/support/forums/Forum6/HTML/004239.html

Michael Meeks

Jose,

Thanks for the info - always appreciate your help and direction!

Mike

Haakon Birkeland

Yeah, pay attention to Jose's advise on these matters! He's the God of ActiveX around.. - a real huge asset on the subject.  :wink: