| | |
Taskbar in Visual Basic 2005
![]() |
•
•
Join Date: Jan 2008
Posts: 20
Reputation:
Solved Threads: 0
Hi,
I have been recently programming a application in visual basic 2005 express edition. My program is like windows which has programs inside. So i have these buttons in my program that link to other programs. The only problem is that i wanna create a taskbar. I have put a menustrip and dock it at the bottom of the application. i have a start button there and menu. The main problem is that whenever i open a new program, i want a link or a button to be created on my taskbar or the menustrip(just like in windows) that i dock at the bottom.
Can anyone please give me the code for this kind of application. Please reply with a code that creates what i said above. I need the code which has no errors and is for visual basic 2005.
Please reply
I have been recently programming a application in visual basic 2005 express edition. My program is like windows which has programs inside. So i have these buttons in my program that link to other programs. The only problem is that i wanna create a taskbar. I have put a menustrip and dock it at the bottom of the application. i have a start button there and menu. The main problem is that whenever i open a new program, i want a link or a button to be created on my taskbar or the menustrip(just like in windows) that i dock at the bottom.
Can anyone please give me the code for this kind of application. Please reply with a code that creates what i said above. I need the code which has no errors and is for visual basic 2005.
Please reply
It is unlikely that anyone is going to write code for you...
However, what you want to do shouldn't be too difficult. Every time you start a new program you just need to add a new menu item to your menustrip at the bottom of the window. Part of the information you keep about each running application should be the index of the menu item (so that you can update it, and whenever anyone clicks it, you can search through your running applications array for the application associated with that menu item).
Hope this helps.
However, what you want to do shouldn't be too difficult. Every time you start a new program you just need to add a new menu item to your menustrip at the bottom of the window. Part of the information you keep about each running application should be the index of the menu item (so that you can update it, and whenever anyone clicks it, you can search through your running applications array for the application associated with that menu item).
Hope this helps.
If what you want is something:
If I still don't understand what it is you want then you'll need to explain yourself much more clearly and using much more concrete language than you did in your last post. And avoid circular references.
- with text and/or graphics
- that you can click on
- that represents the newly executed program
- that appears on your menu bar (or "menustrip"/"taskbar")
If I still don't understand what it is you want then you'll need to explain yourself much more clearly and using much more concrete language than you did in your last post. And avoid circular references.
•
•
Join Date: Jan 2008
Posts: 20
Reputation:
Solved Threads: 0
ok
look you know when you open a new program in windows, when you open a new program, a new button is also made automatically in the taskbar. Whenever the user minimizes the program, and he tries to open it back, he clicks on that button that was created in the taskbar. So i want the source code or a tutorial that helps me make that kind of structure.
here is an image of what i wanna make looks like
http://i7.tinypic.com/6yn68n8.jpg
look you know when you open a new program in windows, when you open a new program, a new button is also made automatically in the taskbar. Whenever the user minimizes the program, and he tries to open it back, he clicks on that button that was created in the taskbar. So i want the source code or a tutorial that helps me make that kind of structure.
here is an image of what i wanna make looks like
http://i7.tinypic.com/6yn68n8.jpg
I'm not sure what else to say.
You have indicated that your "taskbar" is actually implemented as a tear-off menubar.
Menubars have menu items. How did you put the "start" button/menu on it?
Do the same thing to put more buttons on the bar whenever you start a new program. The only difference is that each new menu item doesn't have a sub-menu (so if you were to click it no sub-menu would pop up).
You will have to keep track of which menu item is associated with each running program, so that when it is clicked you can minimize or restore the correct program.
You have indicated that your "taskbar" is actually implemented as a tear-off menubar.
Menubars have menu items. How did you put the "start" button/menu on it?
Do the same thing to put more buttons on the bar whenever you start a new program. The only difference is that each new menu item doesn't have a sub-menu (so if you were to click it no sub-menu would pop up).
You will have to keep track of which menu item is associated with each running program, so that when it is clicked you can minimize or restore the correct program.
Last edited by Duoas; Jan 13th, 2008 at 4:14 pm.
After you start the new application (who's caption is in the variable NewAppTitle, and whose icon is in the variable NewAppIconImage), you will have to use something like the following
You will have to define a Sub named MyMenuStrip_OnClick:
This procedure handles clicks for every button on the taskbar that minimizes/restores a running application. Inside the sub you'll have to check the sender to see which application is supposed to be manipulated.
I am not sure about the name following the 'handles' keyword. I don't have VB and I haven't used it since .NET was introduced. Perhaps someone else here can fix any syntax errors I made...
Hope this helps.
VB Syntax (Toggle Plain Text)
Me.MyMenuStrip.Items.Add( _ NewAppTitle, _ NewAppIconImage, _ New EventHandler( AddressOf MyMenuStrip_OnClick ) _ )
You will have to define a Sub named MyMenuStrip_OnClick:
VB Syntax (Toggle Plain Text)
Private Sub MyMenuStrip_OnClick( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs _ ) Handles MyMenuStripMenuItem.Click 'do stuff here End Sub
I am not sure about the name following the 'handles' keyword. I don't have VB and I haven't used it since .NET was introduced. Perhaps someone else here can fix any syntax errors I made...
Hope this helps.
Last edited by Duoas; Jan 14th, 2008 at 7:32 pm.
![]() |
Similar Threads
- WIN98SE protection (Viruses, Spyware and other Nasties)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Package & Deployment Wizard Setup
- Next Thread: windows 98 progressbar?
Views: 2160 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 access activex add application basic beep beginner c++ calculator cd channel9 click code coffeehouse college column component convert copy creative data database designer desktop dissertations dissertationthesis dissertationtopic edit error excel file filename form grid group hardware icon ide image implements inboxinvb installation installer label list listbox listview liveperson looping macro mail match memory messagebox microsoft nice number open pos prime print printer programmer prompt query random range range-objects readfile reading registration remotesqlserverdatabase report reports retrieve save score search sites sound spectateswamp sql string sum table textbox variable vb vb6 vb6.0 vba vista visual visualbasic web window windows






