QT application style does not change between the different windows themes - windows

Via qApp->setStyle you can change the style of your application. What I found is when I run on Windows 7 with windows 7 theme I can switch between:
qApp->setStyle(QStyleFactory::create("Windows"));
qApp->setStyle(QStyleFactory::create("WindowsVista"));
qApp->setStyle(QStyleFactory::create("WindowsXP));
But if I have my windows 7 setup with windows classic theme, I cannot switch between those 3. They all look the same.
How can I force my application to look like Windows Vista on Windows Classic theme PC?
Note: my system returns for QStyleFacory::keys():
Windows
WindowsXP
WindowsVista
Fusion

That's correct. On Windows, the "Vista" and "XP" themes are only active if you're using the same or higher theme on the user account. That's not due to Qt, but due to the behavior of the theming APIs on Windows.

Related

Adding Font to Windows Phone 7

Is it possible to add Custom fonts to Windows Phone 7 system fonts?
I have Windows Phone 7.5 (Lg C900) and it doesn't support Georgian font.
I want to add font to Windows Phone's OS, not to an application.
Any ideas?
yes it is possible in windows phone. Add custom font file in your solution.And then add following line of code in App.xaml
<Application.Resources><FontFamily x:Key="QUARTZMS">/Fonts/QUARTZMS.TTF</FontFamily></Application.Resources>
It is not possible to add new fonts or language support to Windows Phone 7 beyond what is already available. Windows Phone 8 does have additional language support, though.
The official MSDN docs have a great list of all supported languages and illustrate the differences between the two platforms...
Culture and Language support
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202918(v=vs.105).aspx
UI Font support
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202920(v=vs.105).aspx#BKMK_SupportedUIFontsinWindowsPhone

Windows Forms color variation between Windows 7 and XP

I have a vb.net Windows Forms app using the 4.0 framework. When I run the application on an XP machine, the color of my controls all match what the are set to in my IDE, which is also an XP machine.
When I run this application on a Windows 7 machine, the colors are all changed.
Any ideas why this is and how I can make Windows 7 match my Development machine?
David
Windows forms are going to take on whatever "theme" the machine they are running on has enabled - which is by design. Honestly, it wouldn't make sense for a windows form running on Windows 7 to look like an XP windows form. Could you give some sort of context for why you want your windows form to look like it's always running on XP?
You can use the BackColor property of the button to change the background color. The ForeColor property will change the text color.
Edit: added the below after playing around some.
Try ensuring the "UseVisualStyleBackColor" property on your button is set to False. Playing around I noticed that when this is true, the system ignores my background color selection and uses the machine default. When False, my background color was used.
I found this too. My VB6 project was fine in Windows XP.
I just moved to Windows 7 and copied the project folder to this machine.
My splashscreen backcolour was supposed to be white but it was black now.
The backcolour had been set to &H80000009& which was white in winXP but in Windows 7 it gives black.
So I changed backcolour to &H80000005& and it is now white again.

How can I customize the login screen for Windows Vista & 7?

I need to create a windows login UI for Windows 7 & Vista which logs user name and image from webcam (replacing their login screen). I don't know where to start from. Can I do this in C# or will I have to use C++? Any link will be helpful.
If you just need Windows 7 and Windows Vista support, you are looking for Credential Provider. You can find some samples in Windows SDK.
If you want to extend pre-Vista Windows, you are looking for GINA

Is it possible to use default Windows 7 themes in Windows Embedded Standard 7?

Is it possible to use Windows 7 default themes (such as Windows 7 Basic) on Windows Embedded Standard 7 ? If so, how ?
I believe themes include common controls styling i.e. they give an "Aero" look to your progress bar instead of the classic Windows 95-ish one.
The context of my question is a migration of a WPF application from a Windows 7 workstation to a Windows Embedded Standard 7 embedded device.
Nevermind, here is the solution:
Uri uri = new Uri("PresentationFramework.Aero;V3.0.0.0;31bf3856ad364e35;component\themes/aero.normalcolor.xaml", UriKind.Relative);
Resources.MergedDictionaries.Add(Application.LoadComponent(uri) as ResourceDictionary);
There is a blog article about the topic
http://arbel.net/blog/archive/2006/11/03/Forcing-WPF-to-use-a-specific-Windows-theme.aspx

Why does OpenThemeData(pParent, L"TEXTSTYLE") fail on XP?

I'm using the theme library to draw some text which works absolutely fine on Windows Vista - however, on Windows XP the returned HTHEME is NULL. This is the code I'm using:
HTHEME hTheme = ::OpenThemeData(pParent, L"TEXTSTYLE");
hTheme is valid on Vista, but NULL on Windows XP.
I've read the documentation for OpenThemeData and Parts and States on MSDN, but nothing mentions that TEXTSTYLE isn't supported on XP (even Google doesn't throw up any good suggestions).
The theme Luna (i.e. the Microsoft-made theme distributed with XP) defines only subset of classes and parts of Aero (Windows Vista and 7).
If you have access to machines with Windows XP and Vista (or 7) you may preview what's defined by Theme Explorer utility:
http://sourceforge.net/projects/mctrl/files/theme-explorer/
I presume that on XP you still have theming turned on? If you have turned off "bubblegum" mode - i.e. reverted to the classic look, then the Theming APIs all fail and youre expected to use the legacy APIs to draw the frame elements. DrawFrameControl etc.

Resources