Results 1 to 8 of 8

Thread: VB program query

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    18

    VB program query

    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.

  2. #2
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    Re: VB program query

    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
    1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
    2) If someone has been useful to you please show your respect by rating their posts.
    3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
    4) Before posting your question, make sure you checked this links:
    MICROSOFT MSDN -- VB FORUMS SEARCH

    5)Support Classic VB - A PETITION TO MICROSOFT

    ___________________________________________________________________________________
    THINGS TO KNOW ABOUT VB: || VB Examples/Demos
    What are Classes?
    || -
    Where to place a sub/function?(global) || Webbrowser control

  3. #3
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: VB program query

    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.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    18

    Re: VB program query

    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.

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: VB program query

    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
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    18

    Re: VB program query

    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.
    Last edited by 1821; Nov 6th, 2005 at 11:24 AM.

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: VB program query

    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.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    18

    Re: VB program query

    Thats great thanks for your help.

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