PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Michael Meeks on March 12, 2005, 09:43:19 PM

Title: LoadPicture(Filename) Equivalent?
Post by: Michael Meeks on March 12, 2005, 09:43:19 PM
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?
Title: LoadPicture(Filename) Equivalent?
Post by: Haakon Birkeland on March 12, 2005, 10:16:38 PM
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 (http://www.planetsquires.com/forums/viewtopic.php?t=1143) thread.
Title: LoadPicture(Filename) Equivalent?
Post by: Michael Meeks on March 12, 2005, 10:44:42 PM
Haakon,

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

Regards
Mike
Title: LoadPicture(Filename) Equivalent?
Post by: Jose Roca on March 12, 2005, 11:35:51 PM
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
Title: LoadPicture(Filename) Equivalent?
Post by: Michael Meeks on March 13, 2005, 01:59:21 AM
Jose,

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

Mike
Title: LoadPicture(Filename) Equivalent?
Post by: Haakon Birkeland on March 13, 2005, 07:12:53 AM
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: