Results 1 to 4 of 4

Thread: How to disable resize,and move

  1. #1

    Thread Starter
    Lively Member VB Begginer Kid's Avatar
    Join Date
    Jul 2001
    Location
    home
    Posts
    127

    How to disable resize,and move

    is there a way to disable the three windows buttons in the top right corner of the window? and disable move and resize?
    I'm a beginner.
    ------------------------------------------------
    Your impossible ego ***** is like a
    Megalomaniacal tab on my tongue
    You *****in' touch me I will rip you apart


  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Q1 : Set the ControlBox property to False (takes it away, doesn't disable)

    Q2.5 : Set the BorderStyle property to Fixed Single

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Junior Member
    Join Date
    Jun 2001
    Location
    Hong Kong
    Posts
    31
    Set the properties of the form :


    control box - false
    movable - false
    border - single fixed

  4. #4
    Matthew Gates
    Guest
    You can also use the RemoveMenu API function to disable all these if you wish to do it in runtime.


    VB Code:
    1. Private Declare Function GetSystemMenu Lib "User32" _
    2. (ByVal hWnd As Integer, ByVal bRevert As Integer) As Integer
    3.  
    4. Private Declare Function RemoveMenu Lib "User32" (ByVal hMenu _
    5. As Integer, ByVal nPosition As Integer, ByVal wFlags As Integer) _
    6. As Integer
    7.  
    8. Const MF_BYPOSITION = &H400
    9.  
    10. Private Sub Form_Load()
    11.     RemoveMenu GetSystemMenu(hWnd, 0), 0, MF_BYPOSITION
    12.     RemoveMenu GetSystemMenu(hWnd, 0), 0, MF_BYPOSITION
    13.     RemoveMenu GetSystemMenu(hWnd, 0), 0, MF_BYPOSITION
    14.     RemoveMenu GetSystemMenu(hWnd, 0), 0, MF_BYPOSITION
    15.     RemoveMenu GetSystemMenu(hWnd, 0), 0, MF_BYPOSITION
    16.     RemoveMenu GetSystemMenu(hWnd, 0), 0, MF_BYPOSITION
    17.     RemoveMenu GetSystemMenu(hWnd, 0), 0, MF_BYPOSITION
    18. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width