|
こんにちは〜♪
ぴかるさんこんにちは横から失礼します♪
タイトルバーを消すのはAPIが手っ取り早いんですが
ぴかるさんの方法が安全でいいと思いますよ・・
一応サンプルです。
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, _
ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, _
ByVal wFlags As Long) As Long
Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Dim hWnd As Long
Dim ret As Long
Sub Test()
MsgBox "消します。"
hWnd = FindWindow("XLMAIN", Application.Caption)
ret = GetWindowLong(hWnd, -16)
ret = ret Xor &HC00000
ret = SetWindowLong(hWnd, -16, ret)
ret = SetWindowPos(hWnd, 0, 0, 0, 0, 0, &H20 Or &H4 Or &H2 Or &H1)
MsgBox "表示します。"
ret = GetWindowLong(hWnd, -16)
ret = ret Or &HC00000
ret = SetWindowLong(hWnd, -16, ret)
ret = SetWindowPos(hWnd, 0, 0, 0, 0, 0, &H20 Or &H4 Or &H2 Or &H1)
End Sub
では〜♪
|
|