Visual Basic 6.0, the MaxLength property to determine the number of characters that can be put in TextBox Control. If you try to insert text into TextBox control, the text will be cut along specified by the MaxLength property.
          In Visual Basic 2008, the MaxLength property of behavior no longer applies to text that is added programming code. Same as the behavior of Visual Basic 6.0, you need to cut the strings themselves.
          In Visual Basic 6.0, PasswordChar property is of type String, in Visual Basic 2008 is of type Char.In addition, there are differences in concepts that apply to all control, including differences in the handling of data binding in Copntrol, such as fonts, operating drag-and-drop, and more.
          The following examples illustrate differences in coding techniques between Visual Basic 6.0 and Visual Basic 2008.For tutorial following code shows how to find the string in the TextBox control in the highlight.
Tutorial Visual Basic 6.0 : Text Box

'Visual Basic 6.0
Private Sub Form_Load ()
Text1.Text = "Two of the human peak experiences"
Text1.Text = Text1.Text & "are good food and classical music."
end Sub

Private Sub Form_Click ()
Dim Search, Where
'Get search string from user.
Search = InputBox ("Enter text to be found:")
'Find string in text.
Where = InStr (Text1.Text, Search)
If Where Then
Where Text1.SelStart = - 1
Text1.SelLength = Len (Search)
MsgBox "String not found."
end If
end Sub

 Top TopicNext Topic >>