473,881 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User control - remove control at runtime

Visual Studio2002 Framework 1.0

I have userControl which contain some controls
If user remove at runtime remove control from the userControl
especially ComboBox, it is not possible to close the form !
Form does not react on clicking on the right upper corner.
Is there some solution for this to avoid this behavior.

I tryed to remove focus from the control before removing but it helps
only is some cases.

Thanks for help
Tomas Oplt

Tel: 603 171893
Mail: to********@sezn am.cz
Nov 20 '05 #1
1 1811
* "Tomas Oplt" <kk*****@volny. cz> scripsit:
Visual Studio2002 Framework 1.0

I have userControl which contain some controls
If user remove at runtime remove control from the userControl
especially ComboBox, it is not possible to close the form !
Form does not react on clicking on the right upper corner.
Is there some solution for this to avoid this behavior.

Maybe the famous "form close bug"?

C# code to repro the close bug:

<http://www.jelovic.com/binaries/WindowsFormsClo seBugDemo.zip>

Some information on the bug:

<http://makeashorterlin k.com/?T2FC26194>

Fixed in .NET 1.1.

Herfried K. Wagner [MVP]
Nov 20 '05 #2

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

Similar topics

by: Jeff Schaefer | last post by:
What I want to know is this: Is it possible to programmatically manipulate a custom property of a user control for which <%@ OutputCache ... > has been included? If so, then how? My brief code is at the end of this message. The Microsoft documentation is a bit confusing to me. The following numbered sentences appear in the .NET Framework Developer's Guide article titled "Caching Portions of an ASP.NET Page": 1. You can declare an ID...
by: Guadala Harry | last post by:
Is there any way for one Session to remove and update objects in another Session? I seriously doubt it, but thought I'd ask. Here's why: I have some data that is unique per user (or per session - similar to "welcome back, Jim" after Jim logs in) and consumed across multiple pages. This "per user" data lives in a database, so toward improving runtime performance I want to cache data supporting this and similar per user features. Because the...
by: Smithers | last post by:
I have a non trivial ASP.NET Web application that implements its navigation system via a user control (menu.ascx) placed on every page. It is important to note that the user control that hosts the menu is injected into every page at runtime when the page is requested (i.e., it's not declared in any ASPX). The user control contains a menu that is dynamically populated and styled at runtime (fwiw: it's ComponentArt's Menu for ASP.NET -...
by: Ben Amada | last post by:
Hello, A partner is going to be creating some HTML files that I plan on converting to user controls (UC) and dynamically load at runtime. I'm guessing Visual Studio doesn't come with some utililty to convert HTML files to UCs? IOW, I'll have to manually convert each HTML file to a UC? I've never used user controls before, so I'm wondering what I need to add and remove to each UC (or HTML file) to make this work. For instance, I...
by: Charles Law | last post by:
I have a form on which user controls are placed at runtime. When a control is added to the form a handler is added for an event that a high-level object raises, which must be handled by the new control. When I close the form I am expecting that the control ceases to be. However, if my object raises the event after the form has been closed, I find that there is still a user control object that handles it. Clearly the user control has not...
by: Rimpinths | last post by:
I'm new at developing user controls in C#, and one thing I've noticed right off the bat is that the constructor gets called twice -- once at design time, once at run time. In short, I'm trying to develop a control derived from DataGridView. It will have a default set of columns (but I don't want to create them via the Properties window for various reasons) so I added a call to a method AddColumns() in the constructor. But the columns end...
by: timnels | last post by:
I have an issue where I have a user control that is launched into a floating form. At some point later, I allow the user to "unfloat" the user control by reparenting it on a split container in another form. Problem is if I wake a tooltip when the window is floated, and then try the same thing when it is reparented, the app crashes with " Cannot access a disposed object.Object name: 'Form'. Presumably, this is a result of the tooltips...
by: wildThought | last post by:
I have a window with a user control on it. I want to be able to swap out different user controls depending on a menu choice. The swappable user controls UserControlBaseA and UserControlBaseB are inherited from UserControlBase. What I did is I placed UserControlBase on my window and it has a name of uc1. Now when the window loads or if the user chooses a different user control from the menu I want to change the assignment of uc1. ...
by: Aussie Rules | last post by:
Hi, Is there a way to have a screen/form designer functionality in a vb.net2008 program for the end user to use ? I want to be able to distribute my application, and allow the end user to make change to my forms to suit there needs, or perhaps even create there own to display certian information. Thanks
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.