dcsimg
Results 1 to 1 of 1

Thread: FadeGradientForm

  1. #1

    Thread Starter
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,274

    FadeGradientForm

    I've taken my FadeForm and GradientForm and put all the code together, then with the help of formlesstree4 and NickThissen the gradient part will paint the inside of the MdiClient area if the IsMdiContainer property is set to true.

    Here are the gradient properties to take note of:
    • GradientEnabled (Boolean) - This allows the normal backcolor to be shown instead of the gradient.
    • Orientation (GradientOrientation) - This is either Horizontal or Vertical.
    • GradientBegin (Color) - Either the top or the left color, depending on the orientation.
    • GradientMiddle (Color) - The middle color.
    • GradientEnd (Color) - Either the bottom or the right color, depending on the orientation.
    • GradientPreset (GradientPresets) sets the three gradient colors to preset values:
      • Office2003Blue
      • Office2003Olive
      • Office2003Silver
      • Office2007 (Blue)
      • OfficeClassic
      • OfficeXP
      • None (Clears the color properties)
      • Custom
    And here's the corresponding events:
    • GradientEnabledChanged
    • GradientOrientationChanged
    • GradientPresetChanged


    Here's the 2 properties to control the fading:
    • FadeEnabled (Boolean) - Turns the fading on/off.
    • FadeSpeed (Integer) - Controls the speed of the timer, in milliseconds.

    Here's the two corresponding events:
    • FadeEnabledChanged
    • FadeSpeedChanged


    Here's a screenshot of the gradient part:
    Name:  GradientForm.jpg
Views: 1215
Size:  34.3 KB

    To use this control, simply add it to your project, build your solution, then have your form(s) inherit it instead of System.Windows.Forms.Form. The properties show in the properties window, just set them.
    I wont be updating the individual GradientForm or the FadeForm threads, if any changes are made it'll be to this single control.

    Edit:
    2010-07-08: Made it so it would paint the MdiClient control or the form's background automatically if the IsMdiContainer property changes.
    Attached Files Attached Files
    Last edited by JuggaloBrotha; Jul 8th, 2010 at 11:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width