Is there any way to configure windows to not change the focus? - windows

I'm tired of being in the middle of typing something, having a pop-up with a question appear, and hitting enter before reading it... (it also happens with some windows that are not pop-ups)
Do you know if there's some setting I could touch for this not to happen?

It suppose to be a registry change that helps with this type of situations (mentioned in this Coding Horror post about the subject of "focus stealing"). I try it, it doesn't work with all popups but helps with some of them, causing the offending application to flash in the taskbar instead of gain focus.

Not that I know of. This has been a plague of Windows versions for quite some time.

Actually Windows XP tries to avoid that. Of course some programs found a way to circumvented that. Microsoft Powertoy TweakUI has a way to turn the option on again in case it was turned off. You could also edit the registry yourself using the following information.

Related

How to Disable / Delete a specific hotkey in Windows 7?

I'm Romanian and I have the Romanian layout installed so I can use the diacritics (ă,â,ș,ț).
I use the programmers version which requires me to press ALT+SHIFT+A to get Ă and ALT+A to get 'ă' for example.
The problem comes when I try to use the Ș. To type it as a caps, I have to press ALT+SHIFT+S. It's an issue, because this seems to be the shortcut to shutting down your computer.
Being a fast typist, I sometimes use 'Ș' automatically and the PC shuts down. Really annoying and it causes me to lose some unsaved work, lots actually.
Can anyone tell me how to disable this?
Thanks,
Andrei

Update desktop "show window contents while dragging" setting programatically

One of my programs seems to be changing the Display Properties > Appearance > Effects > Show window contents while dragging setting to off every few hours.
I'm not sure exactly which program, or when it happens. I have a number of programs that seem like likely culprits - wallpaper rotators, software for multiple monitors, multiple virual desktops and switching, and a few others.
I am just thinking to create a little batch script to run periodically and set the setting back to on.
Does anyone know how to do this in windows? I'm using xp pro sp3.
Thanks!
The best option is to do this programmatically using the supported API. i haven't tested this, but it should do the trick:
SystemParametersInfo(SPI_SETDRAGFULLWINDOWS,
TRUE,
NULL,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE)
You can use SPI_GETDRAGFULLWINDOWS to see if the the bit has been flipped to avoid unnecessarily triggering a WM_SETTINGCHANGE.
You can use RegMon to find the program that keeps changing your settings. Maybe that's a better start than hacking around it.
There is a simple and effective solution to this problem. In Notepad type the following lines :
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop] "DragFullWindows"="1"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DragFullWindows] "CheckedValue"=dword:00000001 "UncheckedValue"=dword:00000001
Save the file as "Show Window Contents.reg" Double clicking this file and restarting will cure the problem permanently. Post a message if you find this useful.
Aravind Banerjee
It seems the registry setting which controls that preference is HKCU\Control Panel\Desktop\DragFullWindows. You can read more about it here. However, trying it on my own computer does not register the change right away, so a batch script won't do it. You'll probably have to write a program to manipulate it using SystemParametersInfo(). You can pass it the SPI_SETDRAGFULLWINDOWS parameter. Here's a page explaining it more. Here's a page showing how to call it, albeit not for the same parameter.
I suspect it's kept in the registry - maybe [HKEY_CURRENT_USER\Control Panel\Desktop] - "DragFullWindows"?
It would be easy to flip the registry setting back to "1" every hour or so with a batch file.

Biggest windbg pet peeve

What is your biggest pet peeve related to the windbg debugger from microsoft?
(note: I actually really like windbg if I ignore the unpolished UI.)
Attempting to dock a window is almost always the wrong kind of dock the first time until :I move the mouse just right. Why can't it have the docking cues that VS2008 has?
The ridiculous behavior when you attempt to use click-drag to select text on a line that is wider than its physical window.
The pieces of the history window that I need to copy/paste into bug reports are frequently wider than the physical window. I've gotten so used to the triple-click workaround that I find myself attempting to misuse triple click in other (well behaved) applications.
Key presses are ignored while the focus is in a source window. It's not like you can edit the source code from inside windbg. At least there's the Alt-1 workaround.
How insanely slow .kdfiles copies new binaries across the 1394 connection. It can take up to one minute for a large dll.
Not being able to switch from output window to command window using a key press, I read that 'Alt+1' should work but it doesn't always so I always have to resort to using the mouse. Also sometimes it doesn't remember when I tell it not to ask me everytime if I want to save the workspace when I quit.

Is there a simple way to change the text of the 'Open' button on the windows file dialog to 'Select'?

We're using the file picker dialog to allow users to add documents into our application. The word 'Open' doesn't make a lot of sense in this case.
Thanks.
I would browse the code found here, which shows how someone extended the OpenFileDialog. Admittedly, this is overkill for you. But I think there is code within to change the button label.
Not really no.
Given the standardization of this dialog it's extremely likely that your users will have used it many times in the past to "add" files to applications. The chances are they will be quite familiar with the implications of the word, changing it may be more confusing to them.
The standardness of the dialog is why it's called a "Common File Dialog". If you want to change it for your app, you'll have to write your own dialog.
Having said that, there are apps out there that can pull a form out of a DLL, modify it, and stick it back in. However, this is a per-machine hack and downright bad form.

Windows internet shortcuts: starting with IE maximized?

I have an internet shortcut on my desktop, with the contents looking like this:
[InternetShortcut]
URL=http://www.microsoft.com/isapi/redir.dll?prd=ie&pver=6&ar=IStart
Modified=D03458CE7738C801A2
I was wondering if there are any tweaks I can do to guarantee that the browser starts maximized after someone loads the link.
Thanks!
In short:You can't guarantee that the browser starts maximized from one special internet link. Either all or none internet links start maximized.
But: Someone had a similar problem than this.
Check this, if it helps you.
Edit: owhowho I've found something really dirty, I think you shouldn't use this, but... here it is. Replace your second line with the following:
URL=javascript:window.moveTo(0,0);window.resizeTo(screen.width,screen.height);window.location.href="http://www.microsoft.com/isapi/redir.dll?prd=ie&pver=6&ar=IStart";
It doesn't make the window really maximized, but makes the browserwindow the maximum height and width.
Rather than using a internet shortcut (.url), create a shortcut (.lnk) to internet explorer. (iexplore.exe) You can set the initial windows state in lnk file. (Right-click the icon and see properties.)
You can give an URL as an argument. The target would be something like
"%programfiles%\Internet Explorer\iexplore.exe" http://reddit.com
This is okay when you are using this only in your computer. This is not a general solution. If you want to do this programatically, there are some windows API's related to creating a shortcut. You will also have to get an path of internet explorer from the registry, as it can vary. Some users might not have IE.
I think IE remembers how it was opened last time and then uses those settings.
You might find this info from Registry and use it, but I doubpt that it was implemented to get the values from startup arguments
You're jumping quite quickly to conclusions here. I don't think you can even guarantee that Internet Explorer will start at all; you will get whatever the user set as his default browser.
i think that it is a guarantee that the internet explorer will start unless the system is down. even if one gets the default window, from there it is very easy for you to set the browser to what you want.

Resources