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

Every once in a while a usercontrol will disappear from the form

I have a usercontrol I created on a form.

Every once in a while it will disappear from the form but the statement
Friend WithEvents ControlText1...
is still there but the rest of the windows created statements relating to it
have disappeared!

Real pain as I then have to replace the control on the form and reset the
properties.

Is there any help for this?
Nov 21 '05 #1
2 1203

" Just Me" <gr****@a-znet.com> wrote in message
news:O8**************@TK2MSFTNGP10.phx.gbl...
I have a usercontrol I created on a form.

Every once in a while it will disappear from the form but the statement
Friend WithEvents ControlText1...
is still there but the rest of the windows created statements relating to
it have disappeared!

Real pain as I then have to replace the control on the form and reset the
properties.

Is there any help for this?


I have had this same thing happen to me as well. I noticed that in one
instance it is happening because I was trying to set some data in
Control_Load that in design mode didn't exist. This caused the above
result. If I checked if I was in design mode or not I was able to stop this
behavior.
Nov 21 '05 #2
I just did that this morning because I got a message box in place of the
control I tried to place that said an object wasn't define in the paint
event for one of the controls on the control.

So I added:
if designmode then exit sub
in that routine and a couple of others that I thought might get called in
design mode.

I don't know if that's the end of these problems but it fixed it for now.

Thanks a lot

"jjardine" <jj******@bellsouth.net> wrote in message
news:e0**************@TK2MSFTNGP14.phx.gbl...

" Just Me" <gr****@a-znet.com> wrote in message
news:O8**************@TK2MSFTNGP10.phx.gbl...
I have a usercontrol I created on a form.

Every once in a while it will disappear from the form but the statement
Friend WithEvents ControlText1...
is still there but the rest of the windows created statements relating to
it have disappeared!

Real pain as I then have to replace the control on the form and reset the
properties.

Is there any help for this?


I have had this same thing happen to me as well. I noticed that in one
instance it is happening because I was trying to set some data in
Control_Load that in design mode didn't exist. This caused the above
result. If I checked if I was in design mode or not I was able to stop
this behavior.

Nov 21 '05 #3

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

Similar topics

40
by: findmadhav | last post by:
I need a program in C (something like a TSR) which will automatically press the function key F6, say about every 5 seconds. Can anyone provide me with an exe of such a program? Thanks in advance.
1
by: Tiago Barbutti | last post by:
I have a UserControl that execute methods in Load event, but it hapens in designMode and generate an error and the control disappear from the form. I read that i can use the DesignMode to kwnow...
2
by: Carlo Marchesoni | last post by:
I have a UserControl that builds a Tree-View Menu using Javascript. This UC does not run as a ServerControl Then, in every aspx page I include this UC. Everything works perfect, except that if I...
2
by: Lau Lei Cheong | last post by:
Hello, I'm writing a usercontrol that contains a property named "disabled". It is set to false by default but there is also another button in the usercontrol that'll set it to true. On the...
1
by: Hai Nguyen | last post by:
Hi all I created a user control called temp1.ascx which contains several textboxes and a button. I also have a webform name Web1.aspx. In the web form Web1.ascx, I have this code...
0
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852...
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...
0
by: Fabio Cannizzo | last post by:
I have solution (mySolution) with 2 projects (myDLL and myEXE). The DLL contains a control (myControl) inheriting from Windows.Forms.UserControl. The output DLL is created in the dircetory...
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
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...
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...

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.