⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 是API教程3
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00C0C0C0&
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Right"
      Height          =   315
      Index           =   1
      Left            =   840
      TabIndex        =   2
      Top             =   2460
      Width           =   3135
   End
   Begin VB.OptionButton Option1 
      Caption         =   "Option1"
      Height          =   375
      Left            =   600
      TabIndex        =   1
      Top             =   660
      Width           =   3435
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Left"
      Height          =   315
      Index           =   0
      Left            =   840
      TabIndex        =   0
      Top             =   2100
      Width           =   3135
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Declare Function GetWindowLong& Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long)
Private Declare Function SetWindowLong& Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long)

Private Const BS_LEFTTEXT& = &H20&
Private Const GWL_STYLE& = (-16)


Private Sub Command1_Click(Index As Integer)
    Dim f&, dl&
    f& = GetWindowLong(Option1.hWnd, GWL_STYLE)
    If Index = 0 Then
         f& = f& Or BS_LEFTTEXT
    Else
         f& = f& And Not BS_LEFTTEXT
    End If
    dl& = SetWindowLong(Option1.hWnd, GWL_STYLE, f&)
    Option1.Refresh
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -