Results 1 to 8 of 8

Thread: APIs Used For Fixed Single With Minimize Button

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    APIs Used For Fixed Single With Minimize Button

    Can someone please tell me what APIs and arguements are used to create a Fixed Single style window with a minimize button? I need an example using SetWindowLong. Thank you

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: APIs Used For Fixed Single With Minimize Button

    Just set the BorderStyle to Fixed Single and the MinButton property to True

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    Re: APIs Used For Fixed Single With Minimize Button

    I know but I need to change the window style while the program is running so I need to use SetWindowLong

  4. #4
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: APIs Used For Fixed Single With Minimize Button

    No you can still set the properties at runtime.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    Re: APIs Used For Fixed Single With Minimize Button

    This doesn't work:
    Private Sub Command1_Click()
    Me.BorderStyle = 1
    Me.MinButton = True
    End Sub

  6. #6
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: APIs Used For Fixed Single With Minimize Button

    It should here is an example for changing the forms borderstyle to None

    Code:
    Form1.BorderStyle = 0
    Form1.Caption = Form1.Caption

  7. #7
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: APIs Used For Fixed Single With Minimize Button

    If you really must use API then have a look at the following thread...

    http://www.vbforums.com/showthread.p...e+form+runtime

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: APIs Used For Fixed Single With Minimize Button

    Actually this is better.

    Post #9 on down...
    http://www.vbforums.com/showthread.php?threadid=202781
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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