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

📄 erwinspy main.bas

📁 这个源程序用来读写ERWIN设计的ER1文件中的元数据信息
💻 BAS
字号:
Attribute VB_Name = "Module1"
Option Explicit
Private Declare Function SetWindowLong Lib "user32" Alias _
"SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias _
"GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As _
Long) As Long
Private Const WS_EX_APPWINDOW = &H40000
Private Const GWL_EXSTYLE = (-20)

Sub Main()
    On Error GoTo ErrExit
    
    ' Activate the API
    Dim oSCAPI As New SCAPI.Application
    
    ' Init the form
    frmMain.Init oSCAPI
    
    ' Do this to activate the form icon on the taskbar or systray
    ' ShowInTaskBar for the form should be false
    Dim FormStyles As Long
    FormStyles = GetWindowLong(frmMain.hwnd, GWL_EXSTYLE)
    FormStyles = FormStyles Or WS_EX_APPWINDOW
    Call SetWindowLong(frmMain.hwnd, GWL_EXSTYLE, FormStyles)
    
    ' Show the form
    frmMain.Show 1
    
    Exit Sub
' Error exit
ErrExit:
    MsgBox "Failed to create SCAPI instance"

End Sub

⌨️ 快捷键说明

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