Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips

Graphic Design - Page 2

21-40 of 86     Previous     Next
Extract RGB components from a Long value
by Roger Johansson
You can extract RGB values out of a 32-bit color value by using the integer division and the MOD operators, but there is a much more effective way, based on the LSet. You can convert from a long to rgb bytes and vice versa with the following code: Private Type RGBWrapper Red As ...
Create a gradient background
by Francesco Balena
a gradient brush is a brush that contains all the color nuances that vary from a starting color to an ending color, like the typical background screen of many installation procedures or Microsoft PowerPoint slides. The simplest way to create a linear gradient brush is passing its size (by means ...
Dashed lines with custom caps
by Francesco Balena
You can set properties of the Pen object to create custom lines. For example, you can use the DashStyle enumerated property to draw dashed lines using a predefined pattern, and you can even create custom dash patterns by assigning an array of Single values to the DashPattern property. The ...
Drawing B
by Francesco Balena
GDI+ supports two different forms of a complex curve that can't be represented as an arc of a circle or an ellipse: a cardinal spline and a B
Drawing Cardinal splines
by Francesco Balena
GDI+ supports two different forms of a complex curve that can't be represented as an arc of a circle or an ellipse: a cardinal spline and a B
BackgroundCircularGradient - Paint a circular background gradient
by Francesco Balena
Paint a circular gradient STARTCOLOR is the starting color (applied to the corner) ENDCOLOR is the ending color (applied to the center point) NUMSTEPS is the optional number of stripes (default is 256) XC, XY are the coordinates of the center (default is the center of the form) Example: a ...
BackgroundHorizontalGradient - Paint an horizontal gradient background
by Francesco Balena
Paint an horizontal gradient STARTCOLOR is the starting color (applied to left border) ENDCOLOR is the ending color (applied to right border) NUMSTEPS is the optional number of stripes (default is 256) Example: a gradient from black to blue BackgroundHorizontalGradient Form1, 0, &HFF0000
BackgroundVerticalGradient - Paint a vertical gradient background
by Francesco Balena
Paint a vertical gradient STARTCOLOR is the starting color (applied to top border) ENDCOLOR is the ending color (applied to bottom border) NUMSTEPS is the optional number of stripes (default is 256) Example: a vertical gradient from blue to Red BackgroundVerticalGradient Form1, &HFF0000, ...
DrawPolygon - Draw a closed polygon with any number of sides
by Francesco Balena
Draw a polygon, given its center and number of sides CTRL can be either a form or a PictureBox control. ANGLE is an optional angle in degrees
GetBitmapInfo - Retrieve information on a bitmap
by Francesco Balena
This structure holds Bitmap information
RotateBitmap - Rotate a 256-color bitmap by any angle
by Francesco Balena
This structure holds Bitmap information
RotatePicture - Rotate a 256-color bitmap by any angle (super-optimized version)
by Francesco Balena
This structure holds Bitmap information
SwapColors - Swap any two colors in a 256-color bitmap
by Francesco Balena
This structure holds Bitmap information
SwapColorsArray - Swap all the colors in a 256-color bitmap
by Francesco Balena
This structure holds Bitmap information
Animated form icons
by Francesco Balena
You can add a professional touch to your apps by showing an animated icon when the main form is minimized. To achieve this effect, prepare an array of Image controls, each one containing the icons that make up the animation, then add a Timer control, with the Enabled property set to True and ...
Getting a pixel color
by Francesco Balena
The Point method returns the color value of a given pixel, but is rather slow because it has to convert its argument from twips (or whatever ScaleMode is currently active) to pixels, and also because its argument are treated as Single quantities, and must therefore converted. When you have to ...
Setting a pixel color
by Francesco Balena
The PSet method is much slower than it should actually be, and in most cases you will find it convenient to substitute it with direct calls to the SetPixel API functions. This function is about twelve times faster than the VB's method, at least when you can set the form's ScaleMode to Pixels, ...
ShowIcon - Extract an icon from a file and show it
by Francesco Balena
Extract an icon from a file and display it on a Form or PictureBox (in general, any control that has the hDC property) Returns True if successful FILENAME is the file that contains the icon ICONINDEX is the number of the icon to extract from the file (zero-based) HDC is a valid Device ...
Don
by Rajesh Chathapuram
PostThreadMessage is a Win32 API used to post messages to threads. Usually, the message posted is a standard windows message with the window handle set to NULL.
How to Write Underlined Text
by Shantanu Garg
Interestingly, underline is not a supported font style, i.e., you ...
21-40 of 86     Previous     Next
Sitemap