Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys,

Is there any way to programatically toggle between windows modes in Win 7?

For instance if I want to switch from Aero mode to classic mode and vice versa?
Better still, is there any way to programatically decrease the "Active Title bar" size and "Border Padding" in windows 7?

I would imagine many people would be having such problems porting applications from Windows XP to Windows 7.

Any help would be appreciated.

Kindest Regards,
Posted
Comments
Sergey Alexandrovich Kryukov 12-Nov-12 13:13pm    
Those are nothing like "modes"... why would you need that? It's done by the user, and you need to work with whatever is selected.
--SA
weirdProgrammer-2 12-Nov-12 13:28pm    
hi, thanks for your response.

I am a developer for a security company which offers certain utilities for third party CCTV players. In CCTV footages, it is of interest that the "time and date" information is overlapped from the player onto the footage, so that the footage can be presented to court, etc.

Over the years, this software has been working fine on Windows XP, and is in use with various police forces around the world. But ofcourse, we need to move on and a support for Windows 7 is imperative.

When I say "porting", this is just one aspect of the application I was talking about, I had to hunt around for quiet a few driver for the hardware used in this application. (for example Phillips trimedia, sentinel drivers ,etc). The hunt is even more intense, the new customers are purchasing Win7 64 Bit, the hardware drivers can be a real pain to get right.

The question that I asked was for this "screen grabbing" from the CCTV footage and the subsequent overlapping of the time and date information. In XP - classic, this is simple enough as there are no borders, etc

In Win7, as you may know, the active window caption area is 21 pixels (instead of 18, as is the case of windows xp classic) and the border padding is 4 (instead of 0 in windows xp classic)

This causes major complications in this overlapping of time and date information as various cctv players have their time and date information in different areas of the player. And different CCTV players act differently in Win7, some have the border padding, while some dont have the border padding. So lets say for instance, a CCTV player would be of area 320x240 in Windows XP Classic, in Windows Aero, this would be approximately 328 x 248 , all thanks to the border padding.

So I wanted some sort of functionality where as I could reset the users Border Padding to 0, and the active title bar area to 18, so as to avoid this complication. This can be done manually by going to Windows Appearance/Personalisation.

I guess if its not possible, I will have to come up with some other strategy, perhaps even retraining our entire algorithm.


Thanks
Sergey Alexandrovich Kryukov 12-Nov-12 13:14pm    
There is absolutely no need to port legitimate applications to Windows 7. If it needs porting, there was something wrong with them in first place (in other words, their ability to run and show correct view/layout was accidental).
--SA

There are many programs, when run, run as a "Windows Classic application" but when you exit them, Windows reverts back to Aero. This can also be done in the "compatibility" tab of an .exe by selecting "Disable visual themes" and "disable desktop composition".

There has to be a "legal" way to do this under program control.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 12-Nov-12 13:48pm    
Correct, a 5.
--SA
Please see my comments to the question where I try to explain what do I think about such "porting". To me, it would be bug fixing, not porting. From my understanding of your question, you hope to make some old code running on Windows 7 by forceful switching off the Aero style. You need to though out this idea, as it would be a crime against your user. The user wants to use any UI style; and your application should comply. Better fix your bugs sneaked in during development under Windows XP. If you do it, Aero will work for you.

—SA
 
Share this answer
 
Comments
weirdProgrammer-2 12-Nov-12 13:34pm    
dear sir,

it won't be a crime, I work for a security organisation and our customers are the police force. One aspect of the application, uses a screen grabbing methodology , where in the Time and Date information is to be overlapped. (Windows Aero messes it up)

It is actually not a bug, this software of ours is in the market for 10 years now. All I wanted to know was that is there a way to change the border padding of the user , but ofcourse after a warning message!

Worst come worse, we will advice the customer to run the program in windows classic mode. But I was just asking a simple question, no evil intentions here! :)
Sergey Alexandrovich Kryukov 12-Nov-12 13:48pm    
What you want to involve police force into a crime? This is even worse.

Let's forget programming. It sounds like you think that is something is used by police, it makes it legal? Also, do you think that making a crime with good intention will make it not crime? And finally, do you think that having bugs in production for 10 years make them features?

Those are serious questions. They actually question if you should do development at all or not. Sorry for being so frank.

And your question is not so simple, really, but the main thing is: you should not do it; you should fix your code. You are trying to fix things by making things worse. The right solution for you is "Solution 2", I think.
--SA
Thanks you sir, you have been most helpful.

By the way for other people with a similar problem, not looking to be personally attacked, the function that I was looking for is

http://msdn.microsoft.com/en-us/library/windows/desktop/aa969510%28v=vs.85%29.aspx[^]


Now I will do this in my application, and lets see if its a crime. You , dear sir , can take me to court if you wish.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900