windows border

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • svbs tech
    New Member
    • Jan 2012
    • 7

    windows border

    hi friends i have following code to stop resizing windows form.
    lStyle = GetWindowLong(F orm1.hwnd, GWL_STYLE)
    lStyle = lStyle And Not WS_THICKFRAME
    Call SetWindowLong(F orm1.hwnd, GWL_STYLE, lStyle)
    i have a image on form as background. this code i ok, but the problem is when is when i click on the title bar of the form and then drag it , there is space automatically inserted between image and border
  • yoda
    Contributor
    • Dec 2006
    • 291

    #2
    Why not just use the windows properties and make the border none-resizeable?

    Comment

    • svbs tech
      New Member
      • Jan 2012
      • 7

      #3
      yes, we can use border style to no-realizable , but if you set border property to no resizeable, but i have to show popup menu and if i set this property form will not show popup menu.

      Comment

      • yoda
        Contributor
        • Dec 2006
        • 291

        #4
        You could just use the resize event so when someone resizes the form or window you just set it back to the original values?

        But obviously it may not be the best choice because user can still resize it technically.

        Comment

        • yoda
          Contributor
          • Dec 2006
          • 291

          #5
          Or you can set the minimum-size and the maximum-size properties to be the same value making it basically a non-resizable form.

          Comment

          Working...