Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / October 2004

Tip: Looking for answers? Try searching our database.

text box control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cliff Sutton - 22 Oct 2004 13:45 GMT
In Visual 6 I could do the following.
private sub text5_gotfocus()
text5.selstart=0
text5.sellength = len(text5)

What this does is when this text box gets focus then any text in the text
box get highlited so when the user starts to type soemthing then all the text
that was in there gets deleted and the new text starts.

I would really appreciate any help

Signature

Clifford Sutton

Rude Dog - 22 Oct 2004 18:40 GMT
> In Visual 6 I could do the following.
> private sub text5_gotfocus()
[quoted text clipped - 6 lines]
>
> I would really appreciate any help

Even though you haven't actually asked a question here, I'm going to assume
you want to know how to accomplish the same thing in VB .NET. Use the
TextBox.SelectAll method.
Rachel - 24 Oct 2004 21:05 GMT
Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TextBox1.GotFocus
       TextBox1.SelectAll()
       TextBox1.SelectionLength = Len(TextBox1.Text)
   End Sub

> In Visual 6 I could do the following.
> private sub text5_gotfocus()
[quoted text clipped - 6 lines]
>
> I would really appreciate any help

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.