little app to set app focus in explorer

  • Thread starter Thread starter TM
  • Start date Start date
T

TM

For some reason I have a problem with the application focus deal in windows
explorer getting reset.

I used TweakUI to set the "Prevent applications from stealing focus" to on
so that it flashes the icon in the taskbar.

But this somehow gets reset everytime I reboot.

Is there a little vb app that I can use or create to set this toy the way I
want it upon startup ?

Thanks
 
Hi,

This should work

Dim hku As Microsoft.Win32.RegistryKey =
Microsoft.Win32.Registry.CurrentUser

Dim PreventFocus As Microsoft.Win32.RegistryKey = hku.OpenSubKey("Control
Panel\desktop", True)

PreventFocus.SetValue("ForegroundLockTimeout", 200000)



Maybe your computer has some sort of spy ware on it that is why it
is not acting as expected.

http://support.microsoft.com/default.aspx?scid=kb;en-us;827315



Ken

-------------------------------------

For some reason I have a problem with the application focus deal in windows
explorer getting reset.

I used TweakUI to set the "Prevent applications from stealing focus" to on
so that it flashes the icon in the taskbar.

But this somehow gets reset everytime I reboot.

Is there a little vb app that I can use or create to set this toy the way I
want it upon startup ?

Thanks
 
I have scanned my computer yesterday and scan it weekly for spyware and
viruses.

But I do appreciate the help

Is there a way I can use that code in a program but without a user interface
? SO that I can just out the exe in my startup folder ?

Thanks
 
Is there a way I can use that code in a program but without a user interface
? SO that I can just out the exe in my startup folder ?

I haven't tried this but it would be one of the first things I'd attempt....

1. Set the option to your desired setting
2. Export the desired key from regedit
3. Place that .reg file in your Startup folder.

If that doesn't get it (it doesn't run, or it gets changed back after
it runs) then you could add a program to your startup folder that
simply waits 10 or 15 seconds, and then launches that .reg file.

While you do that, you might make it robust enough such that
you can add other programs with delays, and allow for calling
them up in a specific order. That would allow you to put just one
item in your Startup folder that would call all the others you
want launched....

Good luck!
LFS
 
Hum interesting idea. Thanks
--
Tony



Larry Serflaten said:
I haven't tried this but it would be one of the first things I'd
attempt....

1. Set the option to your desired setting
2. Export the desired key from regedit
3. Place that .reg file in your Startup folder.

If that doesn't get it (it doesn't run, or it gets changed back after
it runs) then you could add a program to your startup folder that
simply waits 10 or 15 seconds, and then launches that .reg file.

While you do that, you might make it robust enough such that
you can add other programs with delays, and allow for calling
them up in a specific order. That would allow you to put just one
item in your Startup folder that would call all the others you
want launched....

Good luck!
LFS
 
I tried the little app you gave me and when I tried to run it, I got this
error:

Class 'Microsoft.Win32.RegistryKey' cannot be indexed because it has no
default property.

Any ideas ?
Thanks
 
Got it. I changed the lines to this and it worked like a charm.
Dim PreventFocus As Microsoft.Win32.RegistryKey =
Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Control Panel\desktop",
True)PreventFocus.SetValue("ForegroundLockTimeout", 200000)


Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top