Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
GeneralRe: String Pin
Heath Stewart7-May-04 4:25
protectorHeath Stewart7-May-04 4:25 
GeneralRe: String Pin
Jeff Varszegi7-May-04 4:45
professionalJeff Varszegi7-May-04 4:45 
GeneralRe: String Pin
Heath Stewart7-May-04 4:47
protectorHeath Stewart7-May-04 4:47 
GeneralRe: String Pin
Bitwise Gamgee10-May-04 4:51
Bitwise Gamgee10-May-04 4:51 
GeneralAdvance Toolbar control in C# Pin
lawtoyou7-May-04 1:03
lawtoyou7-May-04 1:03 
GeneralRe: Advance Toolbar control in C# Pin
Heath Stewart7-May-04 3:24
protectorHeath Stewart7-May-04 3:24 
GeneralRe: Advance Toolbar control in C# Pin
lawtoyou7-May-04 3:33
lawtoyou7-May-04 3:33 
GeneralRe: Advance Toolbar control in C# Pin
Heath Stewart7-May-04 3:41
protectorHeath Stewart7-May-04 3:41 
It's not hard. This is what development is about - researching problems and solutions, designing the solution, and then writing the solution.

Simply define an interface, like IToolBarProvider which has a property or method that takes a ToolBar as a param. Your WinParentForm would implement this interface. WinMainForm - in an override to OnMdiChildActive for example - would reset the toolbar back to the default, determine if the child window class implements the interface, then passes the toolbar to the implementation for it to modify, something like this:
protected override void OnMdiChildActivate(EventArgs e)
{
  base.OnMdiChildActivate(e);
  IToolBarProvider tbProvider = ActiveMdiChild as IToolBarProvider;
  if (tbProvider != null) tbProvider.ModifyToolBar(ToolBar tb);
}
In a separate DLL project (or the one that already defines the MdiParentForm, define the interface like so:
public interface IToolBarProvider
{
  void ModifyToolBar(ToolBar tb);
}
It's a very simplistic example, but you should get the idea and explore it further.

 

Microsoft MVP, Visual C#
My Articles
GeneralMobile phone controlling... Pin
mikker_1236-May-04 23:34
mikker_1236-May-04 23:34 
GeneralRe: Mobile phone controlling... Pin
Heath Stewart7-May-04 3:17
protectorHeath Stewart7-May-04 3:17 
GeneralRe: Mobile phone controlling... Pin
OMalleyW7-May-04 4:56
OMalleyW7-May-04 4:56 
GeneralRe: Mobile phone controlling... Pin
Heath Stewart7-May-04 4:57
protectorHeath Stewart7-May-04 4:57 
GeneralRe: Mobile phone controlling... Pin
OMalleyW7-May-04 10:09
OMalleyW7-May-04 10:09 
GeneralRe: Mobile phone controlling... Pin
Heath Stewart7-May-04 10:12
protectorHeath Stewart7-May-04 10:12 
GeneralRe: Mobile phone controlling... Pin
OMalleyW7-May-04 10:18
OMalleyW7-May-04 10:18 
GeneralRe: Mobile phone controlling... Pin
mikker_1238-May-04 2:21
mikker_1238-May-04 2:21 
GeneralRe: Mobile phone controlling... Pin
Heath Stewart8-May-04 19:22
protectorHeath Stewart8-May-04 19:22 
GeneralRe: Mobile phone controlling... Pin
mikker_1238-May-04 23:50
mikker_1238-May-04 23:50 
GeneralRe: Mobile phone controlling... Pin
Heath Stewart9-May-04 2:26
protectorHeath Stewart9-May-04 2:26 
GeneralDisabling character in combo box Pin
DougW486-May-04 20:43
DougW486-May-04 20:43 
GeneralRe: Disabling character in combo box Pin
Aryadip6-May-04 23:04
Aryadip6-May-04 23:04 
GeneralRe: Disabling character in combo box Pin
DougW486-May-04 23:30
DougW486-May-04 23:30 
GeneralRe: Disabling character in combo box Pin
Heath Stewart7-May-04 3:14
protectorHeath Stewart7-May-04 3:14 
GeneralPopulating TreeViews with data acquired from void static callback methods Pin
inyoursadachine6-May-04 17:20
inyoursadachine6-May-04 17:20 
GeneralRe: Populating TreeViews with data acquired from void static callback methods Pin
Heath Stewart6-May-04 18:16
protectorHeath Stewart6-May-04 18:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.