Click here to Skip to main content
15,897,315 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Insert Row In Excel File Pin
parth.p15-May-08 0:59
parth.p15-May-08 0:59 
GeneralRe: Insert Row In Excel File Pin
hitesh sojitra15-May-08 1:29
hitesh sojitra15-May-08 1:29 
GeneralRe: Insert Row In Excel File Pin
hitesh sojitra15-May-08 1:48
hitesh sojitra15-May-08 1:48 
GeneralRe: Insert Row In Excel File Pin
hitesh sojitra15-May-08 1:55
hitesh sojitra15-May-08 1:55 
Questiondata binding update problem Pin
asha_s15-May-08 0:33
asha_s15-May-08 0:33 
AnswerRe: data binding update problem Pin
Mycroft Holmes15-May-08 19:44
professionalMycroft Holmes15-May-08 19:44 
QuestionCatching an exception from a control Pin
Steven J Jowett14-May-08 22:33
Steven J Jowett14-May-08 22:33 
AnswerRe: Catching an exception from a control Pin
Chinners15-May-08 0:55
Chinners15-May-08 0:55 
A possible soloution could be to create your own custom event for when the value doesn't match the regex:

In your control
Public event InvalidData(Sender as Object)

Private Sub RegExTextBox_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Leave
If Not System.Text.RegularExpressions.Regex.IsMatch(MyBase.Text, _sRegularExpression) Then
Raise Event InvalidData(Me)
End If
End Sub


and in your main form:

Private sub InvalidRegexText(byval sender as object)
  if typeof(sender) is RegExTextBox) then
    with directcast(sender, RegExTextBox)
      do whatever you need here
    end with
  end if
end sub


(p.s. the code may not be exactly correct - I havent tested it, but the theory is right)
GeneralRe: Catching an exception from a control Pin
Steven J Jowett15-May-08 1:08
Steven J Jowett15-May-08 1:08 
QuestionCompressing in vb .net 2003 Pin
aphei14-May-08 22:23
aphei14-May-08 22:23 
AnswerRe: Compressing in vb .net 2003 Pin
Steven J Jowett14-May-08 22:50
Steven J Jowett14-May-08 22:50 
AnswerRe: Compressing in vb .net 2003 Pin
Steven J Jowett14-May-08 23:07
Steven J Jowett14-May-08 23:07 
QuestionVB 6 question, Pin
nitin314-May-08 20:57
nitin314-May-08 20:57 
AnswerRe: VB 6 question, Pin
helelark12315-May-08 3:34
helelark12315-May-08 3:34 
QuestionSelect Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 20:52
TeiUKei14-May-08 20:52 
AnswerRe: Select Multiple File in Single Open File Dialog Box Pin
Ajay.k_Singh14-May-08 21:06
Ajay.k_Singh14-May-08 21:06 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 21:24
TeiUKei14-May-08 21:24 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
Ajay.k_Singh14-May-08 21:39
Ajay.k_Singh14-May-08 21:39 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 22:25
TeiUKei14-May-08 22:25 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
Ajay.k_Singh14-May-08 22:31
Ajay.k_Singh14-May-08 22:31 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 22:38
TeiUKei14-May-08 22:38 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
Ajay.k_Singh14-May-08 22:50
Ajay.k_Singh14-May-08 22:50 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 22:59
TeiUKei14-May-08 22:59 
QuestionCna we have Nested Try and Catch IN VB 2005 Pin
nishkarsh_k14-May-08 20:22
nishkarsh_k14-May-08 20:22 
AnswerRe: Cna we have Nested Try and Catch IN VB 2005 Pin
Mycroft Holmes14-May-08 20:44
professionalMycroft Holmes14-May-08 20:44 

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.