Need help ASAP (switching between panel)

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts Page 1 of 1
Contributors
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

I am making a small game and I have a picbox I need to move I am using the following code to do this
Code: Select all
     If e.Button = MouseButtons.Left Then
            sender.Location = New Point(sender.Location.X + (e.X - P.X), sender.Location.Y + (e.Y - P.Y))
        End If
But I need that code to switch between panels so my game looks like this

--------------------
# #
# picbox #
# #
---------------------
--------------------
# #
# #
# #
---------------------

Now I need it so if the user moved the pic box over the other panel then it would move the pic box to that panel

Its kinda like tic tac toe game im making but a REALLY old version
User avatar
visualtech
VIP - Donator
VIP - Donator
Posts: 265
Joined: Sat Nov 19, 2011 2:19 pm

Toggle the Visibility :) (So say you have two panels, make then layers i.e. they are one over the other) so if you make one invisible, the second one will be visible and vice-versa
Image
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

umm hold on ill post pics and explain the game
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

So the game is like tic tac toe
But well let me explain rules

here is a pic of the board
Image

How the game works
You have 6 counters 3 at the top All X and 3 at the bottom all 0 and you have to get
three in a row but you can only move one space at a time and not digneally or over the
others player pieces and first person to hit 3 in a row wins :)

Only problem is its not working the moving works but they don't switch between panels
4 posts Page 1 of 1
Return to “Coding Help & Support”