📄 form9.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 5490
ClientLeft = 0
ClientTop = 0
ClientWidth = 7275
LinkTopic = "Form1"
ScaleHeight = 5490
ScaleWidth = 7275
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin VB.CommandButton Command2
BackColor = &H0000C000&
Caption = "退 出"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6000
Style = 1 'Graphical
TabIndex = 6
Top = 2880
Width = 855
End
Begin VB.Timer Timer1
Interval = 1000
Left = 4560
Top = 3480
End
Begin VB.CommandButton Command1
BackColor = &H0000C000&
Caption = "登 陆"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5160
Style = 1 'Graphical
TabIndex = 1
Top = 2880
Width = 855
End
Begin VB.TextBox Text1
BackColor = &H00000000&
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 375
Left = 3960
TabIndex = 0
Top = 2520
Width = 2895
End
Begin VB.Label Label4
BackColor = &H00000000&
Height = 135
Left = 3960
TabIndex = 5
Top = 2160
Width = 2895
End
Begin VB.Label Label3
BackColor = &H00000000&
Height = 375
Left = 3960
TabIndex = 4
Top = 2880
Width = 2055
End
Begin VB.Label Label2
BackColor = &H00000000&
Caption = "请输入昵称:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 255
Left = 3960
TabIndex = 3
Top = 2280
Width = 2895
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = "局域网通讯系统"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 255
Left = 3600
TabIndex = 2
Top = 1920
Width = 3495
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''''''''''''''''''''''声明 API 函数
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
''''''''''''''''''''''声明 API 类型
Private Type POINTAPI
X As Long
Y As Long
End Type
Const ALTERNATE = 1 '声明常量
''''''''''''''''''''''声明多边形窗体的顶点数
Dim Points(49) As POINTAPI
Private Sub Command1_Click()
If Text1.Text = "" Then
msg = MsgBox("请先输入昵称!", vbOKOnly + vbExclamation, "注意!")
Else
Form1.Hide
Form2.Show
End If
End Sub
Private Sub Command2_Click()
End
End Sub
''''''''''''''''''''''初始化窗体过程
Private Sub Form_Load()
Me.Picture = LoadPicture("C:\Documents and Settings\cbbj\My Documents\My Pictures\登陆框.jpg") '装入窗体的背景图片
''''''''''''''''''''''''''''''''''最好在属性窗口中加入此图片
''''''''''''''''''''''定义各个顶点坐标
Points(0).X = 485
Points(0).Y = 232
Points(1).X = 485
Points(1).Y = 130
Points(2).X = 477
Points(2).Y = 123
Points(3).X = 232
Points(3).Y = 123
Points(4).X = 228
Points(4).Y = 116
Points(5).X = 224
Points(5).Y = 112
Points(6).X = 221
Points(6).Y = 112
Points(7).X = 217
Points(7).Y = 113
Points(8).X = 215
Points(8).Y = 115
Points(9).X = 214
Points(9).Y = 118
Points(10).X = 216
Points(10).Y = 121
Points(11).X = 217
Points(11).Y = 121
Points(12).X = 218
Points(12).Y = 120
Points(13).X = 220
Points(13).Y = 118
Points(14).X = 222
Points(14).Y = 118
Points(15).X = 225
Points(15).Y = 121
Points(16).X = 225
Points(16).Y = 125
Points(17).X = 225
Points(17).Y = 130
Points(18).X = 225
Points(18).Y = 133
Points(19).X = 225
Points(19).Y = 138
Points(20).X = 221
Points(20).Y = 147
Points(21).X = 218
Points(21).Y = 155
Points(22).X = 216
Points(22).Y = 157
Points(23).X = 215
Points(23).Y = 154
Points(24).X = 209
Points(24).Y = 154
Points(25).X = 209
Points(25).Y = 164
Points(26).X = 236
Points(26).Y = 242
Points(27).X = 259
Points(27).Y = 254
Points(28).X = 275
Points(28).Y = 253
Points(29).X = 285
Points(29).Y = 248
Points(30).X = 290
Points(30).Y = 245
Points(31).X = 297
Points(31).Y = 242
Points(32).X = 303
Points(32).Y = 240
Points(33).X = 310
Points(33).Y = 238
Points(34).X = 319
Points(34).Y = 238
Points(35).X = 324
Points(35).Y = 238
Points(36).X = 326
Points(36).Y = 241
Points(37).X = 325
Points(37).Y = 242
Points(38).X = 323
Points(38).Y = 243
Points(39).X = 322
Points(39).Y = 245
Points(40).X = 327
Points(40).Y = 248
Points(41).X = 331
Points(41).Y = 248
Points(42).X = 331
Points(42).Y = 245
Points(43).X = 332
Points(43).Y = 240
Points(44).X = 330
Points(44).Y = 238
Points(45).X = 330
Points(45).Y = 237
Points(46).X = 480
Points(46).Y = 238
Points(47).X = 485
Points(47).Y = 230
Points(48).X = 486
Points(48).Y = 222
''''''''''''''''''''''生成多边形窗体
SetWindowRgn Me.hWnd, CreatePolygonRgn(Points(0), 49, ALTERNATE), True
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Drag_me Form1
End Sub
Private Sub Timer1_Timer()
Label1.Caption = "局域网通讯系统" + " " + Time$
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -