home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / FormGradie2080138202007.psc / Notes.txt < prev    next >
Text File  |  2007-08-20  |  2KB  |  43 lines

  1. FormGradient2  *** It is a very small utility and suitable for beginners ***
  2.  
  3. Simple  Form color gradient which includes standard controls like OptionButtons, Frames, etc. Single subroutine.
  4. No APIs, no ActiveX.
  5. Zip contains a small demo project.
  6.  
  7. This is a slightly altered version of FormGradient version1 with more user notes and controls.
  8.  
  9. Usage       In  Form_Load  subroutines call  FormGradient Me, 174, 212, 255, 124, 152, 225
  10.              Add the subroutine FormGradient to your form code module or better still to a general code module
  11.               If you want to change the colors at runtime, then call FormGradient again with new parameters
  12.               If you allow form resizing then call FormGradient in the  Form_Resize  subroutine
  13.  
  14. Limitations
  15.     The gradient is only vertical.
  16.     Some controls do not have an optional transparent background and are set to the average color of the form, at their height.
  17.     This average color works when the the color gradient is small but shows up as patch with larger gradients.
  18.  
  19. Resetting control BackColor
  20.     Some controls never have their BackColor changed, other always change.
  21.     The demo includes a simple way of setting the BackColor for a control.
  22.  
  23. APIs, ActiveX
  24.     Because of increasing security levels being applied, this method avoids these as they can trigger concerns and warnings.
  25.     The source is clearly visible and understood.
  26.  
  27. Optical illusions
  28.     The color of a control (with a single/solid Backcolor) will seem to be different, according to its surrounding Form color.
  29.     However, using a color dropper to pick up the control color shows the color is exactly as set by the program.
  30.     Examples of this illusion are :-
  31.            The 'A Microsoft frame example'.
  32.          The apparent gradient reversal inside the frame is an optical illusion - the background is all one color!
  33.            The 'A button' control for one of the four BackColors used, matches finish color at the bottom of the form.
  34.         When the form is maximised the button appears to be a different color! 
  35.  
  36. A cheat for Frames
  37.     Frame controls can tall objects and so suffer from the gradient illusion above.
  38.     In the demo I simply used an Image control with no picture, to provide a 3D frame round the Option4 controls.
  39.     The same effect can be created with lines. Line 5 is drawn over Line2.  Line5 is narrower than Line2.
  40.  
  41.  
  42. Regards    Mike Wardle   17 August 2007
  43.