|
-
Mar 12th, 2004, 09:23 AM
#1
Thread Starter
Member
EnableVisualStyles() problem
Hi!
I have a form with a ToolBar control and an ImageList control linked to it. I add a couple of buttons with different images.
When I run this in a standard project it works fine, but as soon as I add the Application.EnableVisualStyles() row to the form constructor the images from the buttons dissappear?!?!
All the buttons, groupboxes, comboboxes get the desired XP look at the cost of no button images in the toolbar.
Anyone able to help me out on this?
/Nisse
-
Mar 12th, 2004, 10:39 AM
#2
Addicted Member
i have the same problem with imagelists....i would love an answer...
-
Mar 12th, 2004, 07:13 PM
#3
Lively Member
I've had this happen to me as well. I have VS2002 Pro version so i have to use a manifest file to get the XP theme look.
In the project i'm doing at the moment i'm able to get images onto the toolbar buttons with the XP theme look and yet i've done nothing different from the many times before.
The only thing i can think of is this might be a bug and you need to keep trying. Delete the toolbar and save, then re-add it. There have been times when i can't change the button size's, they would all stay very small even though i've set them to something like 100, 30.
By the way as we are talking about this, does anyone know how to make the buttons have individual width's? Notice how the "Search", "Favortes" and "Media" buttons in IE6 are different width?
Or is this still the same problem i've got.
-
Mar 12th, 2004, 07:37 PM
#4
Addicted Member
I've had the same problem.
I did some searching on the net and found this "Fix"
"Fix"
-
Mar 12th, 2004, 09:48 PM
#5
Frenzied Member
Originally posted by Wallabie
I've had this happen to me as well. I have VS2002 Pro version so i have to use a manifest file to get the XP theme look.
In the project i'm doing at the moment i'm able to get images onto the toolbar buttons with the XP theme look and yet i've done nothing different from the many times before.
The only thing i can think of is this might be a bug and you need to keep trying. Delete the toolbar and save, then re-add it. There have been times when i can't change the button size's, they would all stay very small even though i've set them to something like 100, 30.
By the way as we are talking about this, does anyone know how to make the buttons have individual width's? Notice how the "Search", "Favortes" and "Media" buttons in IE6 are different width?
Or is this still the same problem i've got.
toolbarbutton.buttonsize = ~~~~~
that should be in your properties window.
-
Mar 13th, 2004, 06:45 AM
#6
Lively Member
thephantom:
I've done that, but that set's all the buttons to the same size. I want to set them to different widths.
Are you using IE6? Look how the search, favorites and media buttons are different widths?
-
Mar 15th, 2004, 02:33 AM
#7
Thread Starter
Member
Originally posted by Hole-In-One
I've had the same problem.
I did some searching on the net and found this "Fix"
"Fix"
It seemed like a neat trick, but unfortunatelly I can't get it to work. I added the line:
Code:
Application.DoEvents()
right after the enablevisualstyles-line but no change in appearance.
-
Mar 15th, 2004, 09:38 AM
#8
Hyperactive Member
This definitely works VS2003 only
Module ProLet21 <<Name of Application>>
Sub Main()
Application.EnableVisualStyles()
Application.DoEvents()
Dim f1 As New Hub <<Name of first form>>
Application.Run(f1)
Application.Exit()
End Sub
End Module
-
Mar 15th, 2004, 10:28 AM
#9
Thread Starter
Member
Would you look at that, one minor detail that passed me by:
I have to put it all in a module, and start the project from that. Now it "works". =) Many thanx...
(I could have been bitter, about the fact that this should not have had to be done, but ....you can't fight them all...)
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
|