Can you help a noob?
Can you help a noob?
Can you help a noob?
Can you help a noob?
Can you help a noob?
Can you help a noob? Can you help a noob? Can you help a noob? Can you help a noob? Can you help a noob? Can you help a noob? Can you help a noob? Can you help a noob?
Can you help a noob? Can you help a noob?
Can you help a noob?
Go Back  Xtreme Visual Basic Talk > > > Can you help a noob?


Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2008, 04:24 AM
cheeseplease cheeseplease is offline
Newcomer
 
Join Date: Mar 2008
Posts: 2
Question Can you help a noob?


hi all my names mark , and i was wondering if anyone could help me with a little problem of mine.

ive been reading VB for about 2 weeks and i need to complete a little task.

here it go's :

i need to make a guessing number game.

the number must be between 1-100 and the user must input this number by typing it in a text field that accepts a 3 digit number up to 100 ( and which can only accept numbers not letters)

there also must be a check me command to check if they gussed the number correctly, gussed too low and too high.

there should also be a cheat button which says give user number and promts them to start a name game.

the text field should be disabled until a new game is started.

the menu at the top of the app should read

Menu
File
Exit
Game: start new game
Give me the number
Help: Intructions/ about


Ive started work on this already but im totaly stuck , as i am new.

im learning the basics through tutorials on this and many other websites and books, any help would be much thanked.

cheers, mark

Last edited by cheeseplease; 03-04-2008 at 04:31 AM.
Reply With Quote
  #2  
Old 03-04-2008, 04:11 PM
AdrianDeAngelis's Avatar
AdrianDeAngelis AdrianDeAngelis is offline
Contributor
 
Join Date: May 2005
Location: Australia
Posts: 549
Default

Hmnnn... sounds like a homework project...

Perhaps you can show us what you have tried and where you are up to.

I think it would also be good if you can give us an idea about how YOU are thinking that you would go about doing these various things (ie show us some of your planning)
__________________
Automation error... What do you mean automation error you %#@*&!$ thing!

Star Admiral: 3D tactical space sim *** New Version 0.38 10/01/09 ***
Damage, shields and special weapons systems
Reply With Quote
  #3  
Old 03-04-2008, 07:59 PM
fallenhero fallenhero is offline
Freshman
 
Join Date: Feb 2005
Posts: 30
Default

random number between 1-100 u can use
Code:
      Public Function Rand(ByVal Low As Long, _
                           ByVal High As Long) As Long
        Rand = Int((High - Low + 1) * Rnd) + Low
      End Function
then check the value user enter is number or character after command button click using if...else method. pseudo code eg.
Code:
if isnumeric(text1.text) = true then
       if text1.text > randomNumber then
              msgbox "The number you enter is higher then guess number."
       elseif text1 <  randomNumber then
              msgbox "The number you enter is lesser then guess number."
       elseif text1 =  randomNumber then
              msgbox "The number you enter correct."              
       end if
end if
As for menu just right click on the form and click on menu editor. It will come out with the menu editor for u to add in anything u want.

Textbox disable u can do it on Form_Load to text1.enable=False Then after u click on click on new game will enable it back. Cheat button u can just msgbox out the randomNumber.
Reply With Quote
  #4  
Old 03-05-2008, 02:59 AM
cheeseplease cheeseplease is offline
Newcomer
 
Join Date: Mar 2008
Posts: 2
Default

thanks that worked just great,

in reply to the first post, i have graphical part done, it's just i kept messing up the code, i had part of it, but fallenhero cleared it up for me.

thanks, u are a hero,
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Can you help a noob?
Can you help a noob?
Can you help a noob? Can you help a noob?
Can you help a noob?
Can you help a noob?
Can you help a noob? Can you help a noob? Can you help a noob? Can you help a noob? Can you help a noob? Can you help a noob? Can you help a noob?
Can you help a noob?
Can you help a noob?
 
Can you help a noob?
Can you help a noob?
 
-->