📄 form8.frm
字号:
VERSION 5.00
Begin VB.Form Form2
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 4815
ClientLeft = 0
ClientTop = 0
ClientWidth = 4365
LinkTopic = "Form1"
ScaleHeight = 4815
ScaleWidth = 4365
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin VB.CommandButton Command1
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 = 3360
Style = 1 'Graphical
TabIndex = 10
Top = 4320
Width = 855
End
Begin VB.CommandButton Commd1
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 = 2520
Style = 1 'Graphical
TabIndex = 3
Top = 4320
Width = 855
End
Begin VB.TextBox T2
BackColor = &H00000000&
ForeColor = &H0000C000&
Height = 1455
Left = 1200
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 1440
Width = 3015
End
Begin VB.TextBox T1
BackColor = &H00000000&
ForeColor = &H0000C000&
Height = 975
Left = 1200
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 3360
Width = 3015
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H00000000&
ForeColor = &H80000008&
Height = 375
Left = 1200
ScaleHeight = 345
ScaleWidth = 2145
TabIndex = 5
Top = 4320
Width = 2175
Begin VB.Label L1
BackStyle = 0 'Transparent
Caption = "已连接"
ForeColor = &H0000C000&
Height = 255
Left = 480
TabIndex = 7
Top = 120
Width = 1215
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "状态:"
ForeColor = &H0000C000&
Height = 375
Left = 0
TabIndex = 6
Top = 120
Width = 735
End
End
Begin VB.Label Label2
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
Caption = "消息接收框:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 255
Left = 1200
TabIndex = 9
Top = 1200
Width = 3015
End
Begin VB.Label Label1
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
Caption = "消息发送框:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 255
Left = 1200
TabIndex = 8
Top = 3120
Width = 3015
End
Begin VB.Label L4
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = " 退出"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 255
Left = 3600
TabIndex = 4
Top = 960
Width = 615
End
Begin VB.Label L2
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
ForeColor = &H0000C000&
Height = 255
Left = 1200
TabIndex = 2
Top = 2880
Width = 3015
End
End
Attribute VB_Name = "Form2"
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(78) As POINTAPI
Private Sub Command1_Click()
Form2.Hide
Form1.Show
End Sub
''''''''''''''''''''''初始化窗体过程
Private Sub Form_Load()
Me.Picture = LoadPicture("C:\Documents and Settings\cbbj\My Documents\My Pictures\记录框2.jpg") '装入窗体的背景图片
''''''''''''''''''''''''''''''''''最好在属性窗口中加入此图片
''''''''''''''''''''''定义各个顶点坐标
Points(0).X = 309
Points(0).Y = 181
Points(1).X = 310
Points(1).Y = 331
Points(2).X = 298
Points(2).Y = 340
Points(3).X = 155
Points(3).Y = 340
Points(4).X = 154
Points(4).Y = 345
Points(5).X = 149
Points(5).Y = 345
Points(6).X = 142
Points(6).Y = 344
Points(7).X = 144
Points(7).Y = 340
Points(8).X = 146
Points(8).Y = 339
Points(9).X = 140
Points(9).Y = 338
Points(10).X = 135
Points(10).Y = 339
Points(11).X = 122
Points(11).Y = 342
Points(12).X = 112
Points(12).Y = 346
Points(13).X = 102
Points(13).Y = 350
Points(14).X = 96
Points(14).Y = 354
Points(15).X = 87
Points(15).Y = 355
Points(16).X = 79
Points(16).Y = 352
Points(17).X = 59
Points(17).Y = 340
Points(18).X = 34
Points(18).Y = 265
Points(19).X = 32
Points(19).Y = 263
Points(20).X = 32
Points(20).Y = 251
Points(21).X = 40
Points(21).Y = 251
Points(22).X = 42
Points(22).Y = 252
Points(23).X = 46
Points(23).Y = 245
Points(24).X = 48
Points(24).Y = 239
Points(25).X = 48
Points(25).Y = 232
Points(26).X = 48
Points(26).Y = 224
Points(27).X = 48
Points(27).Y = 219
Points(28).X = 47
Points(28).Y = 217
Points(29).X = 45
Points(29).Y = 216
Points(30).X = 43
Points(30).Y = 216
Points(31).X = 40
Points(31).Y = 218
Points(32).X = 40
Points(32).Y = 219
Points(33).X = 40
Points(33).Y = 213
Points(34).X = 44
Points(34).Y = 211
Points(35).X = 46
Points(35).Y = 211
Points(36).X = 50
Points(36).Y = 215
Points(37).X = 53
Points(37).Y = 216
Points(38).X = 52
Points(38).Y = 64
Points(39).X = 63
Points(39).Y = 56
Points(40).X = 208
Points(40).Y = 56
Points(41).X = 210
Points(41).Y = 53
Points(42).X = 212
Points(42).Y = 51
Points(43).X = 216
Points(43).Y = 51
Points(44).X = 218
Points(44).Y = 52
Points(45).X = 219
Points(45).Y = 55
Points(46).X = 217
Points(46).Y = 56
Points(47).X = 215
Points(47).Y = 57
Points(48).X = 220
Points(48).Y = 60
Points(49).X = 225
Points(49).Y = 60
Points(50).X = 231
Points(50).Y = 60
Points(51).X = 240
Points(51).Y = 57
Points(52).X = 248
Points(52).Y = 53
Points(53).X = 262
Points(53).Y = 45
Points(54).X = 272
Points(54).Y = 45
Points(55).X = 280
Points(55).Y = 45
Points(56).X = 303
Points(56).Y = 58
Points(57).X = 329
Points(57).Y = 130
Points(58).X = 331
Points(58).Y = 132
Points(59).X = 331
Points(59).Y = 145
Points(60).X = 324
Points(60).Y = 145
Points(61).X = 324
Points(61).Y = 141
Points(62).X = 321
Points(62).Y = 143
Points(63).X = 317
Points(63).Y = 153
Points(64).X = 315
Points(64).Y = 158
Points(65).X = 315
Points(65).Y = 163
Points(66).X = 316
Points(66).Y = 172
Points(67).X = 317
Points(67).Y = 177
Points(68).X = 319
Points(68).Y = 178
Points(69).X = 321
Points(69).Y = 178
Points(70).X = 324
Points(70).Y = 176
Points(71).X = 324
Points(71).Y = 182
Points(72).X = 319
Points(72).Y = 184
Points(73).X = 315
Points(73).Y = 184
Points(74).X = 313
Points(74).Y = 182
Points(75).X = 310
Points(75).Y = 180
Points(76).X = 309
Points(76).Y = 180
Points(77).X = 309
Points(77).Y = 330
''''''''''''''''''''''生成多边形窗体
SetWindowRgn Me.hWnd, CreatePolygonRgn(Points(0), 78, ALTERNATE), True
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Drag_me Form2
End Sub
Private Sub L4_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -