Click here to Skip to main content
15,912,665 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Senthil'S reply for numeric textbox Pin
Christian Graus9-Aug-07 0:22
protectorChristian Graus9-Aug-07 0:22 
GeneralSenthil'S reply for numeric textbox Pin
Senthil S9-Aug-07 2:03
Senthil S9-Aug-07 2:03 
GeneralRe: Senthil'S reply for numeric textbox Pin
Salman Sheikh9-Aug-07 2:45
Salman Sheikh9-Aug-07 2:45 
AnswerRe: numeric textbox Pin
The ANZAC9-Aug-07 0:23
The ANZAC9-Aug-07 0:23 
AnswerRe: numeric textbox Pin
The ANZAC9-Aug-07 0:26
The ANZAC9-Aug-07 0:26 
GeneralRe: numeric textbox Pin
Christian Graus9-Aug-07 0:50
protectorChristian Graus9-Aug-07 0:50 
GeneralRe: numeric textbox Pin
The ANZAC9-Aug-07 1:26
The ANZAC9-Aug-07 1:26 
AnswerRe: numeric textbox Pin
The ANZAC9-Aug-07 1:36
The ANZAC9-Aug-07 1:36 
A correction to my previous post:

if char.isdigit(e.keychar) = false then 'check if it's a number if its not do below:  
    if e.keychar = cchar("-") then ' if its a minus
        if me.textbox1.selectionstart = 0 then 'check if the cursor is at the start
            if me.textbox1.text.contains("-") = false then 'check if there is one already
                e.handled = false 'allow it if its at the start and the only one
            else
                e.handled = true 'otherwise don't allow it
            end if
        else
            e.handled = true 'if its not at start don't allow it
        end if
    elseif e.keychar = cchar(".") then ' if its a decimal place
        if me.textbox1.text.contains(".") = false then 'check if there is one already
            e.handled = false 'allow it if there is not one already
        else
            e.handled = true 'if there is one already don't allow it
        end if
    else
        e.handled = true 'if its not a number, a minus or a decimal point, don't allow it
    end if 
end if 



Please check out my articles:
The ANZAC's articles

GeneralRe: numeric textbox Pin
Luc Pattyn9-Aug-07 1:54
sitebuilderLuc Pattyn9-Aug-07 1:54 
GeneralRe: numeric textbox Pin
The ANZAC9-Aug-07 10:55
The ANZAC9-Aug-07 10:55 
AnswerRe: numeric textbox Pin
KernowMan9-Aug-07 2:01
KernowMan9-Aug-07 2:01 
Questiondata bindings problem Pin
Sonia Gupta8-Aug-07 22:56
Sonia Gupta8-Aug-07 22:56 
AnswerRe: data bindings problem Pin
SamRST8-Aug-07 23:21
SamRST8-Aug-07 23:21 
GeneralRe: data bindings problem Pin
Sonia Gupta8-Aug-07 23:51
Sonia Gupta8-Aug-07 23:51 
AnswerRe: data bindings problem Pin
Nilesh Hapse8-Aug-07 23:21
Nilesh Hapse8-Aug-07 23:21 
AnswerSenthil's Reply for data bindings problem Pin
Senthil S9-Aug-07 0:20
Senthil S9-Aug-07 0:20 
GeneralRe: data bindings problem Pin
Sonia Gupta8-Aug-07 23:46
Sonia Gupta8-Aug-07 23:46 
GeneralRe: data bindings problem Pin
Nilesh Hapse8-Aug-07 23:57
Nilesh Hapse8-Aug-07 23:57 
AnswerRe: data bindings problem Pin
Urs Enzler9-Aug-07 2:09
Urs Enzler9-Aug-07 2:09 
Questiongprs Pin
ahzarmokhli8-Aug-07 22:35
ahzarmokhli8-Aug-07 22:35 
AnswerRe: gprs Pin
Dave Kreskowiak9-Aug-07 3:30
mveDave Kreskowiak9-Aug-07 3:30 
QuestionProblems in Dataset Update Pin
HinJinShah8-Aug-07 22:20
HinJinShah8-Aug-07 22:20 
AnswerRe: Problems in Dataset Update Pin
Dave Kreskowiak9-Aug-07 3:30
mveDave Kreskowiak9-Aug-07 3:30 
GeneralRe: Problems in Dataset Update Pin
HinJinShah10-Aug-07 0:05
HinJinShah10-Aug-07 0:05 
QuestionForm in a Form Pin
Trupti Mehta8-Aug-07 21:51
Trupti Mehta8-Aug-07 21:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.