desktop
Blitz3D Forums/Blitz3D Programming/desktop
| ||
In wich way i can find the resolution of the desktop? I think using windows api but i don't know how. Another thing: there is a method to don't allow the user to end the program? |
| ||
You need a file named "user32.decls" inside your "userlibs" folder. It must contain the following lines: .lib "user32.dll" GetSystemMetrics% (nIndex%) : "GetSystemMetrics" restart Blitz and use the following commands: desk_w=getsystemmetrics(0) desk_h=getsystemmetrics(1) |
| ||
Thanks, but for the second task: how to don't allow the user to terminate the program? |
| ||
Strap his/hers arms and legs down so they can't reach the keyboard and/or power switch and/or reset switch. |
| ||
If you post the topic with no help intention, plese edit it and delete it: this is a serious forum. |
| ||
Theres a way of detecting a click on the window's X button and handling it yourself (search for blitzclose - its a userlib) But you'll never be able to stop them 100%, end process will always kill it. |
| ||
hehe. HE still has some points left. There is a solution in the code archives, it will bend the close button to allow some function cals after clicking it, but you can use it to disable it completely. There's also a userlib or so that removes the close button. |
| ||
There isn't a possible to set special power to the program so task menager will think that is a system process? There are, for example, viruses that the user can't delete. |
| ||
There is no way of stopping someone terminating a program hence my comment, they can always switch the computer off, hit the reset button or press ctrl-alt-del. Therefore it was a perfectly valid answer. If you are asking how trap the close event that is an entirely different matter. Incedentally there are other system metrics that will return the size of the desktop minus the toolbar which tend to be more useful. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getsystemmetrics.asp 16 for the x and 17 for the Y You can make programs a service if you're on win2000 upwards. Not sure how to do that off the top of my head. Google is your friend on that one. |
| ||
If i'll make my program a windows service, will the user couldn't close it? |
| ||
You can still stop a service by going into the service manager. |
| ||
In wich way can i make a program a windows service? Doeas it will works into the others win versions(98, me, nt2000,xp)? |
| ||
You can make programs a service if you're on win2000 upwards |
| ||
what reason would you want to do this if the program isnt malicious? |
| ||
I'm making a program to improve windows, but if the user will close it, he/she will not control windows. |
| ||
Perhaps you should develope it for X, and then port it to Windows. |