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.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
If what you want is something: 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")
then you need to add a new menu item to your menu bar/menustrip/taskbar when the new program is executed.
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.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
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.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
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
Me.MyMenuStrip.Items.Add( _
NewAppTitle, _
NewAppIconImage, _
New EventHandler( AddressOf MyMenuStrip_OnClick ) _
)
You will have to define a Sub named MyMenuStrip_OnClick:
Private Sub MyMenuStrip_OnClick( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles MyMenuStripMenuItem.Click
'do stuff here
End Sub
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.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229