Click to See Complete Forum and Search --> : PrevInstance


grafix
September 12th, 1999, 11:44 AM
I'm trying to create a screen saver using VB 6.0 I found a template VB file that has helped me greatly. But I'm having trouble getting the PrevInstance property to work. Everytime the screen saver exectues, it creates about 30-40 copies of itself. The documentation from Microsoft isn't very helpful in where this code needs to be placed and called from. I have it in a basic module, but it mentions a form load event?

any help would be appreciated.

Lothar Haensler
September 13th, 1999, 01:33 AM
if you want to avoid that your app is started multiple times, you can use the App.Previnstance property.
If your app starts with "sub Main" you can place it there.
If it starts with a form, place the following code in the Form_Load event proc of your form.

if app.previnstance then
end
end if