-
Ok am using VB5 SP3.
Start a project, and load a checkbox to the form.
Set the propriety 3d/Flat to flat.
Set Style to Graphical.
Load a graphic, (bitmap, GIF) to the Picture property
Run, not a problem
Set the Picture property to none, and load the grpahic via code in the Form Load Event.
Run, program falls over with a data type error :(
Is this a bug or am l doing something wrong with the code
chkbox.Picture = App.Path & "\shutdown.gif" :( :( :(
This is really srewy.
Thanks in advance for any advice.
-
if i remember correctly you need to use
.picture = loadpicture(path)
for loading a pic at runtime.
-
yes.. LOAD PICTURE... but i have another thing to say:
DON'T USE APP.PATH
instead of.. use this function:
Code:
Public Function AppPath() as String
If Right(App.Path,1) = "\" then
AppPath = App.Path
Else
AppPath = App.Path & "\"
End If
End Function
=)
taLON
-
Thanks bman. Will try that one.
Gee why wouldn't you use app.path & "\whatever" :)