Results 1 to 3 of 3

Thread: Gameboard with Keyboard Controls

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    3

    Gameboard with Keyboard Controls

    I'm am making a small roleplaying game, and I'm stuck at the point where I have to make a game board.

    A simple way to explain what I'm seeking is: Imagine a chessboard where you move a piece with the keyboard keys. If anyone has an idea I would love to see a piece of samplecode on how to do this in a good way.

    Thanks on beforehand

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Gameboard with Keyboard Controls

    It depends exactly what you want but I would guess that the easiest way would be to make your board the background image of the form and then make the pieces controls that you can select and either move via the keyboard or the mouse with drag-and-drop. Each piece could be an image in a PictureBox which could have its Location property manipulated to move it around the board.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    3

    Re: Gameboard with Keyboard Controls

    Thanks, my main problem atm is that I dont have any experience with keyboard controls. Anyone have some small piece af sample code I could look at??

    That would help alot, thanks

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