Free Visual Basic tutorials TCP and Winsock Game tutorial VB tutorial |
WallMaster - program the desktop wallpaper to change You can program the desktop wallpaper to change at a predetermined time interval (e.g. every 10 minutes) and customize the wallpaper position (tile, center, fit to screen, auto fit, or custom) easily. WallMaster also lets you to use BMP, JPG, GIF, PNG, PCX, TGA, and TIF images as your desktop wallpaper. Its cool and unique features make it one of the best and most popular wallpaper utilities ever made. Wallpaper Changer - Windows 9x/NT/2000/XP wallpaper manager wallpaper manager that can change your background images on every startup, once a day or at regular intervals. It features JPEG, PNG, GIF and BMP support. Several options are provided, including the ability to change your images in random order. Wallpaper Master is a powerful and highly customizable desktop wallpaper manager and cycler It will automatically change your background wallpaper with a huge range of options, and is great for indexing large collections of personal photos or any kind of image. You can create your own categories using images on your computer, and it will cycle through your images automatically in whatever order you specify: in a shuffle mode, listed order, or based on your personal ratings. The program also has auto-size options to make sure your images are displayed with optimal size. Wallpaper Xe - Desktop wallpaper changer Supports over 30 popular graphics formats (BMP, JPG, GIF, PNG, TIF, PCD, FPX, JBG, etc) and also Active Desktop (HTML) wallpaper, great for putting animation, sound clip, or movie on your desktop. Create collections of your favorite wallpapers and customize them as you like easily. Program the wallpaper changer to rotate your wallpapers at specified time period (seconds, minutes, hours, or even days). Make your desktop icons text transparent, allowing your desktop wallpaper to show through. Customizable hotkeys to control your wallpaper changer easy. Customizable hotkeys to control your wallpaper changer easy. Multi-language user interface support. MP3 Players list >> |
||
Visual Basic programmers are offered guidelines to develop code for automatic change of Windows Desktop styles. The guidelines provide step-by-step instructions to develop an installer, a wallpaper handling module, as well as discuss the program's possible applications - in particular, for Web promotion. The guidelines are designed for entry-level programmers. The world of Web promotion can be intimidating and exciting at the same time. Attracting greater numbers of visitors to Web sites can be achieved using a variety of schemes based on both high-cost and low-cost solutions. One of the most effective low-cost solutions for Web promotion is based on special-purpose software such as programs for running ads and managing traffic. Another application for such programs may be protection of commercial software from unauthorized use, with advertising accounts offsetting the losses of software developers in cases of unlicensed software use. Such programs can be developed using a variety of languages such as C++, Visual Basic, Delphi, Java script, etc. Let us emphasize that you must warn the user without fail about such modules being incorporated into your software. The guidelines under discussion are confined to the theory of developing advertising software using Visual Basic (no special-purpose run-time modules required under Windows XP or Windows 2000 to be included with a VB program). This document does not disclose the full code of advertising modules; nor does it enclose programs for Internet-based advertising. Description These guidelines propose to engineer Web promotion using two programs: an advertising program to run ads for the user [1] and installer program [2] to set up and customize the program [1]. Program [1] is an advertising module capable of performing its advertising functions in a variety of ways, e.g., by downloading the required Web page into the Web browser, opening a pop-up window with an ad, replacing the Windows wallpaper with an advertising poster, creating entries in the Favorites list, introducing ads into the clipboard information, etc. Program [1] can either be launched upon start of the Windows operating system or reside permanently in the computer RAM, performing advertising functions. There can be additional modules developed to make it more difficult to remove program [1] from the computer, by automatically updating the program or ads, or reinstalling it after removal. |
The installer will install the advertising module [1] on the user's computer and modify the Windows register to load it when the operating system starts. Module [1] is activated immediately upon loading of the Form1 form Private Sub Form_Activate() AutoSet ' Modify Windows XP register (see below) ' Create a BAT file to copy and rename the module to be loaded indx = 1 Str1(0) = "copy demo.ttl c:\demo.ttl" ' Copy module[1] to disc C:\ Str1(1) = "c:" Str1(2) = "cd c:\" Str1(3) = "ren demo.ttl demo.exe" ' Rename module[1] as EXE For i = 0 To 3 'The setup.bat file will have 4 lines of commands Str1(i) = Str1(i) + Chr$(13) + Chr$(10) Open "setup.bat" For Binary As #1 Len = Len(Str1(i)) 'Create setup.bat file Put #1, indx, Str1(i) 'Save BAT file to disc indx = indx + Len(Str1(i)) 'Next record number Close #1 'Close setup.bat file Next i Shell ("setup.bat") 'Run BAT file End Sub The original advertising module (program[1]) is demo.ttl The installer (program [2]) will create on disc the batch file setup.bat and write into it standard commands (dating back to MS DOS): copy demo.ttl c:\demo.ttl - copy the advertising module (programme [1]) to disc C: c: - change the current disc to C: cd c:\ - change the current catalog (if the module is to be set up in a subcatalog) ren demo.ttl demo.exe - rename the advertising module (programme [1]) as executable file Now all that is left to do is run the batch file setup.bat: Shell ("setup.bat") The procedure will not work properly unless compiled. The VB interpreter mode will use an incorrect path on disc by default (the path to the interpreter). The advertising module can be installed on the computer using alternative solutions but the code illustrated here is generic and can be easily rendered in other programming languages such as Delphi, C++. |
'Create entry in the Windows XP or 2000 register to run the module at Windows start LSkey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" ' Auto RUN secattr.nLength = Len(secattr) ' size of the structure secattr.lpSecurityDescriptor = 0 ' default security level secattr.bInheritHandle = True ' the default value for this setting '-------------------------------------------------------- retval = RegCreateKeyEx(HKEY_LOCAL_MACHINE, LSkey, 0, "", 0, KEY_WRITE, secattr, hregkey, neworused) If retval <> 0 Then ' error during open Debug.Print "Error opening or creating registry key -- aborting." End ' terminate the program End If stringbuffer = "C:\demo.exe" & vbNullChar 'Path to the module location (after running setup.bat) retval = RegSetValueEx(hregkey, "Demo", 0, REG_SZ, ByVal stringbuffer, Len(stringbuffer)) ' write the string ' Close the registry key retval = RegCloseKey(hregkey) '----------------------------- End Sub The Windows register is to be modified using standard procedures. Advertising module startup path stringbuffer = "C:\demo.exe" & vbNullChar 'Path to the module location (after running setup.bat) This concludes the description of the minimum configuration for the advertising module installer. Advertising module: programme [1] The advertising module is very straightforward: the program will check the date and, finding it identical with the specified date, modify the register to replace the home Web page of the Internet Explorer with the advertising Web page. Private Sub Form_Load() rundate = Date 'Receive DATE on computer Form1.Caption = Mid(rundate, 1, 2) 'Isolate from the date DAY of month and write it in the heading for debugging ls = "Software\Microsoft\Internet Explorer\Main" address = "http://www.geocities.com/aboutsoft/" 'Home page address, for instance If Mid(rundate, 1, 2) = "30" Then 'I.e., set up IE home page each 30th day of each month LSkey = "Software\Microsoft\Internet Explorer\Main" 'Write into the Windows XP register 'Home page for IE retval = RegCreateKeyEx(HKEY_CURRENT_USER, LSkey, 0, "", 0, KEY_WRITE, secattr, hregkey, neworused) If retval <> 0 Then ' error during open Debug.Print "Error opening or creating registry key -- aborting." End 'Exit program End If stringbuffer = address & vbNullChar ' note how a null character must be appended to the string retval = RegSetValueEx(hregkey, "Start Page", 0, REG_SZ, ByVal stringbuffer, Len(stringbuffer)) ' write the string ' Close the registry key retval = RegCloseKey(hregkey) End If End End Sub When Windows starts, advertising module [1] is loaded: rundate = Date Mid(rundate, 1, 2) - the day of month is determined. A check is run If Mid(rundate, 1, 2) = "30" - if the day is the 30th day of any month, the specified address = http://www.geocities.com/aboutsoft/ - Web page will be set up as the home page for IE The next step is to make an entry in the Windows register to specify Start Page (home page of the Internet Explorer) The program, advertising module [1], ends and is unloaded from the memory. If on the 30th day of any month the user starts the Internet Explorer browser, it will immediately point to the Web the page saved in the advertising module [1]. All you have to do is rename this module (programme [1]) as demo.ttl as specified in the installer program[2] and the process of development is completed. |
To remove the startup entry for the advertising module demo.exe use the same Visual Basic listing but with a blank entry for the name of the program to run. Alternatively, you can use the following JAVA script (text file with a .js extension, for example clear.js): var WSHShell = WScript.CreateObject("WScript.Shell"); WSHShell.Popup("Undo Auto"); WSHShell.RegWrite("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\Demo", ""); All you have to do is create such a file and run it. Instead of the demo.exe module you can use the same JAVA script (listed here without date check): var WSHShell = WScript.CreateObject("WScript.Shell"); WSHShell.Popup("Home Page"); WSHShell.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page", "http://www.freeware.com"); Alternative scenarios for advertising programs You needn't engineer advertising or punish copyright infringement by modifying the Web page address in IE. You can use an alternative software solution to replace the Windows wallpaper with an advertisement poster. The necessary code for advertising module [1] Private Sub Command3_Click() ChangeWallPaper "c:\oflameron-1024.bmp", "Center" 'Place at screen centre End Sub Function Public Sub ChangeWallPaper(NewPaper As String, DisplayType As String) is located in module Module1.bas – see file wallpapers.zip Note that the graphic file for Desktop must be in the .bmp format. Recovery of the advertising module You may need to protect the advertising module against removal. A possible solution can be to incorporate additional modules or scripts to start under certain conditions and to check the presence of the advertising module. No advertising module having been found, it can be reinstalled from the Web server or from a backup copy saved using an alternative path/file name. For more details about recovery and automatic updating of advertising modules, other computer-based advertising technology, Delphi and C++ listings please see the part two of the guidelines. This document does not disclose the full code of advertising modules; nor does it enclose programs for Internet-based advertising. [Download full guide] |
Manual on development of a logic game in Java is identical to the manual versions for VB and Delphi. It would help you to master new programming languages in a short time. The manual includes Word document with step-by-step description of the process of program development, screenshots, procedure codes and 12 complete listings in Java (Microsoft Visual J++ 6.0) illustrating all stages of programming in Java-Application. [Download here ...] |
||