By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,683 Members | 1,398 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,683 IT Pros & Developers. It's quick & easy.

Immediate window?

P: n/a
Is there an Immediate window in vb.net 2003? If so, how do you bring it up?
Nov 20 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
It's called the command window

View->Other Windows->Command
or
CTRL-ALT-A
"Mike" <mi*******@msn.com> wrote in message
news:e9****************@TK2MSFTNGP12.phx.gbl...
Is there an Immediate window in vb.net 2003? If so, how do you bring it up?

Nov 20 '05 #2

P: n/a
Thanks. How do you look at the value of a property of a control on a form?
In VB6, I would have typed:

? formname.controlname.property

but this doesn't seem to work in vb.net
Nov 20 '05 #3

P: n/a
* "Mike" <mi*******@msn.com> scripsit:
Is there an Immediate window in vb.net 2003? If so, how do you bring it up?


See (complete thread):

<http://www.google.de/groups?selm=OzyEKFjQDHA.560%40TK2MSFTNGP10.phx.gbl >

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

P: n/a
* "Mike" <mi*******@msn.com> scripsit:
Thanks. How do you look at the value of a property of a control on a form?
In VB6, I would have typed:

? formname.controlname.property

but this doesn't seem to work in vb.net


See my other reply.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

P: n/a
No mike that should work (you have to be paused at a breakpoint though)

?Me.Textbox.Text should work fine

Chris
"Mike" <mi*******@msn.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Thanks. How do you look at the value of a property of a control on a form? In VB6, I would have typed:

? formname.controlname.property

but this doesn't seem to work in vb.net

Nov 20 '05 #6

P: n/a
You could look at the locals window or set a watch on the control property
and watch it in the watch window.

"Mike" <mi*******@msn.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Thanks. How do you look at the value of a property of a control on a form? In VB6, I would have typed:

? formname.controlname.property

but this doesn't seem to work in vb.net

Nov 20 '05 #7

P: n/a
I am getting this:
? me.btncalculators.text

'Me' is valid only within an instance method.

My Locals window is empty and I don't see how to add a Watch (right-click on
Watch window doesn't show Add Watch option).

I am targeting the Compact Framework if that matters (PocketPC). I am in
[break] mode.
Nov 20 '05 #8

P: n/a
If Me is out of scope, it won't work. Me is also not available in shared
methods.

Also the command window can be toggled to go to immediate mode. Make sure
you are in immediate mode, not command mode. If I remember, you just type !
to flip to immediate mode.

--
Justin Weinberg

Designing a PrintDocument? Drawing to forms?
Check out GDI+ Architect at www.mrgsoft.com
"Mike" <mi*******@msn.com> wrote in message
news:eh**************@TK2MSFTNGP10.phx.gbl...
I am getting this:
? me.btncalculators.text

'Me' is valid only within an instance method.

My Locals window is empty and I don't see how to add a Watch (right-click on Watch window doesn't show Add Watch option).

I am targeting the Compact Framework if that matters (PocketPC). I am in
[break] mode.

Nov 20 '05 #9

P: n/a
I'm in immediate mode.

How do I get a reference to the form that is currently displayed?
Nov 20 '05 #10

P: n/a
I'm afraid I don't have an answer for you in the general sense.

I think you may have some slight confusion about how forms work in VB.NET (I
could be wrong). I think you are looking at it like there is one active
instance of a form as in VB6 that is always around. Since any form could be
the "Me" member in the current context in VB.NET, what you're trying to do
isn't going to work.

When I'm using the immediate window it's in response to a breakpoint that is
inside the current form, so Me is available. If you're responding to some
event you are trying to debug, I'd just tag that event with a breakpoint and
step it, using the immediate window as a tool. Then Me will be available to
you.

If you need VB6 style global debugging, you can change how your forms works
by adding them to a class as public shared members. Then instead of
creating instances of them. you show and hide that form. They should be
available then in the immediate window at any time, assuming they have been
created with new at some point. But I would only do this if it makes sense
for how you are working with them.

For example, if I have a toolbox type form, I make it shared, because it
really only makes sense to have one toolbox instance per application.

--
Justin Weinberg

Designing a PrintDocument or creating .NET graphics?
Save time with GDI+ Architect.
For more information, visit http://www.mrgsoft.com
"Mike" <mi*******@msn.com> wrote in message
news:Or****************@TK2MSFTNGP12.phx.gbl...
I'm in immediate mode.

How do I get a reference to the form that is currently displayed?

Nov 20 '05 #11

P: n/a
I was only using "Me" because Chris posted that "Me" should work.

I would probably have used the Forms collection in VB 6 to get a reference
to an open form. There must be some equivalent in vb.net.
Nov 20 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.