Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 15th, 2005, 2:44 PM   #1
Lesliect6
Programmer
 
Join Date: Aug 2005
Posts: 68
Rep Power: 4 Lesliect6 is on a distinguished road
Need help on doing a menu

Hi!
I would like some help to make a menu for a program, but I have no idea how : how do you make a menu execute a part of a program by clicking with the mouse at a rectangle (an option rectangle)?
Any help will be appreciated,
Leslie CT
Lesliect6 is offline   Reply With Quote
Old Sep 15th, 2005, 2:46 PM   #2
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
Hi Leslie,

What are you programming with? (OS, Programming Language, etc.)
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty
stevengs is offline   Reply With Quote
Old Sep 15th, 2005, 4:27 PM   #3
Lesliect6
Programmer
 
Join Date: Aug 2005
Posts: 68
Rep Power: 4 Lesliect6 is on a distinguished road
I am programming FOR THE MOMENT in dark basic, but I am learning C++.
Lesliect6 is offline   Reply With Quote
Old Sep 15th, 2005, 4:50 PM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Yay!

What exactly do you mean by "menu"? A dropdown box? A toolbar menu? A right-click popup menu? What?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 19th, 2005, 11:29 AM   #5
Lesliect6
Programmer
 
Join Date: Aug 2005
Posts: 68
Rep Power: 4 Lesliect6 is on a distinguished road
Let's say for example there are several boxes antitled "PLAY", "OPTIONS", and "QUIT". If you click on on if them, you will be forwarded to the next menu or the program itself.
Lesliect6 is offline   Reply With Quote
Old Sep 19th, 2005, 12:40 PM   #6
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
You mean a... button? DarkBASIC wasn't built to do this sort of thing... I'd imagine it'd be a little complex compared to a language built to create GUIs, such as C# or Visual Basic .NET.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 19th, 2005, 2:02 PM   #7
Lesliect6
Programmer
 
Join Date: Aug 2005
Posts: 68
Rep Power: 4 Lesliect6 is on a distinguished road
I'd also like some help on making loading screens...you know, the bar filling up?
Lesliect6 is offline   Reply With Quote
Old Sep 19th, 2005, 2:09 PM   #8
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4 OpenLoop is on a distinguished road
I suggest you take a shot at C# (or VisualBasic .NET if you like) because what you need for this program (buttons, progress bar,...) are included in the .NET framework. But you need a good IDE like Visual Studio .NET 2003 or SharpDevelop(FREE).
OpenLoop is offline   Reply With Quote
Old Sep 19th, 2005, 2:44 PM   #9
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I'm going to shoot off on what might seem like a tangent, particularly if you're already aware of it. When it comes to users of a simple console app, you're often sitting in a blocked input function waiting for the user to do something, then you react. With a decent GUI and a decent OS, such isn't usually the case. Your code is doing something else, even if it's just sitting in a forever loop. User actions cause "events" to be generated. You, or someone, have written a function that is kicked off by the event, with the appropriate parameters needed to handle it. You don't call these (usually) as you wander about your code's task. You make them known to that part of the system that processes the events, and it calls them for you. They're called "callbacks" for just that reason. What ever your main line of code is doing gets interrupted, the event procedure does its thang, then execution returns to your main line of code. If your main line of code needs to be aware of interactions with events, then you usually have notifications (flags, say) available that you check periodically enough to be effective.

When you deal with a GUI thing like a button, there are events that it generates. You usually have to write the functions that those events call, and tell the button's overseer where they are.

If this is old news, sorry. If it's part of the underlying thrust of your question, good.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:04 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC