-
February 12th, 2004, 02:54 PM
#1
EnableVisualStyles and Toolbars
There seems to be a problem with enabling XP style (EnableVisualStyles) and toolbars, i.e. the buttons will not display images. Has anyone solved this/found a work around???
bytz
--This signature left intentionally blank--
-
February 13th, 2004, 05:25 AM
#2
The support for XP Visual Styles is not well-implemented in .NET Framework 1.1. You should use the manifest file instead of using EnableVisualStyles().
Zembaliti
-
February 13th, 2004, 10:12 AM
#3
Hate to sound dense here, but do you know of an example that shows how to do this? I tried creating a app.exe.manifest file and added it to the project but that didn't work. And, as usual, I'm looking in all the wrong places in the online help....
TIA, for any help.
bytz
--This signature left intentionally blank--
-
February 13th, 2004, 11:29 AM
#4
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="Microsoft.Windows.Your_App_Name_Here_Without_EXE"
type="win32"
/>
<description>Your app description here</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
save this as file named ::: yourApp.EXE.MANIFEST
off you go
If you think you CAN, you can, If you think you CAN'T, you are probably right.
Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.
-
February 13th, 2004, 01:04 PM
#5
Actually, it was more of the last bit contained in "off you go"... i.e. the only way I could figure to get this to work was to insert the .manifest file in the same location as the exe. Is there any way to "embed" it in the app itself?
bytz
--This signature left intentionally blank--
-
February 16th, 2004, 03:04 AM
#6
embedding the file doesnot gave anything good as far as i worked on the issue.
so, when i create deployment project, i simply add manifest file and place it next to my application exe.
no other way as such.
I even worked with Enable visual styles function but when you run the program on W2K or NT, it returns error and the application goes head down. so, if you want to include visual styles and you are sure that no one is going to the app on w2k or NT. you can go for enablevisualstyles function and it works pretty fine. (only on XP)...
If you think you CAN, you can, If you think you CAN'T, you are probably right.
Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.
-
February 16th, 2004, 08:35 AM
#7
It may work fine for most things on XP but for some reason the toolbars don't display images. I tried using a imagelist with images placed in the wizard, and loading (.AddStrip) a stirp af images from an embedded resource. Neither set of images would show. Hmm, maybe I should try just loading the image strip at run time...
Another strange thing is that if you use the wizard to put images in the image list, use it with a verticle toolbar, and dock on top and bottom, the image will not display...
bytz
--This signature left intentionally blank--
-
February 16th, 2004, 09:15 AM
#8
you have to check whether AutoSize property of toolbar is set to true.
the images are displayed as it is in my projects. I face problems when i put text and change between show Below and show Right.
If you think you CAN, you can, If you think you CAN'T, you are probably right.
Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.
-
February 27th, 2004, 04:00 AM
#9
embed a manifest file into exe
A Win32 resource must be added to your .exe. The type of the resource must be "RT_MANIFEST" and the resource id must be "1". An easy way to do this is with Visual Studio.NET:
1. Open your exe in VS (file -> open file)
2. Right click on it and select add resource
3. Click "Import..." from the dialog
4. Select your manifest file
5. In the "Resource Type" field, enter "RT_MANIFEST"
6. In the property grid, change the resource ID from "101" to "1".
7. Save the exe.
If you think you CAN, you can, If you think you CAN'T, you are probably right.
Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.
-
March 26th, 2004, 08:53 PM
#10
Application.DoEvents();
Right after enable visual styles.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|