Solved

Numeric Up/Down Control - Select all text

Posted on 2006-10-23
2
415 Views
Last Modified: 2008-01-09
Hi experts,

I'm using a Numeric Up/Down control and have managed to get the application to select all text when the focus passes to the control at run time.  With normal text boxes this is easily achieved with a .SelectAll function.  With the Numeric Up/Down control I have achieved it using the following code:

        ' Select all text.
        txtTransitionAltitude.Select(0, Len(txtTransitionAltitude.Value))

I now want to have all text selected when I increase of decrease the value using the up/down buttons but cannot get it to work.  I used the above code in the _ValueChanged sub but only a flash of the selection occured when I tried it out.  

Is there another way I can do this?  

Regards,

Ady
0
Comment
Question by:Ady Foot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
DjDezmond earned 125 total points
ID: 17787328
In the design window, goto the _valueChange sub and copy and code into the:

_MouseUp

or

_KeyUp

Event for that control. Your code accesses the value of that control, but when valuechanged is handeled, the value has changed, so it can't reference it. Using on of the above two should work how you need it to.

Dez
0
 
LVL 16

Author Comment

by:Ady Foot
ID: 17787335
Spot on - thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question