andy7789
asked on
VB.NET: how to build COM DLL with XP Visual styles
Hi x-perts,
I need to build a windows form to be further connected to VBA application vis DLL reference.
I build it in Visual studio as a Class Library. if I select Class Library, the "Enable Application Framework is grayed out" and I cannot select XP visual styles.
If I build it as windows application, I cannot connect it as COM in VBA references.
How can I do this?
To summarize: I need a XP style windows form to me accessible from VBA.
Please, help,
Thanks
I need to build a windows form to be further connected to VBA application vis DLL reference.
I build it in Visual studio as a Class Library. if I select Class Library, the "Enable Application Framework is grayed out" and I cannot select XP visual styles.
If I build it as windows application, I cannot connect it as COM in VBA references.
How can I do this?
To summarize: I need a XP style windows form to me accessible from VBA.
Please, help,
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have just tried this and it doesn't work. The symptoms:
1) If I build that form as a windows application, it shows fine
2) if I build the form as a class and link it as VBA reference (for Excel), it doesn't. I think the problem is that Excel VBA needs some additional reference for control (I saw some mentioning of Common Controls 6, but cannot find it in referfences)
any thoughts?
1) If I build that form as a windows application, it shows fine
2) if I build the form as a class and link it as VBA reference (for Excel), it doesn't. I think the problem is that Excel VBA needs some additional reference for control (I saw some mentioning of Common Controls 6, but cannot find it in referfences)
any thoughts?
I didn't tried yet, and I'm not shure if it works right, but add that in the form load event.
ASKER
Thanks a lot!!!!!!!!
after a few tries I have managed to get it done by adding
System.Windows.Forms.Appli cation.Ena bleVisualS tyles()
before 1st line of
Form.show()
Thanks again - great help
after a few tries I have managed to get it done by adding
System.Windows.Forms.Appli
before 1st line of
Form.show()
Thanks again - great help
ASKER
it says: "To enable visual styles in the client area of a Windows form, add the following code to your application's Main method."
Application.EnableVisualSt
where exactly should I add it? Into VB.NET code or the VBA code, which calls the form? Where application Main method?