Change the taskbar settings programmatically? - windows

I want to change the settings of my taskbar with a small batch file or java programm or whatever.
So I want to know, if there is a registry key containg this information.
Does anybody knows, where Windows sets taskbar settings?
Edit: No, I don't want to annoy the users with changing taskbar settings on every boot.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\
and 64 bit eqivalent?

TaskBarCmd seems to do the job. It includes C++ source code. It uses the IBandSite COM Interface. Haven't tried the source, but the compiled version seems to work.

Related

how do I create a program in windows that can be activated by pressing short cut key instead of clicking?

I need to create a GUI working on windows that can be activated by pressing short cuts.
1. is it possible without setup class?
2. if not possible, just achieve pressing hotkeys and activate my program--how should i code it out--would be enough
thanks (I am using Qt for vs2012 add in to do the GUI)
I put some code up that starts a thread that does this. It is windows specific, but it does the job.
Clipboard Shortcut/Hotkey binding with Qt outside of application
One alternative to all of this, is to go to a shortcut to your program, go to its Properties, and then click on the shortcut area and type your desired shortcut. As long as it doesn't overlap with existing hotkeys that are registered in windows, it should work, without a hidden presence of your app in the system tray or some other background thread.
Hope that helps.
libqxt offers a QxtGlobalShortcut class that does what you want.

VS isolated shell creating custom document windows

I am trying to create custom document windows in VS isolated shell. What I hope to have is something similar to a ToolWindowPane where I can extend it for my custom tool windows and set the content to my custom user control. However, I am not sure if this is possible for VS document windows. I could not find any examples on how to extend the superclass WindowPane in order to create custom document windows that can be repeatedly created dynamically.
Any pointers or suggestions are greatly appreciated!
Edit: Or is there a way to prevent tool windows from restoring to its previous state on VS start? I basically want all of the tool windows to act like document windows and reset/delete themselves on close.
Edit2: Solved previous edit. Set transient flag to true, which prevents tool window from opening on IDE start.
Found work around here:
http://social.msdn.microsoft.com/forums/en/vsx/thread/d60f8cef-2523-4b53-8f24-92eb90912e7c/
However, if anyone has solution on how to create a custom document pane, that'd be great. ToolWindowPane has several drawbacks that I would rather avoid.

Change visible application name (Windows)

I am looking for a way to change my application name (that appears on right click on Windows 7 taskbar):
To something more informative like:
How do I do that?
I am using: Qt 4.7 (MinGW), Windows
I have found some info about using certificates and signing executables, but I am not sure if it is what I need. I know how to change icon. Thanks in advance.
From 5 minutes of experimentation it seem to be coming from the FileDescription field of the VERSIONINFO resource. It also seems like Windows is caching these values based on filename; I had to rename the .exe file each time I changed the resource for the changes to show up.

How to change file icon in Turbo C++ and cc3270.dll

I started to use Borland's Turbo C++ a few days ago. I actually have two questions.
1.: How can i change the file icon?? If i create a program (Console Application), it will always have this blue icon (buildings or something like that on it), and i can't find it anywhere, how to change it to the default "none" icon (which like in Dev-C++ is the default).
2.: If i create a console application, and i want to run on my virtual pc, then it says that the CC3270.DLL is missing. If i copy it to c:\windows\system32\ then it will working perfectly. But i want to avoid this way. So is it possible, to change a setting or something like that, that my application won't need this file? It's disturbing beacuse, if i want to use my program on a computer which hasn't this dll, than i have to copy it there, on every machine.
Thanks in advance!
kampi
1.you can see these links
How do I change the program icon for a console application?
How to Create a Custom Program Icon for a Console Mode Application
2.If you build using the dynamic Run-Time Library, you will also have to distribute one or more of the Run-Time Library DLLs CC3270.DLL or CC3270MT.DLL and the memory manager DLL.
you must uncheck the option "build with runtime packages" located in the project options.
Bye.

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.

Resources