473,508 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

My code inexplicably executes while in the IDE

Tom
I've written a validatedTextBox control which inherits
from textBox and among other things checks if the text box
is blank, and colors the background pink and issues an
error message via msgBox if it is. It is in its own DLL
and executes perfectly when I use it.

The mystery is that while I am in the IDE and doing simple
things in the form designer like going from one tab to
another on a tabcontrol (which contains some of my
validatedTextBoxes) my code appears to execute (a textbox
turns pink and I get the msgBox). I'm a newbie and
wouldn't know how to make code execute while using the
form designer if I wanted to, so needless to say I've no
idea what is wrong or how to fix it. I'm not posting the
code because it is pretty long, but if necessary I will.

Just to be clear. I am NOT running the program when this
happens. I am using the form designer. Also, if I set a
breakpoint in where the validatedTextBox does the msgBox,
it does not stop there.

Any suggestions? Thanks
Nov 20 '05 #1
2 950
Could the IDE be running the code from the actual DLL?
"Tom" <an*******@discussions.microsoft.com> wrote in message
news:2a*****************************@phx.gbl...
I've written a validatedTextBox control which inherits
from textBox and among other things checks if the text box
is blank, and colors the background pink and issues an
error message via msgBox if it is. It is in its own DLL
and executes perfectly when I use it.

The mystery is that while I am in the IDE and doing simple
things in the form designer like going from one tab to
another on a tabcontrol (which contains some of my
validatedTextBoxes) my code appears to execute (a textbox
turns pink and I get the msgBox). I'm a newbie and
wouldn't know how to make code execute while using the
form designer if I wanted to, so needless to say I've no
idea what is wrong or how to fix it. I'm not posting the
code because it is pretty long, but if necessary I will.

Just to be clear. I am NOT running the program when this
happens. I am using the form designer. Also, if I set a
breakpoint in where the validatedTextBox does the msgBox,
it does not stop there.

Any suggestions? Thanks

Nov 20 '05 #2
In article <2a*****************************@phx.gbl>, Tom wrote:
I've written a validatedTextBox control which inherits
from textBox and among other things checks if the text box
is blank, and colors the background pink and issues an
error message via msgBox if it is. It is in its own DLL
and executes perfectly when I use it.

The mystery is that while I am in the IDE and doing simple
things in the form designer like going from one tab to
another on a tabcontrol (which contains some of my
validatedTextBoxes) my code appears to execute (a textbox
turns pink and I get the msgBox). I'm a newbie and
wouldn't know how to make code execute while using the
form designer if I wanted to, so needless to say I've no
idea what is wrong or how to fix it. I'm not posting the
code because it is pretty long, but if necessary I will.

Just to be clear. I am NOT running the program when this
happens. I am using the form designer. Also, if I set a
breakpoint in where the validatedTextBox does the msgBox,
it does not stop there.

Any suggestions? Thanks


The control is live in the IDE :) So, you might want to look at the
..DesignMode property to determine if code should be run or not...

If Not Me.DesignMode Then
' do your checks....
End If

HTH
--
Tom Shelton [MVP]
Nov 20 '05 #3

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

Similar topics

7
2773
by: Studio P.M. | last post by:
Dear colleagues, Does anyone have an idea where I could find precise and detailed explanation of each and every statement of the following “Web Form Designer generated code”: #region Web...
4
4379
by: Dennis Sjogren | last post by:
Greetings! First, I'm not 100% sure where to post this question. I use VB.NET for this project, but it's really a design question (a question on which method to use when solving this problem). ...
88
7953
by: Peter Olcott | last post by:
Cab you write code directly in the Common Intermediate language? I need to optimize a critical real-time function.
1
1917
by: Liam.M | last post by:
I currently HAVE a form...a "Summary List" it could be called...which is a contineous form...AND on this form are "Four fields" from EVERY record (each on their own line) so to seak...like a...
1
1355
by: Celldss | last post by:
I have a .Net service (VB - 1.1 SP1) deployed in our environment that is experiencing an odd issue. The service does a series of file & registry based checks, logs to the event log and uploads the...
5
1530
by: Cord-Heinrich Pahlmann | last post by:
Hi, I'm wondering when php executes the code. I have a little script which takes around 10 seconds execution time. In those 10 seconds the script does a lot of mysql_queries and changes some...
28
1805
by: Joey Martin | last post by:
One of my servers got hacked with the SQL injection due to poor coding. So, I had someone write a stored procedure and new code. But, to me, it looks just as flawed, even using the stored...
3
2938
by: Tony Johansson | last post by:
Hello! I'm reading in a book and it says the following. "MSIL(Microsoft Intermediate Language) generated by all the .NET language compilers. This is a common standard for the binary code...
3
3168
by: jonceramic | last post by:
Hi all, I have a form with a sub1 and a sub2. Most everything is working right. Except this. I have a "beforeupdate" and an "afterupdate" event on form sub2. "BeforeUpdate" works great. ...
0
7133
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
7336
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
7405
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
7066
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
7504
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
5643
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 projectplanning, coding, testing,...
1
5059
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...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
435
bsmnconsultancy
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...

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.