2 Replies - 624 Views - Last Post: 06 September 2012 - 09:19 PM Rate Topic: -----

#1 joezcool02  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 06-September 12

Trouble with picture boxes. multispawn

Posted 06 September 2012 - 08:52 PM

I have this in a timer on a VB.NET WAP
I expected it to allow me to animate to pictureboxes(planets) seperately, but instead it spawns them both, and stops spawning that instance when i attempt to spawn in my second planet.

 For x = 1 To 2
            If planet(x).Enabled = True Then
                planet(x).Visible = True ' to show the picture box after ghost
                planet(x).Left = planet(x).Left + (Math.Sin(temp) * 10)
                planet(x).Top = planet(x).Top + +(Math.Cos(temp) * 10)
                temp = temp + 1
            End If
        Next



Is This A Good Question/Topic? 0
  • +

Replies To: Trouble with picture boxes. multispawn

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9201
  • View blog
  • Posts: 34,575
  • Joined: 12-June 08

Re: Trouble with picture boxes. multispawn

Posted 06 September 2012 - 08:59 PM

What? Perhaps a screen shot may clear up what is going on.

Side note - pictureboxes are horrible ways to do animation. Just paint the bitmap directly!

Example:
http://www.dreaminco...-basics-part-1/
Was This Post Helpful? 0
  • +
  • -

#3 joezcool02  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 06-September 12

Re: Trouble with picture boxes. multispawn

Posted 06 September 2012 - 09:19 PM

View Postmodi123_1, on 06 September 2012 - 08:59 PM, said:

What? Perhaps a screen shot may clear up what is going on.

Side note - pictureboxes are horrible ways to do animation. Just paint the bitmap directly!

Example:
http://www.dreaminco...-basics-part-1/



I kinda got it working, i have noticed how terrible pictureboxes are for animation :P
I find whenever i use the paint events in a sub that i cannot use mouse events as well?

I will have a read through of that thing you linked though thank you

Also I have attempted to get things like OpenGL working or DirectX but i can never seem to get them to be sued in a form, I am using Visual studio 2010 if anybody can help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1