In Vb6, there was a feature called (I think) watchpoint. You could set it
to break on a condition, such as when a control's Visible property was
changed.
I can't find this sort of breakpoint in VB.Net, is it there?
If not, I have a fairly complex project where a text box which is supposed
to be invisible is being set Visible somewhere. I've searched, and there
isn't any code doing it directly (e.g. txtPhone.Visible = True). I think
there's probably some code walking through the controls collection, setting
everything to visible, or something like that.
How could I track this type of siutation down without VB6's watchpoints?
Thanks,
---Selden 7 2024
Check the properties of a breakpoint. Create a breakpoint, right click it
and select properties. You should see a condition option.
Telmo Sampaio
"Selden McCabe" <se*****@msn.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl... In Vb6, there was a feature called (I think) watchpoint. You could set it to break on a condition, such as when a control's Visible property was changed.
I can't find this sort of breakpoint in VB.Net, is it there?
If not, I have a fairly complex project where a text box which is supposed to be invisible is being set Visible somewhere. I've searched, and there isn't any code doing it directly (e.g. txtPhone.Visible = True). I think there's probably some code walking through the controls collection,
setting everything to visible, or something like that.
How could I track this type of siutation down without VB6's watchpoints?
Thanks, ---Selden
* "Telmo Sampaio" <ts******@gmail.com> scripsit: Check the properties of a breakpoint. Create a breakpoint, right click it and select properties. You should see a condition option.
I doubt that this is what the OP is looking for, because it would
require you to know the line of code that is changing the property. If not, I have a fairly complex project where a text box which is supposed to be invisible is being set Visible somewhere. I've searched, and there isn't any code doing it directly (e.g. txtPhone.Visible = True). I think there's probably some code walking through the controls collection,
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Hi Telmo, Thanks for the reply.
I see the condition on the breakpoint.
But what if I don't have any idea WHERE the code is that's setting the
control's property?
Where would I set the breakpoint?
Anyway, I added some code to the VisibleChanged event for the control, set a
break point there, and found it that way.
---Selden
Yes and no.
Place a breakpoint on the MessageBox line of button2_click and set its
condition to *when x has changed*. Althoug X is changed in the button1_click
method the breakpoint in button2_click will occur.
Dim x As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
x += 1
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim y As Integer
y += x
MessageBox.Show(y)
End Sub
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Oq**************@TK2MSFTNGP10.phx.gbl... * "Telmo Sampaio" <ts******@gmail.com> scripsit: Check the properties of a breakpoint. Create a breakpoint, right click
it and select properties. You should see a condition option.
I doubt that this is what the OP is looking for, because it would require you to know the line of code that is changing the property. If not, I have a fairly complex project where a text box which is
supposed to be invisible is being set Visible somewhere. I've searched, and
there isn't any code doing it directly (e.g. txtPhone.Visible = True). I
think there's probably some code walking through the controls collection,
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
That's the problem, you need to specify a place for the breakpoint. I just
posted an answer to Herfried about this, using two buttons and making the
change on button1 and breaking on button2. Again, it is not perfect, but it
is the only way I know for doing what a watch condition did in VB6.
Telmo Sampaio
"Selden McCabe" <se*****@msn.com> wrote in message
news:#6**************@TK2MSFTNGP09.phx.gbl... Hi Telmo, Thanks for the reply. I see the condition on the breakpoint. But what if I don't have any idea WHERE the code is that's setting the control's property? Where would I set the breakpoint?
Anyway, I added some code to the VisibleChanged event for the control, set
a break point there, and found it that way.
---Selden
Thanks Telmo, for this information.
This looks pretty cool, I didn't know you could do that with a breakpoint!
I tried setting this up by setting a breakpoint on one line of code in the
form, and then set the condition to:
txtPhone.Visible
has changed.
When I ran the project, the textbox went from not visible to visible, but
the breakpoint didn't get hit.
Can you think of any restrictions on what line of code you put the
breakpoint on?
My first attempt was in an unrelated module (not the form that contains the
text box) and it complained that it couldn't set the breakpoint.
(I had set the condition to "frmConsumer.txtPhone.Visible" - similar to the
way it worked in VB6).
So obviously the breakpoint must be somewhere where the variable is in
scope.
Or maybe this just doesn't work for properties of controls?
Anyhow, thanks again for the advice, I've already learned something new
about breakpoints!
---Selden
* "Telmo Sampaio" <ts******@gmail.com> scripsit: Place a breakpoint on the MessageBox line of button2_click and set its condition to *when x has changed*. Althoug X is changed in the button1_click method the breakpoint in button2_click will occur.
OK, that would work indeed.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: joe |
last post by:
I have a simple .NET application with two or three listViews which are
filled with icons and when the user click on the proper item, they display
the related images. I use "image = null ; " for all...
|
by: Jerzy Karczmarczuk |
last post by:
I thought that the following sequence
gl=0
def gen(x):
global gl
gl=x
yield x
s=gen(1)
|
by: typingcat |
last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so
on. I've tried many PHP IDEs today, but almost non of them supported
Unicode (UTF-8) file.
I've found that the only Unicode...
|
by: Susan Bricker |
last post by:
Greetings. I have a Mainform with a subform. The Mainform has single
record format and subform has continuous form format. When the Mainform
opens, I force allowadditions and allowedits to FALSE...
|
by: Cyril Gupta |
last post by:
In VS2003 There is a Class viewer option in Solution explorer which lets me
browse the classes in my project. This feature is missing from VS2005
Express edition which I downloaded. Is this feature...
|
by: Abhishek |
last post by:
why do I see that in most C programs, pointers in functions are
accepted as:
int func(int i,(void *)p) where p is a pointer or an address which is
passed from the place where it is called. what...
|
by: Steven T. Hatton |
last post by:
I found the example code below, listed in the book described here:
http://cartan.cas.suffolk.edu/moin/OopDocbookWiki
The result was a bit surprising. I guess it falls into the category
of...
|
by: psbasha |
last post by:
I am using Python2.4.When I have installed the software from www.python.org.I have noticed
the following links in the Python2.4
Start->AllPrograms->Python2.4
a) Python IDLE(GUI)
b) ModuleDocs...
|
by: Curious |
last post by:
I'm developing a proprietary system in C#.NET. The assembly is in a
folder accessible by outside people.
Since it's critical that others don't know what it's about and how
it's implemented, I...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
| |