473,320 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Dynamically Adding ToolBar, and Buttons on MDI Child Window.

Anybody have code to add a ToolBar, and its buttons to a MDI Child window.
I have added the Toolbar, and added the buttons, but how do you determine
what the button is going to execute upon the user clicking it. How do you
add this code dynamically?

Byron...
Nov 21 '05 #1
3 2153
Byron,

I don't see what in this the MDI child is important.

I do the toolbar by setting a value in the tag field and set a select case
for the toolbar event than.

\\\
Toolbar event
Select case e.button.Tag
case mybutton1
case mybutton2
End Select
///

I hope this helps?

Cor


Nov 21 '05 #2
I didn't express myself correctly, I am currently trying to figure out how
to actuall add the ToolBar, Buttons, and the code to handle the clicks.

Like ...
oWndMdi = NewMdi()
oToolBar = BuildBar()
oWndMdi.Controls.Add(oToolBar)

I am attemption to create some reusable code where I create the MDB Shell in
the visual editor, but the child dialogs are created during runtime and can
vary depending on the requirements. In another language I use the function
to be executed by the button is saved in a codeblock variable which is a
part of the button object, so dynamically adding buttons is easy, how do you
build this code to handle the button clicks where you may be createing
several Mdi Child windows, each of which will need their own button click
handler.

Byron...

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u7**************@TK2MSFTNGP15.phx.gbl...
Byron,

I don't see what in this the MDI child is important.

I do the toolbar by setting a value in the tag field and set a select case
for the toolbar event than.

\\\
Toolbar event
Select case e.button.Tag
case mybutton1
case mybutton2
End Select
///

I hope this helps?

Cor

Nov 21 '05 #3
Byron,

What your telling sounds directly a usercontrol.

http://msdn.microsoft.com/library/de...sercontrol.asp

I hope this helps?

Cor
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Picho | last post by:
Hi all, Is there any .NET way (I am not rulling out API usage) to add button(s) to a form's title bar? I found some non-.NET solutions that did actually work in VB6 but not in the ..NET...
0
by: RussC | last post by:
My C# app has a toolbar with 12 or so buttons on it, all created via the designer. In some circumstances we need to add one or two buttons to it dynamically. I have code that does this and it...
5
by: anthony.duerr | last post by:
I have encountered a problem (most certainly a .NET bug), that, for the life of me, I cannot figure out how to work around. Using Visual Studio 2003, with enabled XP Visual Styles. There are...
4
by: Harry | last post by:
Hello, I have a page with a RadioButtonList and a PlaceHolder control. The RadioButtonList's AutoPostBack attribute is set to TRUE and its SelectedIndexChanged event loads one of three...
6
by: Juan Pedro Gonzalez | last post by:
I wanted to add a Combobox to a toolbar... Kind of the look you get on VisualStudio's toolbar. I've been able to find some VB 6 samples, but the placeholder option is no longer available for...
3
by: Ellis Yu | last post by:
Dear all, I want to have a toolbar in the main (central) form of an MDI application. All child forms have 5 common buttons for specific jobs like SAVE, NEW etc. So when the user is in the child...
1
by: Sudhakara.T.P. | last post by:
Hi All, I have an Windows Application in which I have an MDI form and some child forms. I am assigning the parent window for the child forms using the code frmTest1.mdiparent=me Now in the...
1
by: Grant | last post by:
Hi, I am looking for a tip. I have a panel and a checkbox. When I check the checkbox, I would like to add buttons to the panel (dynamically). When the checkbox is unchecked, the buttons should...
0
by: Ryan Liu | last post by:
Hi, I have this inconsistent problem for days and really get me exhausted. I have a user control with a datagrid, a small toolbar, a label and a text box on it. Toolbar has buttons to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.