I want to use visual styles in my app, but it is causing a problem with
a DLL I use. Is there a way to disable visual styles for that DLL? I do
not have access to the code for the DLL. The DLL's developer is aware
of the problem but will not have a fix ready in time for me. 5 4770
Hi,
As far as I know the visual stules are enabled for the whole application (or
at least per UI thread) you can't have some of the controls with enabled
visual styles and the other part not.
However I found that enabling visual stules from .NET cause problems some
times. It seems to work OK if the visual styles are enabled not form .NET
code, but by using manifest file.
Here you can find informarmation how to enable visual stules using manifest
files http://msdn.microsoft.com/library/de...ndowsForms.asp
--
Stoitcho Goutsev (100)
<ML****@hotmail .com> wrote in message
news:11******** *************@u 72g2000cwu.goog legroups.com... I want to use visual styles in my app, but it is causing a problem with a DLL I use. Is there a way to disable visual styles for that DLL? I do not have access to the code for the DLL. The DLL's developer is aware of the problem but will not have a fix ready in time for me.
You can call SetWindowTheme( ) (Interop call from uxtheme.dll) to disable
Visual Styles for a specific control. Pass String.Empty to the 2 string
Arguments to disable Visual Styles and null to re-enable.
[DllImport("uxth eme.dll")]
private static extern IntPtr SetWindowTheme( IntPtr hWnd, String
pszSubAppName, String pszSubIdList);
--
Mick Doherty http://dotnetrix.co.uk/nothing.html
<ML****@hotmail .com> wrote in message
news:11******** *************@u 72g2000cwu.goog legroups.com... I want to use visual styles in my app, but it is causing a problem with a DLL I use. Is there a way to disable visual styles for that DLL? I do not have access to the code for the DLL. The DLL's developer is aware of the problem but will not have a fix ready in time for me.
Thanks, Mick. I have tried SetWindowTheme. It does change the
appearance of the dialogs/controls created by the DLL, but the problem
persists. I think I need the visual styles disabled when the dialog is
created.
Any other ideas?
Without knowing anything about the dll or the problems you're encountering,
not really.
Have you tried placing a DoEvents() call after EnableVisualSty les() ?
Have you tried using a Manifest file instead of calling EnableVisualSty les()
?
Are you using VS2002, VS2003 or VS2005?
--
Mick Doherty http://dotnetrix.co.uk/nothing.html
<ML****@hotmail .com> wrote in message
news:11******** **************@ j55g2000cwa.goo glegroups.com.. . Thanks, Mick. I have tried SetWindowTheme. It does change the appearance of the dialogs/controls created by the DLL, but the problem persists. I think I need the visual styles disabled when the dialog is created.
Any other ideas?
Thanks for the response.
The one part of the DLL that does not work is a color selection
control. It uses colored buttons that appear raised when selected. The
control will not let the user select a new color when visual styles are
used.
I am using DoEvents() and I have tried using a manifest instead of
EnableVisualSty les. I am using VS2005.
Could something like ActivationConte xt or AppDomain be used to control
the environment of a DLL? I am not real familiar with them.
Thanks,
Mike This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: ht990332 |
last post by:
I'm writing applications in vc++ .net 2003. How do I give
the applications visual styles on winxp without adding a
..manifest file?
|
by: Anand |
last post by:
Hi,
I have done a sample windows application with controls
looks resembling to Windows XP Visual Styles by using the
guidelines http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/dv_vstechart/html/vbtchUsingWindowsXPVisualStylesWithCo
ntrolsOnWindowsForms.asp?frame=true.
I would like to incorporate all those XP Visual...
|
by: Alvo von Cossel I |
last post by:
hi,
i have an app with a lot of stuff including an optios form. 1 of the options
is disabling the xp visual styles. i know how to enable them but not how to
disable them. has anyone got an solution to my problem?
--
Alvo von Cossel I of Germany
|
by: Robert Jacobson |
last post by:
Hi,
I'm develing a COM add-in for Microsoft Word XP that displays a form. I'd
like to have the form display using the Windows XP theme. However, neither
using a manifest nor calling Application.EnableVisualStyles does the trick.
(EnableVisualStyles works but massive instability, probably because the
system is trying to theme the Word...
|
by: Brian Henry |
last post by:
here's something odd, maybe someone can explain it, when i turn on
application.enablevisualstyles at application start before i do my
application.run(context) command in the sub main, when the app context runs
and I get my main form, the toolbar is now missing all its icons (24x24) the
buttons are there just the icons are gone, also pretty...
| |
by: sklett |
last post by:
Hi,
I'm not SURE if Visual Styles is what I'm delaing with, but there is my
situation. On computer A which I have chosen "Classic Windows" as my
"Theme" my application appears the way I want it to. That is my progress
bars are solid when I tell them to be, my tool strips aren't blue, etc.
On my other machine which has the default XP...
|
by: nkarnold |
last post by:
My application seems to be ignoring Enable XP visual styles, which is
ticked on in the application properties.
the Toolbar and Menubar, which appear the nice looking shaded blue
appear like that whilst in the IDE, but when I run the app, they both
go to boring grey.
In the application.designer.vb self generated file, it does have...
|
by: Flash |
last post by:
Hello, recently I was looking through the system properties and came accross
system.visualstyles namespace. This appears to contain all of the visual
style elements in xp and I was wondering if it is possible to change these,
either using the way I found or another. When I tried to change one of the
elements, I got an error saying that it...
|
by: =?Utf-8?B?UmljaA==?= |
last post by:
On my old workstation (development workstation) if I set Application/Enable
XP visual styles - I was able to get/see the visual styles - like button
borders highlighting when you run the mouse over them. But on my new
workstation (development workstation) I can't get the visual styles to work.
Matter of fact, the button controls appear raised...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |