473,471 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

UserControl purpose question ...

I'm implementing a Windows application in C# .Net 2.0. On many
of the forms I need to have record navigation capabilities
(forwards, backwards, first, last etc) which I chose a to do
with a toolbar containg 7 buttons or so.

1. Rather than recreating the same toolbar (navBar) in the dozen
or so locations I need it, is this a case where I could use
the UserControl?

2. Regardless, is it a simple matter to make the UserControl
accessible in the forms design mode?

Thanks,

- Jamie
Jun 1 '07 #1
1 1062
In this case easier way is to subclass form with toolbar.

Suppose you create form with toolbar ToolForm. Derive your other forms from
it.

class MyNewForm : ToolForm {
....
}

You might need to add properties to ToolForm to get to events for toolbar
buttons, but it should not cause any difficulties.

UserControl itself is placeholder where you put additional controls. Then
you should put it on corresponding form. Slightly more and unnecessarily
complex for your case and with design hassles (positioning, attaching events
etc.).

HTH
Alex

"Jamie Risk" <risk.#.@intectus.comwrote in message
news:OG**************@TK2MSFTNGP06.phx.gbl...
I'm implementing a Windows application in C# .Net 2.0. On many of the
forms I need to have record navigation capabilities (forwards, backwards,
first, last etc) which I chose a to do with a toolbar containg 7 buttons
or so.

1. Rather than recreating the same toolbar (navBar) in the dozen
or so locations I need it, is this a case where I could use
the UserControl?

2. Regardless, is it a simple matter to make the UserControl
accessible in the forms design mode?

Thanks,

- Jamie

Jun 1 '07 #2

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

Similar topics

2
by: Sascha | last post by:
Hi there, I searched carefully through the web before finally deciding to post this message, because I could not find a solution for my problem. Hopefully someone will have a hint or explanation...
1
by: Agnes | last post by:
I create my own usercontrol which is , my purpose is set all textbox's font into the same. Now , I can do it by using the following code Protected Overrides Sub InitLayout() Me.Font = New...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
9
by: Marcelo Cabrera | last post by:
Hi, I have a user control that in turn creates a bunch of webcontrols dynamically and handles the events these webcontrols raise. It used to work fine on ASP .Net 1.1 but when compiled on 2.0 it...
2
by: Mark Collard | last post by:
The ToolBar control allows you to add toolbar buttons. When you add a button, the button is not only displayed in the toolbar, but also added as a separator control in the form/usercontrol your...
6
by: MeowCow | last post by:
I have created a UserControl that encapsulates a third party data grid. My goal was to create my own DataSource and DataMember properties that forward the binding to the third party grid, then use...
3
by: arncota | last post by:
Hi, I created a UserControl, and created its UI with the designer. Next, I wanted to create a subclass of that UserControl, with a new UI. But when I open it in the designer, I see the UI...
3
by: Frank Rizzo | last post by:
In the WinForms context.
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.