| VB6 |
VB.NET |
 |
|
| DoEvents |
 |
System.Windows.Forms.Application.DoEvents() |
|
| Command1.BackColor = vbRed |
 |
Command1.BackColor = System.Drawing.Color.Red |
|
| ComboBox1.AddItem "one" |
 |
ComboBox1.Items.Add("one") |
|
| Command1.BackColor = &H80C0FF |
 |
Command1.BackColor = System.Drawing.ColorTranslator.FromOle(&H80C0FF&) |
|
| Form1.Caption = "Sample" |
 |
Form1.Text = "Sample" |
|
| MsgBox "message", vbInformation, "title" |
 |
MessageBox.Show("message", "title", , MessageBoxIcon.Information) |
|
| Set MyObject = Command1 |
 |
MyObject = Command1 |
|
| Text1.SetFocus |
 |
Text1.Focus() |
|
| Command1.ToolTipText = "click me" |
 |
ToolTip1.SetToolTip(Command1, "click me") |
|
| Dim objAbout As AboutForm |
 |
Dim objAbout As Pharfruminsain_AboutForm_v1r0.AboutForm |
|
| sPath = App.Path |
 |
sPath = System.Environment.CurrentDirectory |
|
| Private Sub Form_Unload(Cancel As Integer) |
 |
Private Sub Form1_Closing(...) Handles MyBase.Closing |
|
| List1.RemoveItem (0) |
 |
ListBox1.Items.Remove(0) |
|
| Dim arOne(10) As String |
 |
Dim arOne As New ArrayList(10) |
|
| Open "c:\myfile.txt" For Input As #1 |
 |
FileOpen(1, "c:\myfile.txt", OpenMode.Input) |
|
| Line Input #1, sTemp |
 |
sTemp = LineInput(1) |
|
| Print #1, "sample text" |
 |
PrintLine(1, "sample text") |
|
| Public Type CustomArray |
 |
Public Structure CustomArray |
|
| Dim xRed As OLE_COLOR |
 |
Dim xRed As System.Drawing.Color |
|
| List1.ListIndex = List1.ListCount - 1 |
 |
List1.SelectedIndex = List1.Items.Count - 1 |
|
| Me.MousePointer = vbHourglass |
 |
Cursor.Current = Cursors.WaitCursor |
|
| Private Sub Label1_Change() |
 |
Private Sub Label1_TextChanged(....) Handles Label1.TextChanged |
|
| Form2.Show |
 |
Dim xForm As New Form2() {next line} xForm.Show() |
|
| sModelOfCar = Trim(sModelOfCar) |
 |
sModelOfCar = sModelOfCar.Trim() |
|
| iCount = iCount + 1 |
 |
iCount += 1 |
|
| sText = sText & "hello" |
 |
sText += "hello" |
|
| TextBox1.Text = "" |
 |
TextBox1.Clear() |
|
| Unload Me |
 |
Me.Dispose |
|