ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¨Ï¥Îvba ¨ÏExcelµøµ¡¥k¤W¨¤¤§ÁY¤p©ñ¤j"¥¢®Ä"?

[µo°Ý] ¨Ï¥Îvba ¨ÏExcelµøµ¡¥k¤W¨¤¤§ÁY¤p©ñ¤j"¥¢®Ä"?

½Ð±Ð¦U¦ì¥ý¶i:
À³¦p¦ó¨Ï¥Îvba ¨ÏExcelµøµ¡¥k¤W¨¤¤§ÁY¤p©ñ¤j"¥¢®Ä"?
(Excel2003   Excel2010¤¤§¡¥i¨Ï¥Î)

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2014-7-4 14:55 ½s¿è

¦^´_ 1# yangjie
google¥i§ä¨ì¥ÎAPIªº¤èªk
2.PNG
1.png
  1. Option Explicit

  2. Public Const GWL_STYLE = (-16)
  3. Public Const WS_THICKFRAME = &H40000
  4. Public Const WS_MINIMIZEBOX = &H20000
  5. Public Const WS_MAXIMIZEBOX = &H10000

  6. Public Declare Function GetWindowLong Lib "User32" Alias "GetWindowLongA" ( _
  7.     ByVal hWnd As Long, _
  8.     ByVal nIndex As Long) As Long

  9. Public Declare Function SetWindowLong Lib "User32" Alias "SetWindowLongA" ( _
  10.     ByVal hWnd As Long, _
  11.     ByVal nIndex As Long, _
  12.     ByVal dwNewLong As Long) As Long


  13. Public Sub Prevent_Window_Resize()

  14.     Dim hWnd As Long
  15.     Dim style As Long
  16.     Dim ret As Long
  17.    
  18.     hWnd = Application.hWnd
  19.         
  20.     style = GetWindowLong(hWnd, GWL_STYLE)
  21.       
  22.     style = style And Not (WS_THICKFRAME Or WS_MAXIMIZEBOX Or WS_MINIMIZEBOX)
  23.     ret = SetWindowLong(hWnd, GWL_STYLE, style)
  24.    
  25. End Sub
½Æ»s¥N½X
­nÁÙ­ì¥i§â
style = style And Not (WS_THICKFRAME Or WS_MAXIMIZEBOX Or WS_MINIMIZEBOX)
§ï¦¨
style = style OR (WS_THICKFRAME Or WS_MAXIMIZEBOX Or WS_MINIMIZEBOX)
¦A°õ¦æ

TOP

        ÀR«ä¦Û¦b : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD