????? ????? ????? ????? ?????? Microsoft Excel ???????

?????? ????????? ?????? ?????????
???? ???????: 107689 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

????? ??????? "?? Microsoft Windows ?????????? ?????? ???????? (DLL)" ?????? ??????? ?? ????? Microsoft Excel ??????. ??? ???? ??????? ????? ??????? ??? ??????? ???? "?????" ????? "?????".

??????? ????

???? Microsoft ??????? ???????? ??? ??? ?? ???? ??????? ?? ?? ?????. ??? ????? ???? ?? ????? ??? ???????? ??????? ?????? ???????? ?? ???????? ???? ????. ????? ??? ??????? ???? ?????? ?? ??? ??????? ???? ??? ????? ?? ??????? ???? ??? ????????? ?????? ?????? ?????????. ???? ??????? ????? ??? Microsoft ??? ????? ????? ???? ???? ?? ?????? ?????? ??? ??????? ?????? ????? ?????? ?? ????? ??????? ?????? ??????? ?????. ??? ??? Microsoft Excel ????? ??????? ?????? ????? ??????? ??????. ??? ???? ????? ??????? ???? Declare ?? ????? Visual Basic ??????? ????? Microsoft Windows ????? ????? ??????? ?????? ??????????.

????? Visual Basic ??????? ??????? Disable_Control ? ????? ??????? ???? ???? ?? Microsoft Excel. ??????? ??? ????? ??????? ?????? ????? ????? ??????? ?? Microsoft Excel (??? ????? ????? Microsoft Excel ???? ????? ????? ????? ??????). ??????? RestoreSystemMenu ???????? ????? ??????.

??????? Microsoft Excel 97 ? 7.0

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
      (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, _
      ByVal bRevert As Integer) As Integer

Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Integer, _
      ByVal nPosition As Integer, ByVal wFlags As Integer) As Integer

'The following procedure disables the Control menu.
Sub Disable_Control()
   Dim X As Integer, hwnd As Long
   hwnd = FindWindow("XLMain", Application.Caption)
   For X = 1 To 9
      'Delete the first menu command and loop until
      'all commands are deleted
      Call DeleteMenu(GetSystemMenu(hwnd, False), 0, 1024)
   Next X
End Sub

'The following procedure restores the Control menu.
'Note that to run this procedure, the Declare statements above
'must be in the module.
Sub RestoreSystemMenu()
   Dim hwnd As Long
   'Get the window handle of the Excel application.
   hwnd = FindWindow("xlMain", Application.Caption)
   'Restore system menu to original state.
   hMenu% = GetSystemMenu(hwnd, 1)
End Sub
				

5.x ??????? Microsoft Excel

'The following procedure disables the Control menu
Declare Function GetActiveWindow Lib "User" () As Integer

Declare Function GetSystemMenu Lib "User" (ByVal hWnd As Integer, _
   ByVal bRevert As Integer) As Integer

Declare Function DeleteMenu Lib "User" (ByVal hMenu As Integer, _
   ByVal nPosition As Integer, ByVal wFlags As Integer) As Integer

Sub Disable_Control()
   Dim X as Integer
   For X = 1 to 9
      'Delete the first menu command and loop until
      'all commands are deleted
      Call DeleteMenu(GetSystemMenu(GetActiveWindow, False),0,1024)
   Next X
End Sub

'The following procedure restores the Control menu
'Note that to run this procedure, the Declare statements above
'must be in the module
Sub RestoreSystemMenu()
   'get the window handle of the Excel application
   hWnd = GetActiveWindow()
   'restore system menu to original state
   hMenu% = GetSystemMenu(hWnd, 1)
End Sub

?????????

??? ????? ??????? ???????? ?? ??????? ???? ?????? ????? ?? ?????. ????? ??????? ???? ?????? ?????????? ??? ???: "??????? ????? ??????" ?? ?????? 0, ??? ??? ?????? 1, ???? ??? ?????? 2 ?????. ??? ??? ??? ??? ??????? ???? ?????? ?????? ????? ?? ???.

???? ????? ????? ?? ????? ???? ?????? ??? ??? ??????? ??????? ????? ????? ??? ??????? ???. ??? ???? ?????? ??????? ???????? ?? ????????? ???????? ??? ??????? ????? ?? ???? For ?????? ?? ??????? ?????? Disable_Control ???? ??? ????? (?????? 4) ???????? ????? (?????? 3) ?? ?? ?????? "?????" ????? "?????.
   Call DeleteMenu(GetSystemMenu(GetActiveWindow, False),4,1024)
   Call DeleteMenu(GetSystemMenu(GetActiveWindow, False),3,1024)
				

???????

???? ???????: 107689 - ????? ??? ??????: 25/????? ??????/1428 - ??????: 2.3
????? ???
  • Microsoft Excel 97 Standard Edition
????? ??????: 
kbmt kbprogramming KB107689 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????107689
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com