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

📄 module_窗体逐渐显示效果.bas

📁 日本富士仪表PXR的MODBUS通信测试
💻 BAS
字号:
Attribute VB_Name = "Module_窗体逐渐显示效果"
Option Explicit
    
    Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
    Private Declare Function SetLayeredWindowAttributes Lib "user32.dll" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
    Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    
    Private Const LWA_ALPHA = &H2
    Private Const LWA_COLORKEY = &H1
    Private Const GWL_EXSTYLE = -20
    Private Const WS_EX_LAYERED = &H80000

Public Sub setfrm(frm As Form, ByVal limpid As Long) ' 设置窗体透明度
    Call SetWindowLong(frm.hWnd, GWL_EXSTYLE, GetWindowLong(frm.hWnd, GWL_EXSTYLE) Or WS_EX_LAYERED)
    Call SetLayeredWindowAttributes(frm.hWnd, 0, limpid, LWA_ALPHA)    'limpid在0--255之间
End Sub

Public Sub talkewithme()
    ShellExecute 0, "open", "tencent://message/?uin=344177293&Site=留言&Menu=yes", "", "", 1
End Sub

⌨️ 快捷键说明

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