Page 1 of 4 1234 LastLast
Results 1 to 40 of 122

Thread: GUI Design

  1. #1

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307

    GUI Design

    I was just wondering about the design of the GUI in my app.
    It's a bit bland really and doesn't really excite.

    How do you guys and gals go about designing a really good, nice-looking, functional GUI?

    Do you have any links to sites with examples of a good Windows Application Interface etc? Good book recommendations etc??
    "I'm Brian and so is my Wife"

  2. #2
    Fanatic Member JPicasso's Avatar
    Join Date
    Aug 2001
    Location
    Kalamazoo, MI
    Posts
    843
    Find an application you find easy to use,
    and copy it.
    Merry Christmas

  3. #3

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    LOL!!

    Cheers mate.

    Not quite the answer I was looking for.....with your username I'd have thought you might be able to help me in this area!!
    "I'm Brian and so is my Wife"

  4. #4

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    Well, this is my design as it is so far.....any comments would be greatly appreciated.....
    Attached Images Attached Images  
    "I'm Brian and so is my Wife"

  5. #5
    Fanatic Member JPicasso's Avatar
    Join Date
    Aug 2001
    Location
    Kalamazoo, MI
    Posts
    843
    Looks good to me.

    Simple and effective. Much better than some interfaces where every frame is a different rainbow color or the graphics get in the way of the functionality.



    I like it so much I may copy it.
    Merry Christmas

  6. #6
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    The Big D
    Posts
    310
    Here is a shot of a project I am nearly finished with. Hope it helps.



  7. #7

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    That does look good VBGuy I must admit.
    Like the colours especially (cornflower blue, is that?)......

    Thanks for the feedback Picasso, mate.....feel free to copy it! I'll take it as a compliment.

    Anybody else got any comment?
    "I'm Brian and so is my Wife"

  8. #8
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    The Big D
    Posts
    310
    Actually, the blue is from the current selected windows theme (which is right now set to the default blue). The side panel is from Dacris' control set and it fully integrates with the windows theme.

  9. #9
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    I would ditch the yellow background.... gray tones or faded colors look more professional.. otherwise looks good.
    Last edited by nemaroller; Jul 29th, 2004 at 08:44 AM.

  10. #10

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    Thanks for that.

    I'll try some differing colour schemes and stuff and maybe post some of my faves.
    "I'm Brian and so is my Wife"

  11. #11

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    VBGuy,

    How did you get the blue fading to white in your GUI (the
    Movement Forecasting part). Is that a graphic inside a panel or something??
    "I'm Brian and so is my Wife"

  12. #12
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    The Big D
    Posts
    310
    Actually, that is a graphic. I have the luxury of our users being locked into using the default blue theme exclusively (or so the network admin tells me) so I just created that gradient in photoshop and included it. If they werent locked in I guess I would have had to create the gradient in code going from the left taskpane backcolor (or whatever system color that is using) to white.

  13. #13

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    It looks good mate. I like it.
    "I'm Brian and so is my Wife"

  14. #14
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    The Big D
    Posts
    310
    Thanks.

  15. #15
    Fanatic Member LITHIA's Avatar
    Join Date
    Dec 2002
    Location
    UK, England
    Posts
    575
    yeah, very pretty. would be interesting to see the code to make that gradiant depending upon the system colours actually.

    i think that would be a good thing to do anyway. it might be a learning experience, and it would be more efficient as you don't need to have a bitmap or other image format bundled with your exe, reduces the size.

    although whatever really, just wud be interesting to see the code to do that. i haven't worked with graphics before in code

  16. #16
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    The Big D
    Posts
    310
    LITHIA,

    Odd you should mention that! I just got up to take a leak not 5 minutes ago and I said to myself, "Hey, why not just code that gradiant this afternoon and scrape the image..."

  17. #17
    Fanatic Member LITHIA's Avatar
    Join Date
    Dec 2002
    Location
    UK, England
    Posts
    575
    hehe, i must be pyschic

    can you include the code you write please? dat wud be interesting! thanks

  18. #18

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    I'd be very interested in doing that too!!

    I will have a go myself and post back here.
    "I'm Brian and so is my Wife"

  19. #19
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    The Big D
    Posts
    310
    Originally posted by LITHIA
    hehe, i must be pyschic

    can you include the code you write please? dat wud be interesting! thanks

    OK, this is my code. First I draw a solid white rectangle 31 pixels high and the width of the form. I then draw the gradient rectangle on top of the white. I did this because I could not find a quick way to adjust the gradient fade rate. This solution puts the gradient on only half of the form width so we still get the nice white half. Finally, I draw the black border around the rectangle.

    The only additional line of code in the OnResize event. That line is
    Me.Refresh

    My next step would be to draw the text as well but since a label works, I'm not too interested in adding that step at this time.


    VB Code:
    1. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
    2.  
    3.         Dim g As Graphics = e.Graphics
    4.         Dim startColor As Color = Color.CornflowerBlue
    5.         Dim halfRect As Rectangle = New Rectangle(0, 0, Me.Width \ 2, 31)
    6.         Dim rect As Rectangle = New Rectangle(0, 0, Me.Width + 50, 31)
    7.  
    8.         Dim MyPen As Pen = New Pen(Color.Black)
    9.         Dim MyBrush As LinearGradientBrush = New LinearGradientBrush(halfRect, startColor, Color.White, LinearGradientMode.Horizontal)
    10.         Dim MyBackFillBrush As SolidBrush = New SolidBrush(Color.White)
    11.  
    12.         g.FillRectangle(MyBackFillBrush, rect)
    13.         g.FillRectangle(MyBrush, halfRect)
    14.         g.DrawRectangle(MyPen, rect)
    15.  
    16.     End Sub

    As you can see it is pretty close to the original


  20. #20
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    "The smoothing mode specifies whether lines, curves, and the edges of filled areas use smoothing (also called antialiasing). One exception is that path gradient brushes do not obey the smoothing mode. Areas filled using a PathGradientBrush object are rendered the same way (aliased) regardless of the SmoothingMode property."

    LinearGradients don't fall into that category I believe... so you could make it look even purdier...

  21. #21
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    The Big D
    Posts
    310
    Actually, I bumped the image for the post down to 256 colors to keep the size down. In real life it looks smooth as a babies bottom.

    Also, I am still trying to hook the startcolor to the theme so for now it is hard coded to CornflowerBlue.

  22. #22

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    OK. This is what I have.

    Create a new Control Library project and paste this code into it..

    VB Code:
    1. Imports System.ComponentModel
    2. Imports System.Drawing.Drawing2D
    3.  
    4. Public Class GradientBackground
    5.     Inherits System.Windows.Forms.Control
    6.  
    7. #Region " Windows Form Designer generated code "
    8.  
    9.     Public Sub New()
    10.         MyBase.New()
    11.  
    12.         'This call is required by the Windows Form Designer.
    13.         InitializeComponent()
    14.  
    15.         'Add any initialization after the InitializeComponent() call
    16.  
    17.     End Sub
    18.  
    19.     'UserControl1 overrides dispose to clean up the component list.
    20.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
    21.         If disposing Then
    22.             If Not (components Is Nothing) Then
    23.                 components.Dispose()
    24.             End If
    25.         End If
    26.         MyBase.Dispose(disposing)
    27.     End Sub
    28.  
    29.     'Required by the Windows Form Designer
    30.     Private components As System.ComponentModel.IContainer
    31.  
    32.     'NOTE: The following procedure is required by the Windows Form Designer
    33.     'It can be modified using the Windows Form Designer.  
    34.     'Do not modify it using the code editor.
    35.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    36.         '
    37.         'GradientBackground
    38.         '
    39.         Me.Name = "GradientBackground"
    40.         Me.Size = New System.Drawing.Size(632, 24)
    41.  
    42.     End Sub
    43.  
    44. #End Region
    45.  
    46.     'The start color property
    47.     Dim m_StartColor As Color = Color.CornflowerBlue
    48.  
    49.     <Description("The start color for the gradient")> _
    50.         Property StartColor() As Color
    51.         Get
    52.             Return m_StartColor
    53.         End Get
    54.         Set(ByVal Value As Color)
    55.             m_StartColor = Value
    56.             'Redraw the control when this property changes
    57.             Me.Invalidate()
    58.         End Set
    59.     End Property
    60.  
    61.     Sub ResetStartColor()
    62.         m_StartColor = Color.CornflowerBlue
    63.     End Sub
    64.  
    65.     Function ShouldSerializeStartColor() As Boolean
    66.         Return Not m_StartColor.Equals(Color.CornflowerBlue)
    67.     End Function
    68.  
    69.     'The end color property
    70.     Dim m_EndColor As Color = Color.Goldenrod
    71.  
    72.     <Description("The end color for the gradient")> _
    73.         Property EndColor() As Color
    74.         Get
    75.             Return m_EndColor
    76.         End Get
    77.         Set(ByVal Value As Color)
    78.             m_EndColor = Value
    79.             'Redraw the control if this value changes
    80.             Me.Invalidate()
    81.         End Set
    82.     End Property
    83.  
    84.     Sub ResetEndColor()
    85.         m_EndColor = Color.Goldenrod
    86.     End Sub
    87.  
    88.     Function ShouldSerializeEndColor() As Boolean
    89.         Return Not m_EndColor.Equals(Color.Goldenrod)
    90.     End Function
    91.  
    92.     'The gradient mode property
    93.     Dim m_GradientMode As LinearGradientMode = _
    94.         LinearGradientMode.ForwardDiagonal
    95.  
    96.     <Description("The gradient mode"), _
    97.         DefaultValue(LinearGradientMode.ForwardDiagonal)> _
    98.         Property GradientMode() As LinearGradientMode
    99.         Get
    100.             Return m_GradientMode
    101.         End Get
    102.  
    103.         Set(ByVal Value As LinearGradientMode)
    104.             m_GradientMode = Value
    105.             'Redraw when changed
    106.             Me.Invalidate()
    107.         End Set
    108.     End Property
    109.  
    110.     'Render the control background
    111.     Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
    112.         'Create a gradient brush as a large client area with specified
    113.         'start/end color and gradient mode.
    114.         Dim br As New LinearGradientBrush(Me.ClientRectangle, _
    115.             m_StartColor, m_EndColor, m_GradientMode)
    116.         'paint the rectangle
    117.         e.Graphics.FillRectangle(br, Me.ClientRectangle)
    118.         'destroy the brush
    119.         br.Dispose()
    120.         'let the base control do the work...
    121.         MyBase.OnPaint(e)
    122.  
    123.     End Sub
    124.  
    125.     Private Sub GradientBackground_Resize(ByVal sender As Object, _
    126.     ByVal e As EventArgs)
    127.         Me.Invalidate()
    128.     End Sub

    Now, add the new control to your toolbar, drag an instance to your form and you have a background gradient control that you can set start and end colors for as well as the gradient path.

    Got to be honest - I ripped this out of Balena's book, but it works a treat!
    "I'm Brian and so is my Wife"

  23. #23
    Fanatic Member LITHIA's Avatar
    Join Date
    Dec 2002
    Location
    UK, England
    Posts
    575
    move the black box one pixel to the left.

    if you notice, you got the edge on the left of the box showing. it's alright on the right tho, may not be when u move it so u might have to resize too

  24. #24
    Lively Member
    Join Date
    Jan 2002
    Posts
    105
    VBGuy:

    How did you get the images on the buttons in the bottom corner with XP style? Is this a 3rd party control?

    And is the "Pricing" & "Costs" rectangles a control as well or is it just a rounded rectangle with a label over the top bit, because thats the way i do it.

  25. #25
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    The Big D
    Posts
    310
    LITHIA,

    I noticed the one pixel thing and fixed it after I did the screen shot. Nice catch.

    Wallabie,

    I am using a third party class that extends the visual styles. That allows the button graphics and the look of the tab control. I'll post on Monday the name of the extender class (I'm home now and don't remember the name).

  26. #26
    Lively Member
    Join Date
    Jan 2002
    Posts
    105
    Thanks VBGuy

  27. #27
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    The Big D
    Posts
    310
    Wallabie,

    The extender class is from Skybound

    It is one line of code at the project level and one line of code per form. Pretty easy to use.

  28. #28
    Registered User
    Join Date
    Jul 2001
    Posts
    283
    vbGuy -

    how do you get those collapsing menus on the left side of your app?

  29. #29
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    The Big D
    Posts
    310
    Originally posted by marvinklein
    vbGuy -

    how do you get those collapsing menus on the left side of your app?
    Those are from the NetXP controls suite by Dacris

  30. #30
    Lively Member
    Join Date
    Jan 2002
    Posts
    105
    Thank you VBGuy, i'll look into that.

    I have VS 2002 and using the v1.0 Framework so hopefully it will still work ok with a manifest file.

  31. #31
    Lively Member
    Join Date
    Jul 2004
    Location
    Can't say sorry :)
    Posts
    79
    Since this is related to this, I figured I would ask my quetion here rather then post a new one.

    I made a dropdown list box. And It's supposed to change the backround editor to a color.

    So what I mean is. If I name one of them red.
    I would show in the main file thing (where I want the backround color changed) that it should be
    form.color ?

    I wish I could give a better example.



  32. #32

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    Originally posted by VBGuy
    Those are from the NetXP controls suite by Dacris
    VBGuy,

    Do these controls move up/down when expanding collapsing, or are your title bars spaced quite far apart when they are both collapsed?

    I've got the controls myself, but it looks quite ugly when they are all collapsed, due to lots of space between them!!

    TIA
    "I'm Brian and so is my Wife"

  33. #33
    Lively Member TLord's Avatar
    Join Date
    Jun 2004
    Posts
    95
    Thanks VBGuy, I tried NetXP Controls Suite and it's just GREAT.
    Do you think my life is easy?
    Do you think it's good to win?
    do you think it's nice to kill?
    Do you think learning is a must?
    Do you think computers are nothing?
    Do you think this post is stupid?
    Do ypu think we're really humen?

    DO YOU THINK IT'S GOOD TO THINK AT ALL? ? ? ! ! !

  34. #34

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    Originally posted by LeeSalter
    VBGuy,

    Do these controls move up/down when expanding collapsing, or are your title bars spaced quite far apart when they are both collapsed?

    I've got the controls myself, but it looks quite ugly when they are all collapsed, due to lots of space between them!!

    TIA
    Me being stupid! You have to put the Xpane Group controls inside the XPane control to have them move.

    Still can't work out how to change the colour of the XPane background though! (I'm working on a W2K machine).
    "I'm Brian and so is my Wife"

  35. #35

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    OK.

    Comments please on my new GUI design.

    TIA
    Attached Images Attached Images  
    "I'm Brian and so is my Wife"

  36. #36
    Lively Member TLord's Avatar
    Join Date
    Jun 2004
    Posts
    95
    Originally posted by LeeSalter
    OK.

    Comments please on my new GUI design.

    TIA
    Stop kidding around, the important is the core of your software - the internal functions and capabilities - . I personally use the EnableVisualStyle() function at startup for using WindowsXP interface, but believe me: I myself ignore the GUI after a short time, you will probably get busy with working and finishing the work you developped that app for.
    Do you think my life is easy?
    Do you think it's good to win?
    do you think it's nice to kill?
    Do you think learning is a must?
    Do you think computers are nothing?
    Do you think this post is stupid?
    Do ypu think we're really humen?

    DO YOU THINK IT'S GOOD TO THINK AT ALL? ? ? ! ! !

  37. #37

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307
    I know that TLord. However, we all work differently don't we.

    I like to get my GUI design nice and tight, looking good before getting into the mechnics of the code, otherwise I find myself re-writing all sorts of stuff if I'm unhappy with my GUI and changing it all the time.

    Thanks for your comments though mate, interesting to see how different people work.

    Cheers.
    "I'm Brian and so is my Wife"

  38. #38
    Lively Member TLord's Avatar
    Join Date
    Jun 2004
    Posts
    95
    Right' defferent people have defferent ideaologies.

    I've forgot to write one thing in my last reply: actually I have dozens of data, XML, confoguration, resource and media files in my application, so pushing DLL and other stuff - as I think - for using 3rd party components just won't go, because I organize all my files in individual folders, while - as I know - DLL references can't be moved from direct absulote path the executable.

    If anyone knows how to move reference libraries (DLLs) from there by customization, please reply in this thread because this will help me a lot, and I think also many members will penifit from that.
    Do you think my life is easy?
    Do you think it's good to win?
    do you think it's nice to kill?
    Do you think learning is a must?
    Do you think computers are nothing?
    Do you think this post is stupid?
    Do ypu think we're really humen?

    DO YOU THINK IT'S GOOD TO THINK AT ALL? ? ? ! ! !

  39. #39
    Junior Member
    Join Date
    May 2004
    Location
    England
    Posts
    28
    Originally posted by LeeSalter
    OK. This is what I have.


    Now, add the new control to your toolbar, drag an instance to your form and you have a background gradient control that you can set start and end colors for as well as the gradient path.

    Got to be honest - I ripped this out of Balena's book, but it works a treat!
    This is indeed very nice, and easy to use. I have added a panel coloured black to give a 1-pixel edge, and added teh gradient over the top of the panel (two pixels less in depth and height than the panel). If, however, I add a label as well, the text always appears underneath the gradient, not on top. Any ideas?
    On the Level..........

  40. #40
    Junior Member
    Join Date
    Aug 2004
    Posts
    30
    VBGuy thanks for posting the link for Skybound extenders.

    I'm a fresh newbie when it comes to .NET, and I've been following the instructions on how to install and activate the extender class, but was confused about one thing.

    In the documentation it says:

    In addition to adding a VisualStyleProvider component to each form, you must call the VisualStyleProvider.EnableVisualStyles before Application.Run in your program entry point:


    [Visual Basic]

    Public Shared <STAThread()> _
    Sub Main()
    Skybound.VisualStyles.VisualStyleProvider.EnableVisualStyles()
    Application.Run(New Form1())
    End Sub
    Where exactly in my Visual Basic Project do I paste this code? I've tried a few different things all of them to no avail.

    Hopefully someone can help

    Thanks in advance.

Page 1 of 4 1234 LastLast

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