Click here to Skip to main content
15,893,663 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: thanks Pin
manni_n15-Mar-07 12:55
manni_n15-Mar-07 12:55 
GeneralRe: thanks Pin
TwoFaced15-Mar-07 12:59
TwoFaced15-Mar-07 12:59 
Generalperfect... Pin
manni_n15-Mar-07 13:12
manni_n15-Mar-07 13:12 
Generalcheck it... Pin
manni_n15-Mar-07 13:23
manni_n15-Mar-07 13:23 
GeneralRe: check it... [modified] Pin
TwoFaced15-Mar-07 14:07
TwoFaced15-Mar-07 14:07 
GeneralRe: check it... Pin
manni_n16-Mar-07 1:05
manni_n16-Mar-07 1:05 
GeneralRe: check it... Pin
TwoFaced16-Mar-07 6:30
TwoFaced16-Mar-07 6:30 
GeneralRe: check it... Pin
manni_n16-Mar-07 8:34
manni_n16-Mar-07 8:34 
no buddy, i have checked every second method which i was knowing, to do this
validation.
i also tried to used gotfocus validation of textbox.but i think every effort went into vein.
as i am using back end also so i tried to validate this through backend validation.
like if the value in the textbox is same then it wont enter in DB and gives an error. But i think this will be the bad logic..
i cant do anything as i am left with this only...
nyways after using your method fully now i am only stuck at this problem, my every second problem is solved by you reagardin this..the only thing left is it shud not validate untill the user moves to other controll.
sending u the code agian jst have alook and check out if something can be done or not....
nyways thanks....
you really helped alot , i'll make sure in future that i could help you in some way and repay you...
Public class form1<br />
  Inherits System.Windows.Forms.Form<br />
Private TextBoxCollection As New ArrayList<br />
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
        For Each ctrl As Control In Me.Controls<br />
            If TypeOf ctrl Is TextBox Then<br />
                TextBoxCollection.Add(DirectCast(ctrl, TextBox))<br />
                AddHandler ctrl.TextChanged, AddressOf txtvalidate_validating<br />
                'e.cancel = True<br />
            End If<br />
        Next<br />
<br />
    End Sub<br />
    Private Sub txtvalidate_validating(ByVal sender As Object, ByVal e As EventArgs)<br />
<br />
        Dim txtSender As TextBox = DirectCast(sender, TextBox)   <br />
        For Each txt As TextBox In TextBoxCollection    <br />
            If Not txt Is txtSender AndAlso txt.Text = txtSender.Text AndAlso txt.Text <> "" Then<br />
                 CType(sender, TextBox).Text = CStr(txt.Text)<br />
                MsgBox("You have already filled this value")<br />
                Exit For<br />
            End If<br />
        Next<br />
<br />
    End Sub<br />

GeneralRe: check it... Pin
TwoFaced16-Mar-07 10:13
TwoFaced16-Mar-07 10:13 
Generalcool... [modified] Pin
manni_n16-Mar-07 11:06
manni_n16-Mar-07 11:06 
GeneralRe: cool... Pin
TwoFaced16-Mar-07 12:11
TwoFaced16-Mar-07 12:11 
QuestionChecked List Box Pin
taherjaorawala14-Mar-07 21:46
taherjaorawala14-Mar-07 21:46 
AnswerRe: Checked List Box Pin
manni_n14-Mar-07 23:13
manni_n14-Mar-07 23:13 
QuestionTyped dataset, insert, return output parameter Pin
steve_rm14-Mar-07 19:38
steve_rm14-Mar-07 19:38 
AnswerRe: Typed dataset, insert, return output parameter Pin
Steven J Jowett15-Mar-07 1:57
Steven J Jowett15-Mar-07 1:57 
QuestionTotal Hours and minutes Pin
Member 387988114-Mar-07 19:03
Member 387988114-Mar-07 19:03 
AnswerRe: Total Hours and minutes Pin
Tirthadip14-Mar-07 23:39
Tirthadip14-Mar-07 23:39 
GeneralRe: Total Hours and minutes Pin
Member 387988114-Mar-07 23:56
Member 387988114-Mar-07 23:56 
GeneralRe: Total Hours and minutes Pin
coolestCoder15-Mar-07 2:25
coolestCoder15-Mar-07 2:25 
GeneralRe: Total Hours and minutes Pin
Member 387988115-Mar-07 0:17
Member 387988115-Mar-07 0:17 
QuestionMaking User Under WinXP/NT/2000 (NT Family) With VB or API Pin
Mogtabam14-Mar-07 18:34
Mogtabam14-Mar-07 18:34 
Questionlittle problem with codes :) Pin
alpdoruk14-Mar-07 13:28
alpdoruk14-Mar-07 13:28 
AnswerRe: little problem with codes :) Pin
JUNEYT14-Mar-07 13:35
JUNEYT14-Mar-07 13:35 
AnswerRe: little problem with codes :) Pin
alpdoruk14-Mar-07 13:44
alpdoruk14-Mar-07 13:44 
Answersolved now Pin
alpdoruk14-Mar-07 13:47
alpdoruk14-Mar-07 13:47 

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.