投稿日 | : 2002/08/25(Sun) 10:00 |
投稿者 | : 花ちゃん |
Eメール | : |
URL | : |
タイトル | : Re^3: タスクバーの制御(タイトルバーが逆に) |
> Me.hide
> スタイルを変更
> Me.show
で試して見ました。タスクバーには表示されなくなったのですが
タイトルバーの部分が左右逆に表示されます。
これは、設定を変更しても戻りません。
私のやり方がまづいのでしょうか? ご指導のほどお願いします。
Option Explicit
Private Declare Function GetWindowLong Lib "user32" _
Alias "GetWindowLongA" (ByVal hwnd As Long, _
ByVal nIndex As Long) 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 Const GWL_EXSTYLE = (-20)
Private Const GWL_STYLE = (-16)
Private Const SW_HIDE = 0
Private Const SW_SHOW = 5
Private Const WS_EX_APPWINDOW = &H40000
Private Sub Command1_Click()
Dim WStyle As Long
Dim Result As Long
WStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
WStyle = WStyle Xor WS_EX_APPWINDOW
Result = ShowWindow(Me.hwnd, SW_HIDE)
Result = SetWindowLong(Me.hwnd, GWL_EXSTYLE, WStyle)
Result = ShowWindow(Me.hwnd, SW_SHOW)
End Sub
失礼しました。
WStyle = GetWindowLong(Me.hwnd, GWL_STYLE) → WStyle = GetWindowLong(Me.hwnd,GWL_EXSTYLE)
これでOKのようです。 お騒がせしました。m(__)m