A Visual Basic PaintBrush / Imaging Program

This excellent example from Stefaan Casier shows the basics of creating a professional paint program and how to implement many of the features that users expect for granted. Be sure to study this code well and learn from it.

Standard Screen:

screen-shot1

Zoomed Image:

Screen-shot 2

Paint256 v1.05 10/07/99 - translated 18/03/2000

DESCRIPTION

The program has to be run in a 256 colors-screen modus state, since it concentrates on making bitmaps with a 256 colors pallet, containing gradient or fluent colors. Besides using fluent colors, the program also has a feature adding shade to all drawings. The fact, to apply fluent colors and shade is made so easy, makes this program special. It is at least a good addition to other painting programs.

Most functions work in such an obvious way, they need no explanation. So I provide you here with those things that are not so obvious.

SIZE

Absolute maximum = 1024 x 1024 pixels.

Each scale- or zoom factor has its own maximum (XY):

x1 1024 - maybe higher with more RAM? (here 48M)
x2 1024
x4 546
x6 364
x8 273

This a mathematic maximum that would produce an Overflow if passed over (prevented by the program). If you have less available RAM memory on your PC, those maximum values will be lower. Then you'll have to judge it yourself. The moment Windows virtual memory (hard disc) is addressed, everything slows down, sometimes to a point it isn't workable anymore. What you learn from this: it is a program more for making smaller pictures than opposite.

Tips

  1. Get to know the program using a small size like 100*100
  2. Without using the grid, everything works faster

THE COLOR PALLET

You change or set it, F I R S T , because it alters the existing pallet/content.

There are some different ways to set a new pallet:

  • Make or load a Paint256 pallet (*.BKL). Using max. 16 base colors, 240 fluent colors are generated. The pallet is completed with 16 Quick Basic Colors.
  • Load a JASC-PAL pallet (*.PAL) : originates from Paint Shop Pro (and others?).
  • Extract a pallet from an existing bitmap (*.BMP), so you can edit a bitmap with its own pallet (only necessary when the picture uses more than 16 or 20 colors (see pictures).

One of the powers of Paint256 is working with fluent colors. When they are unavailable, a number of functions become useless.

THE UPPER TOOLBAR

Many functions react differently depending on whether selection-modus is on or not. If the selection-modus is on, most functions will act on the current delimited selection, otherwise it will be on the whole image. This is the case with: Save, Copy, Pallet-Rotation, Move, Mirror, Delete, Replace (click the mouse with the mouse - nice no?) ... Open en Paste have something similar.

Moving over a button with the mouse causes a tip to popup, with the button's name or description.

KEYS (in main-window)

C            Copy
E            Exit
O            Open
P            Paste
B            Save
A            Size+Zoomfactor
U            Undo
W            Clear
S            Shades dialog
V            Fill modes dialog
space         Repeat previous action (<> filling)
shift+ M      Pattern-Mask (to use with small sizes - testing)
K            Show real size image

Cursor Keys:

  • Selection box
  • Normal Enlarge
  • +shift Smaller
  • +control Move

You can move, copy/paste a selection with the mouse combined with the shift- or control-keys. Without any key, you only move the rubber box.

Clicking in the image combined with the Alt-key, will change the current (left/right) mouse color into the color under the mouse pointer.

You select the background-color in the pallet, holding the Alt-key down.

PICTURES

This is a browser looking for bitmaps on disk. You can check the saved results. Delete doubles... You can copy bitmaps to the clipboard to paste them later...

If you want to mix different bmp's you will have to check their pallet for compatibility. In most cases the pallets have to be identical.

- Always load & select the pallet of a bmp-file, before you paste the bmp itself.

FUNCTIONS

10 in a row, from top to bottom:

  1. Select
  2. Points
  3. Lines
  4. Rectangle-ellipse *
  5. Filled rectangle-ellipse *
  6. Filling (doesn't work on black surfaces !)
  7. Formula *
  8. Text *
  9. Shade Frames *
  10. Arrows *

* = click them with the right mouse button to set their parameters by means of a dialog.

In most cases you can repeat the last action with new left/right color settings. You can Undo before, or not. This way you can try things out until you find the best setting.

STYLE (three buttons bottom-right side of the pallet)

  1. Shade
  2. Pen Width
  3. Fill-modus

----> do experiment, you will see, it's easy

TEXT

A multi-line text you can align (left/right/center). A single line of text you can tilt or turn over. To place it in your image you can think of it as a stamp. Click in the image, without releasing the mouse button. A 'rubber box' you can move around, will appear showing the size of the stamp. The stamp is made the moment you release the mouse button.

FLUENT COLORS

A condition to use this is of course there has to be a pallet with gradient fluent colors. Pallets extracted from a bitmap, will probably not have such a pallet...

Select in the pallet on the left, the Start color with the left mouse button and the End color with the right mouse button. Then you choose in the Fill-modus dialog, the preferred color pattern. Each following drawing action will use these selected settings and produce fluent colors.

Download Zipped Source Code (97k)
Download Zipped EXE and Help File (127k)



Comments

  • La ghd cambiar tus cabellos como su deseo

    Posted by hngoxn360 on 07/17/2013 12:11pm

    Ghd planchas de alisado de cerámica se desarrollan dentro del año 2000. Técnica de peluquería ofrece rostro particular expuesto como estilistas y también iconos de tendencias de todo el mundo. ¿Qué es exactamente grande en que será, ya que proporciona una excelente ayuda a ayudar a los deseos de las mujeres con la cabeza desafiante de pelo. En caso de que usted es una de esas mujeres-con problemas de pelo brillante, usted debe considerar la primera como una mercancía normal de juego individual. Planchas GHD hacer mucho más que producir suaves, directamente diseños. Su propio estilo ofrece platos curvas y ofertas, por lo tanto, de la misma unidad de diseño que sólo tiene que hacer uso de corregir alguien bloquea también puede poner, cambiar y afluencia. Este particular elimina la necesidad real de una serie de problemáticas Recursos de diseño inodoro abajo encimera. [url=http://planchaspeloghd.cabanova.com/]planchas ghd baratas[/url] plancha de pelo ghd utiliza placas de cerámica para liso, fácil de moldear. Control de la tensión, puede crear el más apropiado entre las placas cerámicas de pelo liso. El producto también tiene el mismo anión, la conservación de hacer que el cabello suave y brillante, para evitar el pánico. Cuerpo con una configuración de calor digitales, pantalla digital hace que sea fácil seleccionar la función deseada o ajustar la forma de la temperatura. Puede ayudar a elegir el pelo bien y la temperatura deseada. Pulse un botón, tendrá un efecto perfecto de inmediato. 1 función de apagado automático hora le permite utilizar más paz de la mente. Planchas ghd como operación segura y simple. Ocupar gran cuota de mercado. Convertido en una moda de comprar. Debido a esto, a menudo parece falsa, por lo que cada vez más personas están comprando auténticos planchas ghd. Nuestra tienda, aunque las ventas de negro pelo ghd. Pero somos productos ghd regulares. No traen todo tipo de daño fuego falso. Nuestro producto de mapa con el mapa físico es exactamente el mismo. Para asegurar que los productos reales y fiables. Y vendemos planchas ghd baratas, 7 * 24 funciones en línea, usted puede comprar en cualquier momento. Siempre y cuando haya seleccionado el tipo deseado, complete la información personal, etc temas relacionados, el producto puede ser enviado directamente a las manos de espera. Por favor, comprar productos ghd sentimientos antes, mira a nuestra política de privacidad, Quiénes somos, transporte, preguntas más frecuentes y las políticas más relevantes, esto le ayudará a comprar nuestros productos. Gracias por tu colaboración. [url=http://planchas-ghd.manifo.com/]planchas ghd baratas[/url] A planchas ghd es uno de los alisadores de pelo más avanzados tecnológicamente en el mercado, pero eso no quiere decir que es difícil de usar ofertas plancha GHD. Sólo quiere decir que es un muy buen alisadores! Por ejemplo. es una ghd sólo 20 segundos para calentar a la temperatura óptima, y el termostato digital asegura la temperatura se ajusta hasta 5 veces por segundo, por lo que su ghd nunca pierden calor o overopheder.Det significa que una ghd no sólo es fácil de utilizar - sino que también proporciona un resultado perfecto cada vez - incluyendo también a causa de las placas flexibles, asegurando que usted no hace "crack" en el pelo cuando suaviza, rizos o hacer el movimiento en håret.Desuden es una ghd diseñado para ser tan suave como sea posible por el cabello, entre otros utilizando el llamado teknologi.Køber iones negativos que una ghd planchas baratas, usted puede estar seguro de que usted ha hecho una inversión que nunca se arrepentirá.

    Reply
  • Lisseur GHD sont des outils parfaits

    Posted by eaqwsi296 on 07/16/2013 01:25pm

    Le ressort de la boutique, il est beaucoup Cheap GHD Norge.Our lisseur ghd pas seulement pas cher mais la qualité est Veldig soutien-gorge, est la meilleure product.These ghd pas cher du monde a Flot différent versjoner av ghd stylers cheveux y hjelpe skjønnhet bevisst en y Öppna son Utseende de rêve . Ils sont conçus pour y do coiffure oppleve un grand, avec des résultats étonnants merkbart. Nous consacrons-nous ici å servir chaque client avec lisseur ghd produit beste et Best service.and ces ghd droit Rod Price mer tiltrekke you.We pense que vous nageoire vos lisseur ghd pas cher de favoris. [url=http://ghdpascherfer.tripod.com/]lisseur ghd pas cher[/url] D'autres variétés ou une série de redresseurs GHD comprennent GHD violet et GHD précieux Ensemble-cadeau qui peut faire un excellent cadeau pour quelqu'un spécial Saint-Valentin, ou comme cadeau d'anniversaire. Il suffit de la même manière que vous voulez faire des emplettes pour d'autres articles sur Internet pour obtenir la meilleure affaire, vous pouvez aussi magasiner en ligne pour obtenir pas cher straighteners.Whether cheveux GHD vous soyez un particulier ou propriétaire d'un salon, ce produit capillaire spécial a excellent outil à avoir. En tant que propriétaire de saloon, vous pouvez aller pour le GHD IV Salon Styler et autre série spéciale pour le salon. Mais vous obtenez rien de moins qu'un véritable lisseur GHD. Si vous êtes offert un lisseur GHD à un taux étonnamment bas que vous attendez, vous devez réfléchir à deux fois, car cela pourrait être un drapeau rouge pour faux produit. [url=http://ghdpascherfer.webgarden.es/]ghd lisseur prix[/url] Récemment a eu le GHD rose, édition limitée pur / sombre sous le nom de GHD MK4 (IV) établir GHD au pouvoir se rapproche uangripelig posisjon au-dessus av portée marché opp-et-vient à défrisants professionnels avec plusieurs funksjoner utile, entre autres choses, un câble sterk supplémentaire , quelque chose qui muliggjør plus frihet lorsque vous stockez ces cils et les boucles et les dernières plaines de la technologie chauffage infra-rouge signifie que hastigheten sur gjennomføring chaleur av et garder au chaud le temps lengre dans le MK4 céramique Plater, ytterligere aidera à veiller à y serrure en minéraux, cheveux ferries et l'humidité dans le ditt de cheveux pour lengre période, un gi cheveux ditt silkemykt, éclat de style et sans électricité statique. Les nouvelles plaines de maintien rondes signifient y Skape styles complexes comme les boucles et les cils sont plus faciles y do.Another avantage le client obtient avec cette nouvelle GHD MK4 (IV) Styler & Horizontal Tang est un DVD qui donne instruksjoner et spesielle conseils pour y obtenir le beste visant à cheveux. Vous pouvez accéder à expérimenter et forskjellig style de cheveux pour la deuxième journée.

    Reply
  • Fake Oakley Rada Path for sale

    Posted by meurfvsou on 06/29/2013 11:44am

    Oakley Sunglasses sale ,An item men and women love can be a matter of pride that they're inherited the spirit of the Oakley fashion, as Oakley. The leading products include women's Oakley sunglasses, ski goggles, motocross goggles, golf series, leisure series, special compilation of five major categories, along with hats, T-shirts, handbags as well as other peripheral products. Replica Oakley Sunglasses ,The Oakley frogskins popular noisy . 1980 and from now on, within a limited time, Charles Oakley sale sunglasses bring the astounding style. Oakley, Sunglasses will always be revolutionary design and suspension framework that it will not affect the camera lens, nevertheless find the optimized comfort and adjust to an accommodating frame design. Cheap Oakley Radar ,These products provide adequate protection of harmful Ultraviolet rays, and flying objects. They've also been very easy about the eyes. They may be utilised in different types of movement, as they are usually firmly held on the face. The sunglasses may be split into several types, points relative to the functional use. Ordinary sunglasses, decorative sunglasses, driver sunglasses etcetera. The sunglasses, the usage of time, based on your usage habits, however, plenty of friends wearing sunglasses too casual and doesn't attach importance towards upkeep of the sunglasses. Increase in high-altitude skiing: solar power and plateau UV radiation might be at 2000 m (usual for Australian ski) is frequently nearly 30%, than cruising level. The professionals inform us that a less of squinting matches an inferior quantity of creases. Personal security and Oakley sun screen lotion eye. Artists and professional sunglasses, as expensive to the style of movement, greater than the expense of nearly all sunglasses. However, you will find a variety of discount Oakley sunglasses available on the internet. Oakley may be the entrepreneurial spirit of the meticulous, inheritance has become cool trend style and creativity to be expanded the sporting goods market. Recently introduced the "wearable electronics" to recover weapons to deliver Bluetooth solutions, and implantation on the solution framework to reduce the necessitie with the headset, headphone, line and wire. Expensive to have a good salary of excellent quality and Oakley sunglasses women a while to joy, and it'll get Oakley sunglasses single for each and every scene. I believed, wallets and handbags are classified as the most well-known ladies, but now I think I have to change my thoughts soon start to see the pieces of the title is so crazy sunglasses retailer of ladies.

    Reply
  • GHD MK4 sort

    Posted by wanzixiao on 05/30/2013 02:24pm

    [url=http://www.glattejernghdpris.webs.com/]glattejern ghd pris[/url] Hvis du vil afvige hår stil og design. [url=http://www.ghdfladjern.blinkweb.com/]ghd fladjern[/url] Den alsidighed ghd glattejern giver dig mulighed for at gøre meget mere end bare glatte hår. Den ghd lilla kommer med en intensitet uvillig ghd glattejern omfatter grund ghd glattejern indpakket i et eksklusivt designet rotere måtten med alle nye packaging.With lidt øvelse, kan du skabe volumen og krøller med lethed. [url=http://www.ghdfladjerntilbud.webs.com/]ghd fladjern tilbud[/url] Alle GHD IV Pink Styler er af høj kvalitet og prisen er meget reasonable.There er forskellige stilarter for dig at select.Key funktioner i GHD Hårudglatningsmiddel omfatter: mere lydhør, dybt affjedret keramiske plader, at varme op endnu hurtigere. Hørbar bip, der fortæller dig, jernet er varmt og klar til brug. Længere og mere holdbar Kablet har et forbedret design for at mindske potentielle skader, som du stil med jern. Auto-justering af spænding betyder, at du kan bruge dit jern i noget land. Sikkerhed funktioner, herunder automatisk slukker efter 15 minutter uden aktivitet, og en gysen funktion, der forhindrer fugt beskadige din strygejern, når de er blevet efterladt i et koldt sted natten over.

    Reply
  • How do i download the zip files

    Posted by VBBUFF on 12/19/2005 12:57am

    I want to download the source zip & the help files, but i can't download. please help

    • Where is the sources ?

      Posted by Rodrigo Raposo on 12/19/2005 01:16pm

      I can't download the zip containing the sources. Please help !

      Reply
    Reply
  • excellent work..

    Posted by Legacy on 08/25/2003 12:00am

    Originally posted by: Subbu

    its a excellent. Work I am looking at how to print a text on a dark back ground.. I am not able to print a text on a dark back ground I think you have managed it some how.. so I am trying to lear that stuff out of your..program.. I hope it should help me out..

    if you can put some inputs u r most welcome. u can catch me at psubbu@ipwrs.com

    Cheers,
    Subbu.

    Reply
  • Nice

    Posted by Legacy on 07/24/2003 12:00am

    Originally posted by: Arif Qurishi

    Its a nice utility

    Reply
  • GREAT...

    Posted by Legacy on 04/26/2003 12:00am

    Originally posted by: Miss AJ

    Its really a great work something i was really looking for hope to c more from u'r programming abilities

    Reply
  • vbprogram

    Posted by Legacy on 04/01/2003 12:00am

    Originally posted by: alimudin siddiqui

    nice program

    Reply
  • Nice Program

    Posted by Legacy on 03/29/2003 12:00am

    Originally posted by: Neeraj

    Realy you have made a nice paint brush. I want to mention one thing you please provide the eraser. Through this any body can remove the certain part of the image

    Neeraj sinha

    Reply
  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • With the average hard drive now averaging one terabyte in size, the fallout from the explosion of user-created data has become an overwhelming volume of potential evidence that law-enforcement and corporate investigators spend countless hours examining. Join Us and SANS' Rob Lee for our 45-minute webinar, A Triage and Collection Strategy for Time-Sensitive Investigations, will demonstrate how to: Identify the folders and files that often contain key insights Reduce the time spent sifting through content by …

Most Popular Programming Stories

More for Developers

RSS Feeds