?? setmenu.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form setmenu
BorderStyle = 1 'Fixed Single
Caption = "設(shè)置菜單權(quán)限"
ClientHeight = 6435
ClientLeft = 45
ClientTop = 330
ClientWidth = 7605
Icon = "SETMENU.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "SETMENU.frx":030A
ScaleHeight = 6435
ScaleWidth = 7605
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 4785
Top = 4845
Visible = 0 'False
Width = 2235
_ExtentX = 3942
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "catv"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "setmenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
' Data1.Recordset.Close
Unload Me
End Sub
Private Sub Command2_Click()
If CInt(Text2.Text) < 19 Or CInt(Text2.Text) = 0 Or (Not IsNull(Text2.Text)) Then
'Adodc3.Recordset.Edit
Adodc3.Recordset.Fields("使用者") = Adodc3.Recordset.Fields("使用者") & Trim(Text2)
'Adodc3.Recordset.Update
Else
MsgBox "非法設(shè)置,請輸入1~18之間的數(shù)字!", vbOKOnly, "錯誤"
End If
End Sub
Private Sub Command3_Click()
Dim jb As String
Dim i As Integer
If Text2.Text <> "" Or (Not IsNull(Text2.Text)) Then
jb = Adodc3.Recordset.Fields("使用者")
For i = 1 To Len(Trim(jb))
If Mid(jb, i, 1) = Trim(Text2.Text) Then
If i <> 1 Then
If i = Len(Trim(jb)) Then
jb = Left(jb, Len(Trim(jb)) - 1)
Else
jb = Left(jb, i) & Right(jb, Len(Trim(jb)) - i - 1)
End If
Else
jb = Right(jb, Len(Trim(jb)) - 1)
End If
End If
Next
If jb = "" Then jb = "1"
'Adodc3.Recordset.Edit
Adodc3.Recordset.Fields("usertype") = jb
'Adodc3.Recordset.Update
End If
End Sub
Private Sub Command4_Click()
Adodc3.Recordset.Update
MsgBox "數(shù)據(jù)已保存!", 64, "提示"
End Sub
Private Sub Form_Load()
Adodc3.ConnectionString = My_PROVIDER
Adodc3.CommandType = adCmdText
Adodc3.RecordSource = "select 編號,名稱,使用者 from 菜單"
Adodc3.Refresh
Set DataGrid2.DataSource = Adodc3
DataGrid2.ReBind
DataGrid2.Refresh
DataGrid2.Columns(0).Caption = "編號"
DataGrid2.Columns(1).Caption = "菜單名稱"
DataGrid2.Columns(2).Caption = "使用者"
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -