Download DYNAMIC DATAWINDOWS WEB SERVICES EDGE
Transcript
whenever you add/remove picture files in the folder), the order of the files in the listbox is going to be the same no matter how many times the program is run, hence there’s no need to save the filename. Also it’s a whole lot easier to search if a particular wallpaper is already set. I’ll build a string of all the previously shown wallpapers and see if the new random number is present. If it’s not there in the list, I have found my new wallpaper. (I could have done this with a DataStore but I didn’t want to create another object.) When all the pictures in the directory are shown once, all the history in the profile file has to be cleared; re-creating the file does that as a side effect. Before you build the executable change the instance variable as it stores the folder location where all your wallpapers are stored. Now that the program is ready, you can use the Windows scheduler to run this program as often as you wish. I currently have over 200 pictures and the scheduler runs this program every 15 minutes. You can also run it as often as every minute to create a slide-show effect. If you prefer, you can always code the Windows timer event. Note: If you like to run this program interactively, comment the close(this) in the open event of the window. ▼ [email protected] $ 1 3 E V A S O ff* the annual te newsstand ra ANNUAL COVER PRICE ANNUAL NEWSSTAND RATE $180.00 AUTHOR BIO Atul Kane, an MIS manager for NEC USA, Inc., has worked with PB since version 3 and has 11 years of programming experience. He is also a Sybase-certified PowerBuilder developer associate, and a certified Sun Java programmer with a degree in computer science. YOU PAY $149.00 YOU SAVE $31 Off the Annual Newsstand Rate Receive 12 issues of PBDJ for only $149.00. That’s a savings of $31 off the annual newsstand rate. Visit our site at www.powerbuilderjournal.com or call 1-888-303-5282 and subscribe today! Here’s what you’ll find in every issue of PBDJ • New PowerBuilder Features • Tips, Tricks and Techniques in Server-Side Programming • DB Programming Techniques • Tips on Creating Live PowerBuilder Sites • Product Reviews • Display Ads of the Best Add-on Products • PowerBuilder User Group Info *Offer subject to change without notice SUBSCRIBE NOW TO THE FINEST TECHNICAL JOURNALS IN THE INDUSTRY! 800 513-7111 www.sys-con.com The world’s leading i-technogy publisher www.POWERBUILDERJOURNAL.com PBDJ volume10 issue2 21