Click here to Skip to main content
15,902,939 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Explanation Parameterised Queries Pin
keninfo7-May-07 11:30
keninfo7-May-07 11:30 
GeneralRe: Explanation Parameterised Queries Pin
Colin Angus Mackay7-May-07 11:36
Colin Angus Mackay7-May-07 11:36 
QuestionHow to Import tab delimited text file into Sybase using VB.Net Pin
VB Prog7-May-07 9:46
VB Prog7-May-07 9:46 
AnswerRe: How to Import tab delimited text file into Sybase using VB.Net Pin
VB Prog9-May-07 6:36
VB Prog9-May-07 6:36 
QuestionVB.Net - XML into a DB Pin
ukfrosty7-May-07 7:38
ukfrosty7-May-07 7:38 
AnswerRe: VB.Net - XML into a DB Pin
MatrixCoder7-May-07 18:44
MatrixCoder7-May-07 18:44 
Questioni need to manage exceptions how can i ? Pin
Hasan Jaffal7-May-07 3:58
Hasan Jaffal7-May-07 3:58 
AnswerRe: i need to manage exceptions how can i ? Pin
Rupesh Kumar Swami7-May-07 4:30
Rupesh Kumar Swami7-May-07 4:30 
hi lord,
write ur code between following block

Try
'Write your code here
Catch ex as exception
msgbox ex.message
End try

from above code u can able to handle any type of exception.

Now call following function at keypress event of Textbox so the user must be enter proper value

// For accept only Text & white Space pass "e" ( one of the argument of keypress event) to this function

Public Sub CheckPressedKeyText(ByVal key As System.Windows.Forms.KeyPressEventArgs)
If Not (Char.IsControl(key.KeyChar) Or Char.IsLetter(key.KeyChar) Or Char.IsWhiteSpace(key.KeyChar)) Then
key.Handled = True
End If
End Sub

// For accept only numeric value with "." pass "e" ( one of the argument of keypress event) and "sender.text" to this function

Public Sub CheckPressedKeyNumericWithDot(ByVal key As System.Windows.Forms.KeyPressEventArgs, ByVal str As String)
If str.Contains(".") Then
CheckPressedKeyNumericWithoutDot(key)
Else
If Not (Char.IsControl(key.KeyChar) Or Char.IsNumber(key.KeyChar) Or key.KeyChar = ".") Then
key.Handled = True
End If
End If
End Sub

// For accept only numeric value without "." pass "e" ( one of the argument of keypress event) to this function

Public Sub CheckPressedKeyNumericWithoutDot(ByVal key As System.Windows.Forms.KeyPressEventArgs)
If Not (Char.IsControl(key.KeyChar) Or Char.IsNumber(key.KeyChar)) Then
key.Handled = True
End If
End Sub

for date, use DateTimePicker & set format property to "Custom" and then set Custom format property to ur choice.

Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)

GeneralRe: i need to manage exceptions how can i ? Pin
Hasan Jaffal7-May-07 4:39
Hasan Jaffal7-May-07 4:39 
GeneralRe: i need to manage exceptions how can i ? Pin
Rupesh Kumar Swami7-May-07 4:49
Rupesh Kumar Swami7-May-07 4:49 
GeneralRe: i need to manage exceptions how can i ? Pin
Hasan Jaffal7-May-07 4:56
Hasan Jaffal7-May-07 4:56 
GeneralRe: i need to manage exceptions how can i ? Pin
Rupesh Kumar Swami7-May-07 5:03
Rupesh Kumar Swami7-May-07 5:03 
GeneralRe: i need to manage exceptions how can i ? Pin
Hasan Jaffal7-May-07 5:11
Hasan Jaffal7-May-07 5:11 
AnswerRe: i need to manage exceptions how can i ? Pin
Christian Graus7-May-07 13:07
protectorChristian Graus7-May-07 13:07 
GeneralRe: i need to manage exceptions how can i ? Pin
Hasan Jaffal7-May-07 13:15
Hasan Jaffal7-May-07 13:15 
QuestionGetObject function question Pin
ganeshpulsars7-May-07 3:42
ganeshpulsars7-May-07 3:42 
AnswerRe: GetObject function question Pin
Dave Kreskowiak7-May-07 7:07
mveDave Kreskowiak7-May-07 7:07 
GeneralRe: GetObject function question Pin
ganeshpulsars7-May-07 17:57
ganeshpulsars7-May-07 17:57 
AnswerRe: GetObject function question Pin
nlarson117-May-07 7:10
nlarson117-May-07 7:10 
GeneralRe: GetObject function question Pin
ganeshpulsars7-May-07 18:09
ganeshpulsars7-May-07 18:09 
GeneralRe: GetObject function question Pin
Dave Kreskowiak8-May-07 2:02
mveDave Kreskowiak8-May-07 2:02 
GeneralRe: GetObject function question Pin
ganeshpulsars8-May-07 20:06
ganeshpulsars8-May-07 20:06 
QuestionWebbrowser Control in VB6 Pin
Kumaran21cen7-May-07 0:34
Kumaran21cen7-May-07 0:34 
AnswerRe: Webbrowser Control in VB6 Pin
nlarson117-May-07 7:25
nlarson117-May-07 7:25 
QuestionSQL Server Error Pin
Vimalsoft(Pty) Ltd7-May-07 0:07
professionalVimalsoft(Pty) Ltd7-May-07 0:07 

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.