473,322 Members | 1,614 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,322 software developers and data experts.

ShowInTaskBar change raises user control load event

I have a main form (Form1) which opens a second form (Form2) when a button
is clicked. Form2 has .FormBorderStyle set to FixedSingle.

Form2 contains two buttons, one which unpins it from Form1 by setting
..ShowInTaskBar to true,
and setting .Owner to false. The other buttons click event reverses, this
by setting .Owner to the
form1 instance, and .ShowIntTaskBar to false.

This all works fine, with Form2appearing in the taskbar and the alt tab list
as expected.

The problem is that Form2 also contains a user control, who's Load event is
fired each time either button is clicked.
This problem is triggered by the change to the .ShowInTaskBar property, not
the .Owner property.

The load event of the hosted form is not triggered, just any hosted user
controls.

I have two questions...
1. Is this expected behavior. ( i can find no mention of this anywhere )
2. Is there a way to prevent this from occurring other than resorting to
setting a global flag which can be tested in
each user controls load event. In reality I have lots of user controls, so
this is not a very appealing option.

Any help or insight would be greatly appreciated.

Cheers.
Nov 22 '05 #1
0 850

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

Similar topics

0
by: ptass | last post by:
I have a main form (Form1) which opens a second form (Form2) when a button is clicked. Form2 has .FormBorderStyle set to FixedSingle. Form2 contains two buttons, one which unpins it from Form1...
0
by: Machi | last post by:
I am using C#.NET. API version showintaskbar form Window taskbar hide show not fire events MouseLeave and MouseEnter! Now i am facing a critical problem for MouseLeave and MouseEnter event when i...
1
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a...
1
by: Charles A. Lackman | last post by:
Hello, I have created a User Control within Visual Studio and it contains a button that allows the user to querry a database. I dynamically add additional controls to the page based on the...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
0
by: John Smith | last post by:
I still have not gotten this damn thing figured out and I'm asking for help one last time before I give up on it. I have a user control that contains a paged gridview control. The master page...
0
by: davidr | last post by:
Hi, I have a panel that I load user Control in no problem. The problem arrises when I do a post back on one of these user controls. I have button it does a click event. In this click event I...
1
by: John Dalberg | last post by:
What causes a server event to fire when something happens on the client? Say a user changed the gridview's page index, the server side PageIndexChanged event is fires. What makes...
0
by: Dave A | last post by:
I have a user control that is dynamically loaded into a repeater; (so the user control appears several times) The user control features a text box and a delete button. When the delete button...
3
balabaster
by: balabaster | last post by:
I've got a user control that builds a table of dynamic data based on a :LINQ class holding the data. The data is loaded using the LoadData(DataInstance) method. The table it builds contains a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.