![]() 3D 3D Photo Gallery (Part 1) 3D Photo Gallery (Part 2) Audio Poor Man's MIDI Make A Metronome iPod Tricks (Part 1) iPod Tricks (Part 2) iPod Tricks (Part 3) Laugh Track Machine Audio Player with Reverb Shepard Melody RB Phone Home Build a Drum Machine Custom Controls and Windows Double Click Listbox Draggable Metal Window Double Click Canvas Custom Buttons Custom Buttons Part II iTunes-style Listboxes Custom Controls General RB Scrolling Windows Using Mesage Dialogs Case-Sensitive Word Finder Introduction to Stacks Wiggle Window JPEG in PDF Listbox Checkboxes Background Applications Listbox Auto-Find Virtual Volumes Time Tracker Software Distribution (Part 1) Software Distribution (Part 2) Software Distribution (Part 3) Software Distribution (Part 4) Exceptions Tips and Tricks Text Clippings Made Easy Graphics Drawing a Simple Gradient The SpriteSurface: Space Game Image Spinner Cropping Graphics (Part 1) Cropping Graphics (Part 2) Cropping Graphics (Part 3) Cropping Graphics (Part 4) Shimmer Graphics Lissajous Figures Simple Screen Capture Vector Graphics Kaleidoscope Images Stegonography Spirals! Image Table RB Magnifying Lens Screen Capture Color Picker Tutorial Hacks Ghost Grab Speedy Mouse Extension iTunes Plugins iTunes Skinner Mac OS X Global Hot Key Event (Carbon Events) Login Welcomer (Carbon Events) Add/Remove Buttons Resizable Sheets Mac OS X Preferences Window Using Sheets in REALbasic Build a Bundle (Part 1) Build a Bundle (Part 2) Dock Your Passwords Mac OS X Debugging REALbasic Mac OS X Icon Tutorial Animate Your Dock RB and the Command Line Menus Window Menu Templates Menu Listbox Menu Novelty Guessing Game Calendar Trivia Tile Mixer Zip Code Finder Happy Valentine's Day Merlin Simulator (Part 1) Merlin Simulator (Part 2) Merlin Simulator (Part 3) Buzzword Machine AppleSoft BASIC Printing Print to PDF Registration Registration Code Validation Network Registration Codes Resources Picture Extractor (Part 1) Picture Extractor (Part 2) Serial Caller ID (Part 1) Caller ID (Part 2) Caller ID (Part 3) Speech Speech Recognition Socket Communication Easy Peer-to-Peer File Sharing MacPAD Version Checking Display Web Image In Canvas HTML IMG Tags Version Tracking Even Smarter Instant Messaging Web Tiler JavaScript and REALbasic Stock Ticker (Part I) Stock Ticker (Part 2) AIM Mate XML Manipulation Simple XML Introduction Video Big Brother Video Capture Note: All articles without a byline were written by Erick Tejkowski. When cleaning the site I removed them because the code differed from page to page, and I have yet to put them back in.
Tell us about a bad link. |
Build the Interface Before you get started on this project, download the Flicker Free Canvas we used in earlier projects. Then, launch REALbasic and open Window1. Unstuff the flickerFreeCanvas and drag it in your REALbasic project. Next, add the following controls:
Arrange the interface however you desire. A sample might look like this: ![]() Source Code Before adding code, we need to do two things: define a property and add a file type. Double click any part of the Window1 interface to open its Code Editor. Then, select Edit-New Property. Create a Picture property like this: ![]() To add the file type, select Edit-File Types and add "pict" to the fray: ![]() OK, now we're ready for some code. Navigate to the Action event of PushButton1 and add this code: This code create a new image, toggles Timer1, and changes the caption on PushButton1. Next, navigate to the Action event of Timer1 and enter this code This code does the actual drawing. It splits the image up into four sections. A random size and position is then selected and a shape is drawn in each quadrant of the image according to these random numbers. Finally, navigate to the Action event of PushButton2 and add this code: dim f as folderItem This code lets you save the image as a PICT file when you're finished. Conclusion That's all for this week. You can download the project or the built applications (for OS 9 or OS X) to try things out. So, get to work creating some fun desktop images and send them to Dan. See you next week! 666 Killer No demons here... just a virus. If you've ever been bitten by the 666 virus (or one of its variants), Toon Van Acker has some relief for you. After discovering that the virus had left a copy of itself in any app in use, he coded a fix for it in REALbasic. Check out 666 Killer |
||||||||||||||||||||||||||
|
Please support ResExcellence by Visiting our Sponsors. One click makes a difference. |
|||||||||||||||||||||||||||
|
|