473,473 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

little app to set app focus in explorer

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
--
Tony


Nov 21 '05 #1
6 1549
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...b;en-us;827315

Ken

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

"TM" <no********@nothing.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
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
--
Tony

Nov 21 '05 #2
TM
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
--
Tony

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl...
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...b;en-us;827315

Ken

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

"TM" <no********@nothing.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
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
--
Tony


Nov 21 '05 #3
> 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
Nov 21 '05 #4
TM
Hum interesting idea. Thanks
--
Tony

"Larry Serflaten" <se*******@usinternet.com> wrote in message
news:uk**************@TK2MSFTNGP14.phx.gbl...
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

Nov 21 '05 #5
TM
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

--
Tony

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl...
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...b;en-us;827315

Ken

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

"TM" <no********@nothing.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
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
--
Tony


Nov 21 '05 #6
TM
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("C ontrol Panel\desktop",
True)PreventFocus.SetValue("ForegroundLockTimeout" , 200000)
Thanks
--
Tony

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl...
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...b;en-us;827315

Ken

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

"TM" <no********@nothing.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
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
--
Tony


Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Robert Dickow | last post by:
Here's an interesting problem: When Netscape Nav plays an embedded sound, the current window will lose focus. Specifically, a user may be typing into a text input field, but an embedded sound in...
7
by: Phl | last post by:
hi, I can use the following code to set focus to standard html elements but if I try to do the same for a custom element, it seems to complain that it does not support a focus method. Does...
31
by: Benno Bös | last post by:
If I use the following construct in the frame "main" for a link to an extern site: <A HREF="http://www.any.xy" TARGET="extern"> the Browser is creating the window "extern", loading the page...
4
by: Nitin | last post by:
Hi I have created function to check date and time. at the time of execution, if date is left empty the function returns the error message but then the focus goes to next field. Next filed is for...
6
by: joe | last post by:
Hi Everyone, could anyone comment on the following problem: I have a textbox being appended to a cell in a table, and am trying to call focus() on like this: <snip> c01.removeChild(answerbox);...
4
by: Benoit Martin | last post by:
How can I make sure that my Windows application will have the focus at startup? Currently, if there is an Explorer window open when I launch my app for example, the Explorer window will still have...
4
by: Stefan Mueller | last post by:
With the following code I try to set the focus to the first anchor just after the page has been loaded. However, it doesn't work. Exactly spoken the focus is set to the first anchor (if you press...
8
by: Brad Isaacs | last post by:
Good morning friends, I am working with Visual Studio 2005, ASP.NET 2.0 I am working with the Login controls provided my .NET 2.0, trying to make the Login1 control UserName textbox obtain...
1
by: Drelus | last post by:
I'm using an Ajax call to open a search box in the page and I want the focus to go to the box automatically. So, in the httpObject.responseText, I tried sending the following in addition to the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.