|
▼kohji さん:
>rino さん こんにちは
>
>以下で Accessの閉じるボタンの無効化ができました
>参考にしてください
>
>Option Compare Database
>Option Explicit
>
>Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, ByVal fRever As Long) As Long
>Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal uItem As Long, ByVal fuFlags As Long) As Long
>Private Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
>
>Private Const MF_BYCOMMAND = &H0&
>Private Const SC_SIZE = &HF000
>Private Const SC_MAXIMIZE = &HF030
>Private Const SC_CLOSE = &HF060
>Private Const SC_RESTORE = &HF120
>
>Public Function SetAccWinStyle()
> Dim hWnd As Long
>
> hWnd = GetSystemMenu(hWndAccessApp, 0)
> RemoveMenu hWnd, SC_CLOSE, MF_BYCOMMAND
> DrawMenuBar hWndAccessApp
>End Function
すみません。このコードをどこに記入すればよいのでしょうか。
教えてください。よろしくお願いします。
|
|