Results 1 to 4 of 4

Thread: Is this a bug

  1. #1
    Guest

    Angry

    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.

  2. #2
    Lively Member
    Join Date
    Mar 2000
    Posts
    82
    if i remember correctly you need to use
    .picture = loadpicture(path)
    for loading a pic at runtime.

  3. #3
    Guest

    Exclamation

    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

  4. #4
    Guest

    Smile

    Thanks bman. Will try that one.

    Gee why wouldn't you use app.path & "\whatever"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width