Results 1 to 7 of 7

Thread: Display a resizable form, with NO icon, that isn't a tool form...

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Display a resizable form, with NO icon, that isn't a tool form...

    Just like the subject sez...how?
    I can remove the icon from the Title bar, but my form has to be set to fixed dialog and I can't resize it

    Woka

  2. #2
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    form borderstyle to fixed dialog, find the "Icon" property and press delete/backspace to remove the "(Icon)" thing

    the icon will still appear in the IDE, but when run will magically dissapear
    Anticipation of death is worse than death itself

  3. #3

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    What part of "resizable form" didn't you understand??? Hahahahahaha
    Fixed it...Here's the code:
    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    4. Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
    5.  
    6. Private Const WS_THICKFRAME         As Long = &H40000
    7. Private Const WS_MAXIMIZE           As Long = &H1000000
    8. Private Const WS_MAXIMIZEBOX        As Long = &H10000
    9. Private Const WS_MINIMIZE           As Long = &H20000000
    10. Private Const WS_MINIMIZEBOX        As Long = &H20000
    11.  
    12. Private Const WS_EX_WINDOWEDGE      As Long = &H100
    13. Private Const WS_EX_APPWINDOW       As Long = &H40000
    14. Private Const WS_EX_DLGMODALFRAME   As Long = &H1
    15.  
    16. Private Const GWL_EXSTYLE           As Long = (-20)
    17. Private Const GWL_STYLE             As Long = (-16)
    18.  
    19. Private Sub Form_Load()
    20.     SetWindowLong Me.hwnd, GWL_STYLE, GetWindowLong(Me.hwnd, GWL_STYLE) Or WS_THICKFRAME Or WS_MAXIMIZE Or WS_MAXIMIZEBOX 'Or WS_MINIMIZE  'Or WS_MINIMIZEBOX
    21.     SetWindowLong Me.hwnd, GWL_EXSTYLE, WS_EX_WINDOWEDGE Or WS_EX_APPWINDOW Or WS_EX_DLGMODALFRAME
    22. End Sub

  4. #4
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    d'oh! sorry, when you said "and i can't resize it" i thought you meant you didn't want to. my bad
    Anticipation of death is worse than death itself

  5. #5
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    Hell man, I'd had just used a blank icon lol.

    Nice code though

  6. #6

  7. #7

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