电竞比分网-中国电竞赛事及体育赛事平台

分享

標題欄

 厚怡 2021-11-11
引用: 以下是引用南山下在2003-8-29 16:11:00的發(fā)言: 請教: 如何隱藏EXCEL和USERFORM的標題欄? 這個問題在論壇中有例子,但不知如何使用。 請高手詳細解惑?
您好: 請參考附件 Private Declare Function GetWindowLong Lib 'user32' Alias 'GetWindowLongA' (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Declare Function FindWindow Lib 'user32' Alias 'FindWindowA' (ByVal lpClassName As String, ByVal lpWindowName As String) 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 Declare Function ShowWindow Lib 'user32' (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Private Declare Function DrawMenuBar Lib 'user32' (ByVal hwnd As Long) As Long Private Declare Function SetFocus Lib 'user32' (ByVal hwnd As Long) As Long Private Const WS_CAPTION As Long = &HC00000 Private Const GWL_STYLE = (-16) Private Const SW_SHOW As Long = 5 Sub SetFormStyle(hwnd As Double) Dim IStyle As Long IStyle = GetWindowLong(hwnd, GWL_STYLE) IStyle = IStyle And Not WS_CAPTION SetWindowLong hwnd, GWL_STYLE, IStyle ShowWindow hwnd, SW_SHOW DrawMenuBar hwnd SetFocus hwnd End Sub Sub UndoSetFormStyle(hwnd As Double) Dim IStyle As Long IStyle = GetWindowLong(hwnd, GWL_STYLE) IStyle = IStyle Or WS_CAPTION SetWindowLong hwnd, GWL_STYLE, IStyle ShowWindow hwnd, SW_SHOW DrawMenuBar hwnd SetFocus hwnd End Sub Function hWndForm() As Long hWndForm = FindWindow('ThunderDFrame', UserForm1.Caption) End Function Function hWndExcel() As Long hWndExcel = FindWindow(vbNullString, Application.Caption) 'Excel End Function

7lldfVRp.rar   2003-9-2 17:40 上傳

標題欄

8.35 KB, 下載次數(shù): 280

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多