Results 1 to 6 of 6

Thread: Problem with Declaration

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    29

    Question

    Hello, I need a little help with my little Problem...

    Here is my Sourcecode (pseudo):

    Public picHG() as PictureBox
    .
    .
    .
    Set picHG() = PictureBox (ERROR !!)
    .
    .
    .
    ReDim picHG(10)
    .
    .
    .
    and then the other Sourcecode with this call:
    picHG(0).Picture = LoadPicture("aPicture.gif")

    Can anybody help me, why cant I put the PictureBox behind a Index ?? And why cant I make a Set before the = PictureBox... Iám totally confused, hope You not !!


    Please help, greetings MAJASOFT.
    VB and Java are great - ja, so ist es !! To my software programming site: http://www.majasoft-games.de .

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Well shouldn't you specify wich item you want to set the picbox to?

    Code:
    Set picHG(0) = PictureBox '(HOPEFULLY NO ERROR !!)
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    29

    Exclamation Yes, but...

    Yes I know but he says...
    Variable not defined (Variable nicht definiert !!) - He mean the PictureBox in "Set picHG(0) = PictureBox".

    what now ??

    Greetings, MAJASOFT.
    VB and Java are great - ja, so ist es !! To my software programming site: http://www.majasoft-games.de .

  4. #4
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Well erhmm..
    Code:
    Dim Pic As New PictureBox
    Set Var(0) = Pic
    Not sure though.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  5. #5
    Junior Member
    Join Date
    Oct 2000
    Location
    Purgatory
    Posts
    31
    try:
    Code:
    public function picHG() as vb.picturebox
        set picHG = picture1
    end function
    
    public sub picture1_click()
        msgbox picHG.name
    end sub

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    29

    Exclamation Yes

    Yes, in the meantime i have solved the problem... i have forgot to set it to an existing PictureBox (frmGame.picBox !!) uh...oh... thanx anyway !! Greetings
    VB and Java are great - ja, so ist es !! To my software programming site: http://www.majasoft-games.de .

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