no gotfocus/lostfocus events?

G

Guest

hi, this is the first time i've posted to this board, though i have been a devoted lurker for some time

i have been working in vb.net and run into a couple problems that seem to require solutions involving what was in previous versions of vb, refered to as gotfocus/lostfocus events. however, it seems that though people online refer to them, my vb.net does not have them

just to show i've not lost my mind
http://www.ondotnet.com/pub/a/dotnet/2001/08/27/winforms.html?page=
this guy's article refers to the System.Windows.Forms.Control class as having .lostfocus and .gotfocus events, however when i did the same in my program, it has none

perhaps i have failed to include something in the project, and perhaps my version is out-of-date. here are my version #s
ide: 7.0.946
..net: 1.0.370

any suggestions are appreciated
 
Y

yEaH rIgHt

Tools---->Options----->Text Editor---->Basic ----->General. Then uncheck the
box that says Hide Advanced Members



dudzcom said:
hi, this is the first time i've posted to this board, though i have been a devoted lurker for some time.

i have been working in vb.net and run into a couple problems that seem to
require solutions involving what was in previous versions of vb, refered to
as gotfocus/lostfocus events. however, it seems that though people online
refer to them, my vb.net does not have them.
just to show i've not lost my mind,
http://www.ondotnet.com/pub/a/dotnet/2001/08/27/winforms.html?page=3
this guy's article refers to the System.Windows.Forms.Control class as
having .lostfocus and .gotfocus events, however when i did the same in my
program, it has none.
perhaps i have failed to include something in the project, and perhaps my
version is out-of-date. here are my version #s:
 
G

Guest

thanks for posting

i uncheckd what you suggested, but it doesnt seem to have done anything. i still do not have any gotfocus/lostfocus events

----- yEaH rIgHt wrote: ----

Tools---->Options----->Text Editor---->Basic ----->General. Then uncheck th
box that says Hide Advanced Member



dudzcom said:
hi, this is the first time i've posted to this board, though i have been devoted lurker for some time
require solutions involving what was in previous versions of vb, refered t
as gotfocus/lostfocus events. however, it seems that though people onlin
refer to them, my vb.net does not have them
http://www.ondotnet.com/pub/a/dotnet/2001/08/27/winforms.html?page=
this guy's article refers to the System.Windows.Forms.Control class a
having .lostfocus and .gotfocus events, however when i did the same in m
program, it has noneversion is out-of-date. here are my version #s
 
Y

yEaH rIgHt

It's not in the dropdown box. Just write your own event handler like this:

Private Sub TextBox1_LostFocus(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TextBox1.LostFocus

End Sub

Have you tried to use the Leave and Enter events of the control?


dudzcom said:
thanks for posting.

i uncheckd what you suggested, but it doesnt seem to have done anything.
i still do not have any gotfocus/lostfocus events.
 
G

Guest

thank you YR

i just figured that all the possible features would be included in the dropdown. didn't figure that just writing it in would work. thank you. you have helped a great deal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top