Results 1 to 2 of 2

Thread: [RESOLVED] PictureBox - Invalid property error

  1. #1

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Resolved [RESOLVED] PictureBox - Invalid property error

    I am using the Scale function on a PictureBox, and whilst I know the values are valid, it sometimes gives me the Error 450 : Wrong number of arguments or invalid property assignment and sometimes it runs perfectly with the same values.

    The codeline is:
    Code:
    Dim Zmax As Single, Zmin As Single, PipeCount As Integer, RoutePointCount As Integer, SpurLength As Single, SpurGroup As String
    Dim PaddingOuterX As Single, PaddingOuterY As Single, PaddingLeft As Single, PaddingRight As Single, PaddingTop As Single, PaddingBottom As Single
    
    pic.Scale (PaddingLeft, 1.05 * Zmax)-(SpurLength + PaddingRight, 0.95 * Zmin)
    The values are:
    PaddingLeft=-29.906
    Zmax=12091 (A single datatype)
    SpurLength=996.897
    Zmin=915 (A single data type)

    Thanks
    PK

  2. #2

    Thread Starter
    Fanatic Member Peekay's Avatar
    Join Date
    Sep 2006
    Location
    Witbank, South Africa
    Posts
    784

    Re: PictureBox - Invalid property error

    I have found the source of the error.

    If I am busy drawing graphics to a PictureBox, and I go into debug mode and change any code line in the program, it locks the graphics and graphics control, and will not restart from the interrupted line, but shows the error in the nearest graphics command.
    Even If I terminate the debugging session and run it again, it keeps the lock. I need to restart VB6 again.

    Why I would not know, but there are many on this forum who do.
    PK

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