Question board game

arjun_a7603

New member
Joined
Nov 16, 2008
Messages
4
Programming Experience
1-3
hi guys.. i have to make a class project. i need to make a board games kinda thing. i need to make a 25x25 grid and make a bot use AI to move it around. i am planning to use visual studio 6 .net... i know how to program with the elements (buttons, etc) but wat i am not knowing is that how to create a board. can any one pls suggest how to create a board and number the co-ordinates? it's just the regular pathfinding problem guys
 
There's no such thing as Visual Studio 6 .NET. VS6 was the last version of VS before the .NET era. It includes VB6, which was the last version of VB before the .NET era.

The next version was VS.NET, also known as VS.NET 2002, and that was followed by VS.NET 2003, VS 2005 and VS 2008. Those all included similarly named versions of VB.

If you really are using VB6 then we can't help you because this is an exclusively VB.NET site. If you are using VB.NET then please tell us which version. Your profile says Vb 2005. Is that actually the case?
 
Thread moved to more appropriate forum.

You have a few different options:

1. Use a TableLayoutPanel where each cell is a square on the board.
2. Use a PictureBox containing an Image of the board.
3. Use GDI+ to draw the board grid directly onto the form or another control.

Which do you think you'd want to go with? You might want to do a bit of reading on each topic.
 
stuck again

hi i've tried to draw a rectangel using this code.. but i wonder why it doesnt work.. can anyone pls help

VB.NET:
Namespace WindowsApplication1
    Imports System
    Imports System.Collections.Generic
    Imports System.ComponentModel
    Imports System.Data
    Imports System.Drawing
    Imports System.Text
    Imports System.Windows.Forms
    
    
    Public Class Form1
        Inherits Form
        
        Public Sub New()
            MyBase.New
            InitializeComponent
        End Sub
        
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
            Dim rect As Rectangle = New Rectangle(0, 0, 100, 100)
            Dim brush As Brush = New SolidBrush(Color.Blue)
            Dim pen As Pen = New Pen(brush, 5)
            Dim graphicsObj As Graphics
            graphicsObj = Me.CreateGraphics
            graphicsObj.DrawRectangle(pen, 0, 0, 50, 50)
        End Sub
    End Class
End Namespace

can u pls get me to draw a rectangle
 
Last edited by a moderator:
This is VB.Net site, so you use VB.Net language when posting here, I translated your code with an online converter.

VB.NET:
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
    e.Graphics.DrawRectangle(Pens.Blue, 0, 0, 50, 50)
End Sub
Visit this place to learn more about GDI+, read the beginners guide and the FAQs of Bob Powell.
 
Search Google or your favorite search engine for "C# forum".
 
Back
Top