Solved

Stopping User Input On Numeric Up/Down

Posted on 2006-06-26
2
212 Views
Last Modified: 2008-03-04
Hi,

Is there any way to stop the user entering data into numeric up down fields in VS 2005?

Thanks.
0
Comment
Question by:sterrius
  • 2
2 Comments
 
LVL 16

Expert Comment

by:Swapnil Piparia
ID: 16982686
Hi sterrius,
just write keypress event as under

    Private Sub NumericUpDown1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles NumericUpDown1.KeyPress
        Exit Sub
    End Sub

Regards,
NetSwap
0
 
LVL 16

Accepted Solution

by:
Swapnil Piparia earned 125 total points
ID: 16982705
sterrius,
sorry but replace above code as below

Private Sub NumericUpDown1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles NumericUpDown1.KeyPress
        e.KeyChar = ""
    End Sub
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of convertingā€¦
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that undeā€¦
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now