Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42225

VS 2008 VB6 to VB.net textbox or control DataChanged

$
0
0
I am struggling to find an answer. Ive searched everything, tried a few things and I am not having any luck. Since vb.net does not have the datachanged property anymore, i need to replace it, but cant figure out how to do it.

Code of what I am trying to fix. This cycles through all of the text boxes and checks to see if data changed in any of them.
Code:

            For intCols = 0 To 27
                'UPGRADE_ISSUE: TextBox property txtEmp.DataChanged was not upgraded.
                If txtEmp(intCols).DataChanged Then
                    mblnNotSaved = True
                    System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
                    Exit For
                End If
            Next intCols

And this, which is just a specific textbox.
Code:

                'UPGRADE_ISSUE: TextBox property txtEmp.DataChanged was not upgraded.
                If txtEmp(25).DataChanged Then
                    blnSecChg = True
                Else
                    blnSecChg = False
                End If

and this. which goes through all the controls
Code:

        For Each cCtl In frmObj.Controls 'Clear the TextBoxes...
            'UPGRADE_WARNING: TypeOf has a new behavior.
            If TypeOf cCtl Is System.Windows.Forms.TextBox Then
                If VB.Left(cCtl.Tag, 1) = "E" Then cCtl.Text = ""
                'UPGRADE_ISSUE: Control method cCtl.DataChanged was not upgraded.
                cCtl.DataChanged = False
            End If
        Next cCtl

Can anyone help me figure this out. What is the best way going about this? Thanks

Viewing all articles
Browse latest Browse all 42225

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>