Loadpicture
I discovered Jabaco today, after failing to re-install VB6 in XP (haven't used it for years), and I really like what I've seen so far.
Right now, I'm trying to use the Loadpicture function, but can't seem to find the right way.
I've tried with:
picture1.picture = Loadpicture ("bg.jpg")
The bg.jpg file is in the same folder than the project is saved.
picture1.picture = Loadpicture (pantalla)
pantalla is a variable with the path to a jpg file.
picture1.picture = Loadpicture BgJpg
Using the "autocomplete" feature of the editor.
I guess my references are out of date, or there is something else I'm missing?
picture1 already has a file assigned to it before I try to change it
Thanks for any help,
Diego
Right now, I'm trying to use the Loadpicture function, but can't seem to find the right way.
I've tried with:
picture1.picture = Loadpicture ("bg.jpg")
The bg.jpg file is in the same folder than the project is saved.
picture1.picture = Loadpicture (pantalla)
pantalla is a variable with the path to a jpg file.
picture1.picture = Loadpicture BgJpg
Using the "autocomplete" feature of the editor.
I guess my references are out of date, or there is something else I'm missing?
picture1 already has a file assigned to it before I try to change it
Thanks for any help,
Diego
Hmm... Yes - I have to documentate the usage of IResource. This is the Jabaco-Method to embed a resource (like images) in a Exe/Jar-File.
Quoted
Right now, I'm trying to use the Loadpicture function, but can't seem to find the right way.
I'll proof this method for a future Framework-Version. Some methods to fix your problem:
Quoted
picture1.picture = Loadpicture ("bg.jpg")
The bg.jpg file is in the same folder than the project is saved.
Embedded resources:
|
|
Jabaco Source |
1 2 |
Picture1.Picture = LabradorJpg ' you have to add Labrador.jpg as Jabaco-resource Picture1.Refresh ' a future framework-version will refresh it automatically |
Over HTTP:
|
|
Jabaco Source |
1 2 3 |
Dim myImage As IResource = New VBImage("http://www.google.de/intl/de_de/images/logo.gif") Picture1.Picture = myImage Picture1.Refresh |
Over BufferedImage:
|
|
Jabaco Source |
1 2 3 4 |
Dim myJavaImage As Image = javax#imageio#ImageIO.read(New File("C:\WINDOWS\Web\Wallpaper\Labrador.jpg")) Dim myImage As IResource = New VBImage(myJavaImage) Picture1.Picture = myImage Picture1.Refresh |
