Page 2 of 2 FirstFirst 12
Results 41 to 58 of 58

Thread: Form Layout: Constructive Criticism

  1. #41
    Fanatic Member CodedFire's Avatar
    Join Date
    Aug 2007
    Location
    In Cog Neato
    Posts
    568

    Re: Form Layout: Constructive Criticism

    You weren't lying when you said you where drawing it all yourself huh, i notice some of the main functions are missing (for obvious reasons of course). But i definitely get how your doing it now.
    Languages: Visual Basic 05/08, C# 08
    IDE: Express Editions
    Framework: 2.0, 3.0, 3.5


    Lesson 5: Don't take domestic advice from perpetual singles. - Mendhak

  2. #42

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: Form Layout: Constructive Criticism

    I have reorganised the contact window a bit, but I am still using the TabControl at the moment. I will start working on collapsable sections as well as you suggested, Lord_Orwell, but this will probably take a while.



    Which functions were missing, CodedFire? I didn't deliberately leave any out...
    Last edited by dom_stapleton; Jun 5th, 2008 at 08:54 PM.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  3. #43
    Fanatic Member CodedFire's Avatar
    Join Date
    Aug 2007
    Location
    In Cog Neato
    Posts
    568

    Re: Form Layout: Constructive Criticism

    Sorry i wasnt being cheeky, i thought you where protecting your work. Um, this one here: MakeWindowGlass(Me.Handle, 0, 0, 40, 0)
    Languages: Visual Basic 05/08, C# 08
    IDE: Express Editions
    Framework: 2.0, 3.0, 3.5


    Lesson 5: Don't take domestic advice from perpetual singles. - Mendhak

  4. #44

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: Form Layout: Constructive Criticism

    Check out this post:

    http://www.vbforums.com/showthread.p...98#post3247798

    There's a class that contains the necessary code for drawing glowing text on a form there.
    Last edited by dom_stapleton; Jun 5th, 2008 at 09:06 PM.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  5. #45
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Form Layout: Constructive Criticism

    while i have a good idea for the interface, i have no idea how you would go about creating the effect, unless there's a vb.net control i am not aware of that has that functionality? Actually something closer to the design of the way the visual studio toolbox is done would be much cooler, and you could fit more on screen at once.
    Last edited by Lord Orwell; Jun 5th, 2008 at 08:50 PM.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  6. #46

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: Form Layout: Constructive Criticism

    There is a control that inherits from the Panel control. It has a header that, when clicked, expands and collapses it, so that won't be too much of a problem.

    The header of this control is custom painted so emulating the Visual Studio toolbox should be quite easy.

    PS: I've updated the form image in post #42 slightly.
    Last edited by dom_stapleton; Jun 5th, 2008 at 09:07 PM.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  7. #47

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: Form Layout: Constructive Criticism

    Sorry, CodedFire, this is the code for the MakeWindowGlass method:

    Code:
    Private Structure MARGINS
        Public cxLeftWidth As Integer
        Public cxRightWidth As Integer
        Public cyTopHeight As Integer
        Public cyBottomHeight As Integer
    End Structure
    
    <DllImport("dwmapi.dll", CallingConvention:=CallingConvention.Winapi, CharSet:=CharSet.Auto)> _
    Private Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As MARGINS) As Integer
    End Function
    
    Private Sub MakeWindowGlass(ByVal hWnd As IntPtr, ByVal leftMargin As Integer, ByVal rightMargin As Integer, ByVal topMargin As Integer, ByVal bottomMargin As Integer)
    
        Dim margins As New MARGINS
        With margins
            .cxLeftWidth = leftMargin
            .cxRightWidth = rightMargin
            .cyTopHeight = topMargin
            .cyBottomHeight = bottomMargin
        End With
        DwmExtendFrameIntoClientArea(hWnd, margins)
    
    End Sub
    Last edited by dom_stapleton; Jun 5th, 2008 at 09:05 PM.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  8. #48
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Form Layout: Constructive Criticism

    Quote Originally Posted by dom_stapleton
    There is a control that inherits from the Panel control. It has a header that, when clicked, expands and collapses it, so that won't be too much of a problem.

    The header of this control is custon painted so emulating the Visual Studio toolbox should be quite easy.

    PS: I've updated the form image in post #42 slightly.
    could you be more specific? I would love to know what control it is so i can make collapsible panels myself.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  9. #49

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: Form Layout: Constructive Criticism

    Quote Originally Posted by Lord Orwell
    could you be more specific? I would love to know what control it is so i can make collapsible panels myself.
    Follow the "XP Common Controls Library" link in my signature. This guy has made a control, called a TaskBox, that performs this functionality.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  10. #50
    Fanatic Member CodedFire's Avatar
    Join Date
    Aug 2007
    Location
    In Cog Neato
    Posts
    568

    Re: Form Layout: Constructive Criticism

    Excellent code! Thanks Dom!
    Languages: Visual Basic 05/08, C# 08
    IDE: Express Editions
    Framework: 2.0, 3.0, 3.5


    Lesson 5: Don't take domestic advice from perpetual singles. - Mendhak

  11. #51
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Form Layout: Constructive Criticism

    Quote Originally Posted by dom_stapleton
    Follow the "XP Common Controls Library" link in my signature. This guy has made a control, called a TaskBox, that performs this functionality.
    his site says "won't work without xp". This probably isn't an issue if it also works on vista, but it doesn't say.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  12. #52

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: Form Layout: Constructive Criticism

    I think he means that the theming of the control doesn't work without XP as it's hardcoded to syncronise with the old XP themes. The basic principle of the control still works though.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  13. #53

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: Form Layout: Constructive Criticism

    Last edited by dom_stapleton; Jun 6th, 2008 at 02:07 PM.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  14. #54
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Form Layout: Constructive Criticism

    lol i used to run a program i designed in a prison's motorpool to track work done to their fleet (86 vehicles). You could delete records, but you had to enter a password to do so.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  15. #55

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: Form Layout: Constructive Criticism

    Updated the window again a bit. Based it on the new Windows Explorer style from Windows 7. I've simplified the menu system too, like IE 7.

    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  16. #56
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Form Layout: Constructive Criticism

    Only thing i personally don't like is the save/save and close/close trio of buttons. I would either make the save and close a dropdown and have the other two buttons in it or have a separate save and a close button, with the close button prompting you to save if you haven't.

    More feedback: The close button is in fact completely unnecessary since the form has a close button. I am a big fan of standard interfaces as well and it seems to me the standard nomenclature labels them as "exit" not close.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  17. #57

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: Form Layout: Constructive Criticism

    Thanks for your post, Lord_Orwell.

    I take your point with the Save, Save and Close and Close buttons. I'm just going to replace them with Save and Revert (reverts the contact to the state it was in when it was last saved).

    As for the use of the term Close: I feel this is the correct term as the window is merely a child window of a bigger application. My main window has an Exit menu option as it actually exits the application. Close denotes that it just closes this one window, which is what it does.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  18. #58
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Form Layout: Constructive Criticism

    ok that's fine then. I wasn't aware it was part of a MDI.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

Page 2 of 2 FirstFirst 12

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