📄 test.frm
字号:
VERSION 5.00
Object = "*\AJSSKIN.vbp"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form TestOCX_new
BackColor = &H00D8E9EC&
BorderStyle = 0 'None
Caption = " 我是一个中国人"
ClientHeight = 8220
ClientLeft = 4365
ClientTop = 1125
ClientWidth = 12630
Icon = "test.frx":0000
LinkTopic = "Form1"
ScaleHeight = 8220
ScaleWidth = 12630
Begin JSSKIN.JSBORDER JSBORDER2
Align = 4 'Align Right
Height = 7710
Left = 12525
TabIndex = 2
Top = 405
Width = 105
_ExtentX = 185
_ExtentY = 13600
BORDERTYPE = 2
End
Begin VB.CommandButton Command4
Caption = "自选"
Height = 375
Left = 3090
TabIndex = 7
Top = 2760
Width = 1305
End
Begin JSSKIN.JSBORDER JSBORDER3
Align = 2 'Align Bottom
Height = 105
Left = 0
TabIndex = 3
Top = 8115
Width = 12630
_ExtentX = 22278
_ExtentY = 185
BORDERTYPE = 3
End
Begin JSSKIN.JSBORDER JSBORDER1
Align = 3 'Align Left
Height = 7710
Left = 0
TabIndex = 1
Top = 405
Width = 105
_ExtentX = 185
_ExtentY = 13600
BORDERTYPE = 1
End
Begin JSSKIN.JSCAPTION JSCAPTION1
Align = 1 'Align Top
Height = 405
Left = 0
TabIndex = 0
Top = 0
Width = 12630
_ExtentX = 22278
_ExtentY = 714
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColor = 14450266
End
Begin VB.CommandButton Command1
Caption = "Luna"
Height = 375
Left = 3030
TabIndex = 6
Top = 1290
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "Perfect Whistler"
Height = 375
Left = 3030
TabIndex = 5
Top = 1770
Width = 1335
End
Begin VB.CommandButton Command3
Caption = "xp"
Height = 375
Left = 3060
TabIndex = 4
Top = 2250
Width = 1305
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 780
Top = 1050
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
End
Attribute VB_Name = "TestOCX_new"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
'最大化
Const SPI_GETWORKAREA = 48
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _
(ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, _
ByVal fuWinIni As Long) As Long
'最大化
'出图标
'Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
'Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
'Private Const GWL_STYLE = (-16)
'Private Const WS_SYSMENU = &H80000
'出图标
Private Sub Command1_Click()
Me.JSCAPTION1.Path = App.Path & "\luna.jss"
Me.JSBORDER1.Path = App.Path & "\luna.jss"
Me.JSBORDER2.Path = App.Path & "\luna.jss"
Me.JSBORDER3.Path = App.Path & "\luna.jss"
Me.JSCAPTION1.REDRAW
End Sub
Private Sub Command2_Click()
Me.JSCAPTION1.Path = App.Path & "\PW.jss"
Me.JSBORDER1.Path = App.Path & "\PW.jss"
Me.JSBORDER2.Path = App.Path & "\PW.jss"
Me.JSBORDER3.Path = App.Path & "\PW.jss"
Me.JSCAPTION1.REDRAW
End Sub
Private Sub Command3_Click()
Me.JSCAPTION1.Path = App.Path & "\jj.jss"
Me.JSBORDER1.Path = App.Path & "\jj.jss"
Me.JSBORDER2.Path = App.Path & "\jj.jss"
Me.JSBORDER3.Path = App.Path & "\jj.jss"
Me.JSCAPTION1.REDRAW
End Sub
Private Sub Command4_Click()
'Dim varTemp As Variant
' Dim byteArr() As Byte
'On Error Resume Next
' Set pb = New PropertyBag
CommonDialog1.ShowOpen
' Open CommonDialog1.FileName For Binary As #1
' Get #1, , varTemp
' Close #1
' Me.Caption = Me.Caption + " " & CommonDialog1.FileName
'byteArr = varTemp
' pb.Contents = byteArr
Me.JSCAPTION1.Path = CommonDialog1.FileName
Me.JSBORDER1.Path = CommonDialog1.FileName
Me.JSBORDER2.Path = CommonDialog1.FileName
Me.JSBORDER3.Path = CommonDialog1.FileName
Me.JSCAPTION1.REDRAW
End Sub
Private Sub Form_Load()
Me.JSCAPTION1.Path = App.Path & "\luna.jss"
Me.JSBORDER1.Path = App.Path & "\luna.jss"
Me.JSBORDER2.Path = App.Path & "\luna.jss"
Me.JSBORDER3.Path = App.Path & "\luna.jss"
'出图标--指的是任务栏上的快捷菜单
' Dim alStyle As Long
'alStyle = GetWindowLong(hwnd, GWL_STYLE) Or WS_SYSMENU
'SetWindowLong hwnd, GWL_STYLE, alStyle
'出图标
'最大化
' Dim lRet As Long
'Dim apiRECT As RECT
' lRet = SystemParametersInfo(SPI_GETWORKAREA, vbNull, apiRECT, 0)
' If lRet Then
'Me.Left = -20
'Me.Top = -20
' Me.Width = (apiRECT.Right - apiRECT.Left) * Screen.TwipsPerPixelX + 40
' Me.Height = (apiRECT.Bottom - apiRECT.Top) * Screen.TwipsPerPixelY + 40
' Else
' Print "调用 SystemParametersInfo 失败"
' End If
'最大化
' Call CornerEdit '圆角处理
End Sub
Private Sub Form_Resize()
If JSCAPTION1.Style2 = dig0 Then '最大化时边线不要
JSBORDER1.Visible = True
JSBORDER2.Visible = True
JSBORDER3.Visible = True
Else
JSBORDER1.Visible = False
JSBORDER2.Visible = False
JSBORDER3.Visible = False
End If '最大化时边线不要
Call CornerEdit '圆角处理
If Me.Width <= 4444 Then Me.Width = 4444
If Me.Height <= 2222 Then Me.Height = 2222
End Sub
Private Sub CornerEdit()
Dim XY(6) As POINTAPI
Dim hRgn As Long
With Me
XY(0).X = 0
XY(0).Y = .Height / 15
XY(1).X = 0
XY(1).Y = 3 '60 / 15
XY(2).X = 45 / 15
XY(2).Y = 0
XY(3).X = (.Width - 45) / 15
XY(3).Y = 0
XY(4).X = .Width / 15
XY(4).Y = 60 / 15
XY(5).X = .Width / 15
XY(5).Y = .Height / 15
XY(6).X = 0
XY(6).Y = .Height / 15
End With
hRgn = CreatePolygonRgn(XY(0), 7, 2)
If JSCAPTION1.Style2 = dig0 Then
Call SetWindowRgn(Me.hwnd, hRgn, True) '圆角处理
Else
Call SetWindowRgn(Me.hwnd, 0, True) '最大化不处理
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -