Click here to Skip to main content
15,901,001 members
Home / Discussions / C#
   

C#

 
GeneralRe: Thread.Sleep and WebBrowser... Okay to use together? Pin
User 665816-Dec-08 11:57
User 665816-Dec-08 11:57 
GeneralRe: Thread.Sleep and WebBrowser... Okay to use together? Pin
Christian Graus16-Dec-08 13:14
protectorChristian Graus16-Dec-08 13:14 
GeneralRe: Thread.Sleep and WebBrowser... Okay to use together? Pin
Expert Coming16-Dec-08 16:26
Expert Coming16-Dec-08 16:26 
GeneralRe: Thread.Sleep and WebBrowser... Okay to use together? Pin
Christian Graus16-Dec-08 17:16
protectorChristian Graus16-Dec-08 17:16 
Questiontextbox validation Pin
Zeyad Jalil16-Dec-08 6:20
professionalZeyad Jalil16-Dec-08 6:20 
AnswerRe: textbox validation Pin
EliottA16-Dec-08 6:33
EliottA16-Dec-08 6:33 
AnswerRe: textbox validation Pin
Lev Danielyan16-Dec-08 6:52
Lev Danielyan16-Dec-08 6:52 
AnswerRe: textbox validation Pin
programmervb.netc++16-Dec-08 12:59
programmervb.netc++16-Dec-08 12:59 
I wrote this code it is close to what you are trying to do.
I am not a C# programmer however so here it is in VB.NET
''' <summary>
''' This routine will not let the user enter anything except numbers and dashes into the SSN textbox
''' </summary>
''' <param name="e">This is the Keypressevent from the calling form</param>
''' <remarks></remarks>
Public Sub sSocialKeyPress(ByVal e As System.Windows.Forms.KeyPressEventArgs)
    ' allow backspace
    If Asc(e.KeyChar) = 8 Then
        Exit Sub
    End If
    'Dont catch control
    If Char.IsControl(e.KeyChar) Then
        Exit Sub
    End If
    'numbers Only
    If Char.IsNumber(e.KeyChar) Then
        e.Handled = False ' and cancel this keystroke
    Else
        e.Handled = True
    End If
End Sub

Private Sub txtSocialSecurityNumber_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSocialSecurityNumber.KeyPress
    sSocialKeyPress(e)
End Sub


Use the C# equivalent of this for the text box you are wanting to validate.

I hope this helps, BTW I know I am not the best programmer so please noone laugh very hard. LOL



Humble Programmer

AnswerRe: textbox validation Pin
DaveyM6916-Dec-08 13:35
professionalDaveyM6916-Dec-08 13:35 
QuestionWhere are the files?? Pin
Muammar©16-Dec-08 6:10
Muammar©16-Dec-08 6:10 
GeneralRe: Where are the files?? Pin
Luc Pattyn16-Dec-08 6:37
sitebuilderLuc Pattyn16-Dec-08 6:37 
GeneralRe: Where are the files?? Pin
Muammar©16-Dec-08 18:11
Muammar©16-Dec-08 18:11 
AnswerRe: Where are the files?? Pin
Dave Kreskowiak16-Dec-08 7:02
mveDave Kreskowiak16-Dec-08 7:02 
GeneralRe: Where are the files?? Pin
Muammar©16-Dec-08 18:13
Muammar©16-Dec-08 18:13 
AnswerRe: Where are the files?? Pin
Alan N16-Dec-08 7:14
Alan N16-Dec-08 7:14 
GeneralRe: Where are the files?? Pin
Muammar©16-Dec-08 18:14
Muammar©16-Dec-08 18:14 
QuestionQuestion Accessing wsdl web service with c# client via proxy Pin
qwerty5316-Dec-08 3:38
qwerty5316-Dec-08 3:38 
Questionsetup database Pin
grks16-Dec-08 2:35
grks16-Dec-08 2:35 
QuestionRestart router Pin
Xmen Real 16-Dec-08 1:27
professional Xmen Real 16-Dec-08 1:27 
AnswerRe: Restart router Pin
Lev Danielyan16-Dec-08 1:40
Lev Danielyan16-Dec-08 1:40 
GeneralRe: Restart router Pin
SeMartens16-Dec-08 1:43
SeMartens16-Dec-08 1:43 
GeneralRe: Restart router Pin
Simon P Stevens16-Dec-08 1:46
Simon P Stevens16-Dec-08 1:46 
GeneralRe: Restart router Pin
Xmen Real 16-Dec-08 1:56
professional Xmen Real 16-Dec-08 1:56 
GeneralRe: Restart router Pin
SeMartens16-Dec-08 1:59
SeMartens16-Dec-08 1:59 
GeneralRe: Restart router Pin
Xmen Real 16-Dec-08 2:02
professional Xmen Real 16-Dec-08 2:02 

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.