Hey guys, I am thinking about creating a sudoku game in VB in order to improve my programming skills and as I am quite new to VB I was wondering would it be best to try this task using labels and text boxes or a felxigrid?
Thanks in advance.
Printable View
Hey guys, I am thinking about creating a sudoku game in VB in order to improve my programming skills and as I am quite new to VB I was wondering would it be best to try this task using labels and text boxes or a felxigrid?
Thanks in advance.
if you are new to vb and never used felxigrid befor then i think you should use labels and text boxes. but you can try and if you got any problems then you can ask in VBF
If you want to learn to program, I wouldn't suggest trying to solve a SODUKO puzzle. I never entered the contest because I couldn't solve it programmatically other than trial and error. Then I saw that the solution is trial and error.
If you do go about it, you will need to learn about arrays also.
Hi, thanks for your replies. I have done some programming before in C++ so I know about arrays. Although I am new to visual basic I am currently using version 6. So if I look into flexigrids would this be much better than just using the labels and text boxes?
Thanks.
You should check out the sudoku solver contest entries for a good cross section of different approaches, styles, etc. at least for the solver part.
http://www.vbforums.com/forumdisplay...&daysprune=100
Thanks for the link. I have decided to go with labels and text boxes but I have come across one problem if the user wants to enter a number in the first label and do to this they enter it into a text box then click a command button how can I allow them to choose which label the number will go into?
I was also wondering with the timer funtion in VB would that allow me to time how long each game takes then keep a record of which game was done in the fastest time?
Thanks.
There are several methods of timing in VB:
People new to VB think of the Timer control, but this is very innaccurate for timing purposes.
You could store the time/date started (using the Now function), then subtract it from the the end time/date - this would be counting in seconds.
You could use the Timer function, however this counts from midnight so more work is needed to allow for the potential crossover to the next day.
The best option is to use API calls (GetTickCount and QueryPerformanceCounter), as they give far greater accuracy. A search of the forums (or just the existing sudoku programs) will give several examples of the code.
Thats great thanks for your help. :)