Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / November 2003

Tip: Looking for answers? Try searching our database.

first VS application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John McD - 13 Nov 2003 23:21 GMT
Hi,

I'm trying to create an application which has an 8x8 grid.
Each square in the grid can be clicked on or off with the
mouse.  Then when a "go" button is clicked the squares in
the grid will switch each other on or off depending upon
the states of the adjacent squares (like in the game of life).

My question is simply:  what is the best way to implement
this?  Should I use lots of picture boxes?  Is there a way
of automatically creating a grid?  There will be 8 possible
states for each square in the grid which I would like to
display with gif or jpg images.

Thanks in advance, John.
Michael Giagnocavo [MVP] - 14 Nov 2003 03:00 GMT
I'd look into System.Drawing and draw your own grid.  Should be really
simple.  Make a new custom control, override paint, and away you go.

I wrote a simple game of "Go" in VB.NET about 2.5 years ago.  Didn't have
any experience with GDI or System.Drawing, but the API is really really easy
to use, so in about 5 hours I got the basic thing layed out.  Play around,
and if you have specific questions about drawing, try the
microsoft.public.dotnet.framework.drawing NGs (use google groups first too
:)).

Good luck!

-mike
MVP

> Hi,
>
[quoted text clipped - 11 lines]
>
> Thanks in advance, John.
Santiago - 14 Nov 2003 18:57 GMT
I think going with picture boxes will make your life much simpler than
creating your own custom. The picture boxes will support displaying your gif
or jpg and should have all the events you need (click, etc).

- Santiago

> I'd look into System.Drawing and draw your own grid.  Should be really
> simple.  Make a new custom control, override paint, and away you go.
[quoted text clipped - 26 lines]
> >
> > Thanks in advance, John.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.