![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Aug 2005
Posts: 68
Rep Power: 4
![]() |
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 |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
Hi Leslie,
What are you programming with? (OS, Programming Language, etc.)
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Aug 2005
Posts: 68
Rep Power: 4
![]() |
I am programming FOR THE MOMENT in dark basic, but I am learning C++.
|
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Yay!
![]() What exactly do you mean by "menu"? A dropdown box? A toolbar menu? A right-click popup menu? What? |
|
|
|
|
|
#5 |
|
Programmer
Join Date: Aug 2005
Posts: 68
Rep Power: 4
![]() |
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.
|
|
|
|
|
|
#6 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
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.
|
|
|
|
|
|
#7 |
|
Programmer
Join Date: Aug 2005
Posts: 68
Rep Power: 4
![]() |
I'd also like some help on making loading screens...you know, the bar filling up?
|
|
|
|
|
|
#8 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
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).
|
|
|
|
|
|
#9 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|