rlsolution

所属分类:数据库编程
开发工具:Delphi
文件大小:12KB
下载次数:1
上传日期:2018-03-10 10:37:15
上 传 者ardgexsl
说明:  

文件列表:
Vendor.txt (624, 2017-04-11)
savConf.dfm (1257, 2017-04-11)
savRun.dfm (504, 2017-04-11)
f7fileid.diz (122, 2017-04-11)
ssaver.dpr (3266, 2017-04-11)
savConf.pas (3848, 2017-04-11)
savInit.pas (2682, 2017-04-11)
savRun.pas (7402, 2017-04-11)
savThr.pas (13766, 2017-04-11)

This is a sample screen saver for Windows 95 written in Delphi 2.0 Copyright and disclaimer are at the end of this text. Make sure you read the whole file carefully. To read the file best, turn on "Word-Wrapping" in your editor. Version: 1.0 Author: Meik Weber Operating System: Windows 95 and not NT I will not explain the whole logic here, so you should carefully read all comments I made in my code. Here is the overall concept: 1) I have a thread called "TSaverThread" which does the whole graphics of the screen saver. I implemented that as a descendant of "TSaverBasics" which provides basic features: a) the background is stored in a Bitmap "Background" for you to reference, if you don't need it, ignore it. b) the execute method regularily calls a function "AStep" to do a step in your saving graphics and you can control the 'SleepTime' property to influence how often 'AStep' is called. Set 'SleepTime' to 0 to call 'AStep' again and again without any delay, but keep in mind that this is very CPU-Intense and may conflict with FAX or other Modem-related software on your system. A value of '1' is much better. c) a 'ForceRect' property is provided for you indicating that some area of the screen has to be repainted instantaneously (e.g. the user drags the password dialog around the screen). You can ignore it, if your saver is not influenced by this or you can always repaint the whole screen. That's up to you. d) you can override the 'Execute' method instead of 'AStep' to get more flexibility and more control on everything, but remember to free the Background bitmap. e) you should override the 'CleanUp' method to free all objects you have allocated. This is called immediately before the thread terminates (if you override the 'Execute' method, you can ignore the 'CleanUp') 2) I have provided a configuration form. You should change this form to the needs of your screen saver and store the values in the registry (see my example how to do that but change the key to not conflict with my saver). Do not create a new form as some special handling is needed, just change the one I already made. 3) As I changed the project source (make sure you view it), you should always make sure the structure of this code is not damaged by Delphi. This can happen if you want to add some more forms (about boxes or so). That is basicly all you need to know to write your own cool screen saver. You do not need to bother on all the other things I did, but you should look at them to understand what is going on and for you to make sure I didn't forget something important here. There is no special component needed by my code. You can simply open the project and recompile it. You should then rename the resulting SSAVER.EXE to "Fade in fade out.scr". I named the project "SSAVER" to not conflict with packer software capable of only 8.3 filenames. If you have changed the source code and programmed your own screen saver, you should rename the SSAVER.EXE to the appropriate name for your screen saver and give it the extension ".SCR". For example you could name your screen saver "Extremely Cool.scr". To install your screen saver, copy it to your windows or windows\system directory. Make sure you test the following things with your screen saver: 1) is the screen saver named correctly in the control panel dialog? 2) is the preview window working as expected? 3) is the dialog disabled when showing the configuration dialog? 4) does the control panel dialog show up when you click on your configuration dialog? (this only applies if you start it from the control panel dialog) 5) are all options on the context menu for your file working? 6) is the password checking really working? (try to Ctrl-Alt-Del to stop the screen saver without typing in the password) 7) are the power-saving functions of the PC affected by your screen saver? (I only tested the power down of the monitor). 8) Is your screen saver shown on the task-bar? (it shouldn't) 9) test everything else you can think of!!!!! Make sure the integration in the operating system is an exact copy of the Bezier screen saver supplied with Windows 95. If you have any problems or comments using this code, you can contact me under one of the adresses shown below, but I do not gurantee to answer. I am sorry for not providing a help file, but I am not yet capable of doing this. This is one of my next projects. If you know a Freeware tool for writing help files please do not hesitate to inform me. If there is enough interest, I can rewrite and publish the source code with german language comment, the actual version only contains english language comments. Have fun writing cool screen savers Meik Weber, 19 Jun 1996 This whole project has Copyright 1996 by Meik Weber. All rights reserved. You have the right to modify this source code to your needs for writing a new Windows 95 compliant screen saver as long as you leave my 'AddToExe' intact or ensure otherwise that the text appears somewhere else when browsing your executable with an hex-editor. You may want to send me a picture postcard of the area you live, but this is not required (I just only like recieving postcards from all over the world). You do not have the right to adapt or change this code to build a component (VBX, OCX, VCL, etc.) or a Delphi-Wizard. You do not have the right to publish this source or parts of in a magazine or in a book (both online or printed). If you want to do so, you need my written permission. You can contact me by standard mail Meik Weber Ostwaldstr. 8 53115 Bonn Germany or by E-Mail m.weber@public.ndh.com or via compuserve id 100744,3244 This source code is provided to you AS IS without warranty of any kind, either expressed or implied. Meik Weber does not warrant that the functions contained in this source code meet your requirements or work uninterrupted or error-free. In no event will Meik Weber be liable to you or any third party for any damages, including any loss of profit, lost savings or other incidental, consequential or special damages. please see VENDOR.TXT for distribution limitations.

近期下载者

相关文件


收藏者