Thank you, Nick.
Thank you, Nick.
Wow! That's good!
I've always been looking for that stuff but I did not found thing... thanks![]()
I know I shouldn't post questions in existing threads, but this only applies to the Customizable Strips code.
The problem I'm having pertains to using Customizable Strips and MDI forms. My limited knowledge of MDI apps tells me that when the child form is maximized, it's menu is merged with the parent's menu. Using the standard MenuStrips doesn't cause any problems. However, using the Customizable Strips the menus don't seem to merge at all. The first attached image shows what I mean (I boxed out sensitive information). The child form's title bar is not merged with the main form's menu bar.
The second attached image is a normal MDI app using the standard Menu Strips.
That menu on the first image doesn't look like a MenuStrip control, isn't it the old Menu or MenuBar control or something like that? I don't think you can merge MenuStrips and MenuBars.
If it is indeed a regular MenuStrip (eg: the only thing you changed is replacing the CustomizableMenuStrip with the regular MenuStrip on your child form) then I have no clue. The Customizable___ controls have hardly any custom code as you can see, I don't touch the merging capabilities at all, all I do is change their Renderer property on the fly.
Controls:
*NEW* OptionsView control with rich design-time support - MonthPicker - Validators for Winforms - Double TrackBar - Editable ListBox - Outlook Navigation Bar - ColorListBox with images - Advanced ToolStripContainer - RadioButtonGroup Control - Expandable Groupbox - Wizard Template Usercontrol (full Design-time support!) ... Now with Aero Glass support! - 3D Separator - ListView Options Screen - TabControl with tab-specific ContextMenuStrips and Tab-Dragging
Menustrip and Toolstrip Renderers:
Visual Studio 2010 - Customizable Menu/ToolStrip (incl Office 2007 + all Office 2003 styles) - Office 2007 - Visual Studio 2008 - [WIP]Vista Toolstrip
Misc:
*NEW* Thread safe property setting extension - Cup(Of T) - Snapping windows - *UPDATED* Advanced Shape Editor like Visual Studio - ByVal vs ByRef and value types vs reference types - Game Of Life - OOP Tic Tac Toe game example - Moving and Resizing a Control or a Borderless Form, using SendMessage (smooth) - Manual 'MDI Window List' menu - Tabbed MDI Text Editor - Very Extensive MDI text editor - Real Synchronized RichTextBox scrolling - Notepad-like New/Open/Save/SaveAs/Exit behaviour
Well I feel silly. When I changed the MenuStrip from standard to customizable, the MainMenuStrip property of the Parent Form was set to nothing. Setting this property to the CustomizableMenuStrip solved everything.
Hi Nick,
a question to you about CustomizableStatusstrip:
when you choose the colorscheme black for instance then should be the forecolor of the texts in 'white'.
How can I do that?...
Dietrich
Not sure. If the ColorTables don't have any properties for the text forecolor than I'd say you can't force that color. You'd just have to set it for each 'control' on the strips manually (I think they should have a Forecolor property?).
Controls:
*NEW* OptionsView control with rich design-time support - MonthPicker - Validators for Winforms - Double TrackBar - Editable ListBox - Outlook Navigation Bar - ColorListBox with images - Advanced ToolStripContainer - RadioButtonGroup Control - Expandable Groupbox - Wizard Template Usercontrol (full Design-time support!) ... Now with Aero Glass support! - 3D Separator - ListView Options Screen - TabControl with tab-specific ContextMenuStrips and Tab-Dragging
Menustrip and Toolstrip Renderers:
Visual Studio 2010 - Customizable Menu/ToolStrip (incl Office 2007 + all Office 2003 styles) - Office 2007 - Visual Studio 2008 - [WIP]Vista Toolstrip
Misc:
*NEW* Thread safe property setting extension - Cup(Of T) - Snapping windows - *UPDATED* Advanced Shape Editor like Visual Studio - ByVal vs ByRef and value types vs reference types - Game Of Life - OOP Tic Tac Toe game example - Moving and Resizing a Control or a Borderless Form, using SendMessage (smooth) - Manual 'MDI Window List' menu - Tabbed MDI Text Editor - Very Extensive MDI text editor - Real Synchronized RichTextBox scrolling - Notepad-like New/Open/Save/SaveAs/Exit behaviour
Hello dear,
I am having a problem while I try to add these files in a vb class library project and recieve a lot of errors like 'Error 101 Type 'Color' is not defined.
' . As i am a newbie in VB.Net and have no clue how to deal with these errors. M i missing something to add ? Can someone help me n this![]()
I'd want to implement your AppearanceControl -it's nice, but when I set a form for your AppearaceEditor it requires a parameter (ap) (I downloaded CustomizableStripsLibrary.zip ). What does it mean and what must I do?
Alex
Most likely you don't have a reference to System.Drawing, which includes the System.Drawing.Drawing2D namespace in which the Color type exists. You mention a Class Library project which indeed by default does not have this reference, so all you need to do is add a reference to System.Drawing and then correct the errors by hovering over them (in the code editor, not the error list), clicking the little button that pops up and following the instructions.
Not sure what you mean, what does "set a form for your AppearanceEditor" mean?
Controls:
*NEW* OptionsView control with rich design-time support - MonthPicker - Validators for Winforms - Double TrackBar - Editable ListBox - Outlook Navigation Bar - ColorListBox with images - Advanced ToolStripContainer - RadioButtonGroup Control - Expandable Groupbox - Wizard Template Usercontrol (full Design-time support!) ... Now with Aero Glass support! - 3D Separator - ListView Options Screen - TabControl with tab-specific ContextMenuStrips and Tab-Dragging
Menustrip and Toolstrip Renderers:
Visual Studio 2010 - Customizable Menu/ToolStrip (incl Office 2007 + all Office 2003 styles) - Office 2007 - Visual Studio 2008 - [WIP]Vista Toolstrip
Misc:
*NEW* Thread safe property setting extension - Cup(Of T) - Snapping windows - *UPDATED* Advanced Shape Editor like Visual Studio - ByVal vs ByRef and value types vs reference types - Game Of Life - OOP Tic Tac Toe game example - Moving and Resizing a Control or a Borderless Form, using SendMessage (smooth) - Manual 'MDI Window List' menu - Tabbed MDI Text Editor - Very Extensive MDI text editor - Real Synchronized RichTextBox scrolling - Notepad-like New/Open/Save/SaveAs/Exit behaviour
I do new Windows Form project and the first form of this project invokes another form (the frmAppearanceEditor ), but the last requires a parameter (ap).
So you are trying to use the frmAppearanceEditor form manually, for your own use? Why? That form is used by the AppearanceControl when you open the Custom appearance property, it shows the preview and the property grid used to set the colors. You shouldn't use it for your own application.
Are you trying to allow your customers to customize the application themselves? If so, I might be able to find some help for you but simply using that form is not the way to go in this case I think, there's a lot of logic in there that involves the design-time serialization of the colors which you don't need during run-time.
Controls:
*NEW* OptionsView control with rich design-time support - MonthPicker - Validators for Winforms - Double TrackBar - Editable ListBox - Outlook Navigation Bar - ColorListBox with images - Advanced ToolStripContainer - RadioButtonGroup Control - Expandable Groupbox - Wizard Template Usercontrol (full Design-time support!) ... Now with Aero Glass support! - 3D Separator - ListView Options Screen - TabControl with tab-specific ContextMenuStrips and Tab-Dragging
Menustrip and Toolstrip Renderers:
Visual Studio 2010 - Customizable Menu/ToolStrip (incl Office 2007 + all Office 2003 styles) - Office 2007 - Visual Studio 2008 - [WIP]Vista Toolstrip
Misc:
*NEW* Thread safe property setting extension - Cup(Of T) - Snapping windows - *UPDATED* Advanced Shape Editor like Visual Studio - ByVal vs ByRef and value types vs reference types - Game Of Life - OOP Tic Tac Toe game example - Moving and Resizing a Control or a Borderless Form, using SendMessage (smooth) - Manual 'MDI Window List' menu - Tabbed MDI Text Editor - Very Extensive MDI text editor - Real Synchronized RichTextBox scrolling - Notepad-like New/Open/Save/SaveAs/Exit behaviour
Sorry for my misunderstanding. I thought this is a standalone application.
How can I use it? When I press a button with three dots (in property window) against of the Customappearance property of Appearance it happens nothing (previously I select in Appearance preset=custom)That form is used by the AppearanceControl when you open the Custom appearance property, it shows the preview and the property grid used to set the colors.
I'm not sure, if you drag an AppearanceControl to your form (in design-time) and then press the [...] button in the property grid for the CustomAppearance property, the editor as shown in the third screenshot (of the opening post) should show and you should be able to select your colors.
Controls:
*NEW* OptionsView control with rich design-time support - MonthPicker - Validators for Winforms - Double TrackBar - Editable ListBox - Outlook Navigation Bar - ColorListBox with images - Advanced ToolStripContainer - RadioButtonGroup Control - Expandable Groupbox - Wizard Template Usercontrol (full Design-time support!) ... Now with Aero Glass support! - 3D Separator - ListView Options Screen - TabControl with tab-specific ContextMenuStrips and Tab-Dragging
Menustrip and Toolstrip Renderers:
Visual Studio 2010 - Customizable Menu/ToolStrip (incl Office 2007 + all Office 2003 styles) - Office 2007 - Visual Studio 2008 - [WIP]Vista Toolstrip
Misc:
*NEW* Thread safe property setting extension - Cup(Of T) - Snapping windows - *UPDATED* Advanced Shape Editor like Visual Studio - ByVal vs ByRef and value types vs reference types - Game Of Life - OOP Tic Tac Toe game example - Moving and Resizing a Control or a Borderless Form, using SendMessage (smooth) - Manual 'MDI Window List' menu - Tabbed MDI Text Editor - Very Extensive MDI text editor - Real Synchronized RichTextBox scrolling - Notepad-like New/Open/Save/SaveAs/Exit behaviour
I do all as you say but...
Success! All I need - to compile the project.
But the button "Save" doesn't work- gives an error. It text rather long but cuncludes with phrase "frmAppearanceEditor 93 line"
this line is selected by red
Code:Public Sub SaveAppearance(ByVal xmlFile As String, ByVal ac As AppearanceControl) Try Using fs As New FileStream(xmlFile, FileMode.Create, FileAccess.Write, FileShare.None) Dim ser As New XmlSerializer(GetType(AppearanceControl.AppearanceProperties)) ser.Serialize(fs, ac.CustomAppearance) fs.Close() End Using Catch ex As Exception MessageBox.Show(ex.ToString) End Try End Sub
Hi Nick,
I try to use the ContextMenustrip.
The situation:
A MDI-Cildform with a Datagridview and I want to show the Contextmenustrip at Mousedownevent. The menu shows but not at mouseposition but rather in the left upper corner of the screen...
What's wrong?
Regards-
Dietrich
I doubt it has something to do with my custom ContextMenuStrip, because all it does is set the Renderer property. Try replacing it with a regular ContextMenuStrip and see if that does the same thing?
Controls:
*NEW* OptionsView control with rich design-time support - MonthPicker - Validators for Winforms - Double TrackBar - Editable ListBox - Outlook Navigation Bar - ColorListBox with images - Advanced ToolStripContainer - RadioButtonGroup Control - Expandable Groupbox - Wizard Template Usercontrol (full Design-time support!) ... Now with Aero Glass support! - 3D Separator - ListView Options Screen - TabControl with tab-specific ContextMenuStrips and Tab-Dragging
Menustrip and Toolstrip Renderers:
Visual Studio 2010 - Customizable Menu/ToolStrip (incl Office 2007 + all Office 2003 styles) - Office 2007 - Visual Studio 2008 - [WIP]Vista Toolstrip
Misc:
*NEW* Thread safe property setting extension - Cup(Of T) - Snapping windows - *UPDATED* Advanced Shape Editor like Visual Studio - ByVal vs ByRef and value types vs reference types - Game Of Life - OOP Tic Tac Toe game example - Moving and Resizing a Control or a Borderless Form, using SendMessage (smooth) - Manual 'MDI Window List' menu - Tabbed MDI Text Editor - Very Extensive MDI text editor - Real Synchronized RichTextBox scrolling - Notepad-like New/Open/Save/SaveAs/Exit behaviour
I do it this way now:
But the next problem is in designtime. The menustrip has thre items, each with an image. When I change an image then in runtime the strip shows the old image further on...Code:ctms.Show(New Point(Cursor.Position.X + Cursor.Size.Width / 2, _ Cursor.Position.Y + Cursor.Size.Height / 2))
Dietrich
That's not really the normal way to show a contextmenustrip, usually you use assign it to the ContextMenuStrip property of the control you want it to show for, and it will show on a right-click.
As for your image problem, I'm not sure. Try closing the form in the designer, saving the solution, closing Visual Studio and finally deleting the bin and obj folders from the project. Then open it again and Build the solution, that might fix it. But that's just speculation, it's the first thing you should try when you see some strange behavior like that.
Still, you didn't answer my most important question: does the same happen (for both problems) if you use a regular ContextMenuStrip instead of my custom one? If it does, then the problem is not my custom ContextMenuStrip.
Controls:
*NEW* OptionsView control with rich design-time support - MonthPicker - Validators for Winforms - Double TrackBar - Editable ListBox - Outlook Navigation Bar - ColorListBox with images - Advanced ToolStripContainer - RadioButtonGroup Control - Expandable Groupbox - Wizard Template Usercontrol (full Design-time support!) ... Now with Aero Glass support! - 3D Separator - ListView Options Screen - TabControl with tab-specific ContextMenuStrips and Tab-Dragging
Menustrip and Toolstrip Renderers:
Visual Studio 2010 - Customizable Menu/ToolStrip (incl Office 2007 + all Office 2003 styles) - Office 2007 - Visual Studio 2008 - [WIP]Vista Toolstrip
Misc:
*NEW* Thread safe property setting extension - Cup(Of T) - Snapping windows - *UPDATED* Advanced Shape Editor like Visual Studio - ByVal vs ByRef and value types vs reference types - Game Of Life - OOP Tic Tac Toe game example - Moving and Resizing a Control or a Borderless Form, using SendMessage (smooth) - Manual 'MDI Window List' menu - Tabbed MDI Text Editor - Very Extensive MDI text editor - Real Synchronized RichTextBox scrolling - Notepad-like New/Open/Save/SaveAs/Exit behaviour
Excuse me...
Also a 'normal' ContextMenustrip doesn't show the normal way, don't know why...
But with my shown method all functions with CustomContextMenustrip, That's OK.
Dietrich
Well, if the normal ContextMenuStrip doesn't behave as you want either then the problem is not my CustomContextMenuStrip. Perhaps you'd be better off posting the problem in the regular forum where you will get a lot more help. If it turns out to be a problem with my custom ContextMenuStrip I can take a look at it, but I doubt it.
Controls:
*NEW* OptionsView control with rich design-time support - MonthPicker - Validators for Winforms - Double TrackBar - Editable ListBox - Outlook Navigation Bar - ColorListBox with images - Advanced ToolStripContainer - RadioButtonGroup Control - Expandable Groupbox - Wizard Template Usercontrol (full Design-time support!) ... Now with Aero Glass support! - 3D Separator - ListView Options Screen - TabControl with tab-specific ContextMenuStrips and Tab-Dragging
Menustrip and Toolstrip Renderers:
Visual Studio 2010 - Customizable Menu/ToolStrip (incl Office 2007 + all Office 2003 styles) - Office 2007 - Visual Studio 2008 - [WIP]Vista Toolstrip
Misc:
*NEW* Thread safe property setting extension - Cup(Of T) - Snapping windows - *UPDATED* Advanced Shape Editor like Visual Studio - ByVal vs ByRef and value types vs reference types - Game Of Life - OOP Tic Tac Toe game example - Moving and Resizing a Control or a Borderless Form, using SendMessage (smooth) - Manual 'MDI Window List' menu - Tabbed MDI Text Editor - Very Extensive MDI text editor - Real Synchronized RichTextBox scrolling - Notepad-like New/Open/Save/SaveAs/Exit behaviour