473,473 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Navigating embedded UserControl forms inside a Windows Forms Panel

Hi,

I've created a form that has basic navigation functionality. There is
a panel on the main form that contains several UserControl form
objects.

I've added all the forms to the control collection and can quite
happily navigate through displaying the panels as and when I need
them. The issue I have is that when the user clicks on one of my
buttons on the navigation form it will do 1 of two operations based on
the user control that is currently being shown in the panel.

Is there a way to identify what UserControl the panel currently has at
the front? I can't seem to get anything to work...

regards

Emma Middlebrook
Nov 16 '05 #1
1 2518
Hi Emma,

I believe it would be much better to introduce a variable (best of all
having a type of a dedicated enum, say, ActivePanel) and track the active
panel in this variable.
You of course possibly could walk through ZOrder of the controls contained
by the panel, but this looks like a kind of 'hack' to me.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Emma Middlebrook" <em******@hotmail.com> wrote in message
news:9a**************************@posting.google.c om...
Hi,

I've created a form that has basic navigation functionality. There is
a panel on the main form that contains several UserControl form
objects.

I've added all the forms to the control collection and can quite
happily navigate through displaying the panels as and when I need
them. The issue I have is that when the user clicks on one of my
buttons on the navigation form it will do 1 of two operations based on
the user control that is currently being shown in the panel.

Is there a way to identify what UserControl the panel currently has at
the front? I can't seem to get anything to work...

regards

Emma Middlebrook


Nov 16 '05 #2

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

Similar topics

4
by: Jay | last post by:
Hi all, May i know if there is any way by which we can render a given HTML inside .NET Windows Forms? We had the Web Browser controls in Visual Studio 6. Is there a follow-up of that in...
14
by: RL Stevenson | last post by:
What is a reasonable way to manage a complex form with 5 or so tabs with 100 or more controls bound to 5-10 tables in a database? Pasting all those controls, datasets, data adapters directly onto...
0
by: Severino | last post by:
Hi all, I've developed a control derived from System::Windows::Forms::Button I've inserted inside this control some custom property without problems; now I've the need to make persistent the...
2
by: Brendan Miller | last post by:
What can a windows form do that a web form cannot?
1
by: Maya | last post by:
Hello everyone, I have a windows form that has 2 child usercontrols i created and added inside, control1 has a label that displays some text based on activities i do in control2, my question is...
0
by: Filippo Bettinaglio | last post by:
VS2005, C# I have developed a UserControl embedded in a HTML web page. And I can access to the DOM with the following code: HTML page: …….. <BODY onload=loadDoc()> …….
10
by: morangolds | last post by:
Hi, I've been having a problem with C++ Windows Forms apps not "ending" when you close the form window. I've searched about this problem all over the place and most searches have lead me to...
5
by: Reds | last post by:
HI, I have just started using Web Forms. It seems that I'm not able to do some things that Windows Forms allow me to do. For example, I tried to implement a counter using a module level...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
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.