Private Sub A1() '加载窗体 frm1.Show() End Sub Private Sub A2() '離開 Process.GetCurrentProcess().Kill() End Sub Private Sub A3() '卸载窗体 Me.Close() End Sub Private Sub A4() Dim frm1 As Form1 '確認窗体是否已開啟 If frm1 Is Nothing OrElse frm1.IsDisposed Then frm1 = N…
常用操作:获取当前行数和列数: MsgBox "行数:" & ListView1.ListItems.Count & "列数:" & ListView1.ColumnHeaders.Count Private Sub ListView1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) ListView1.ToolTipText = "行…
Imports System.TextImports System.Runtime.InteropServices Public Class Form1 ' 相关API函数声明,注释掉的这里没用到,但是也比较常用吧,这些函数的功能都能搜到. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpW…
'空值判斷 If IsDBNull(DataGridView1.Item(1, 1).Value) = True Then DataGridView1.Item(1, 1).Value = "空值" End If '删除所有行 DataGridView1.Rows.Clear() '删除第一行 DataGridView1.Rows.RemoveAt(0) '删除選定的行 For Each r As DataGridViewRow In DataGridView1.SelectedRow…