vb and interface depending on OS
I am trying to run my VB program on windows 7; I noticed the form interface, icon, etc are so out dated and does not look as new as .net - is there a dll or a way that I can put in my vb project so that the interface looks would be based of the OS the program is being run on?
Re: vb and interface depending on OS
I remember coming across an example in the codebank that showed you how to make your VB6 look more Window 7 style.
Re: vb and interface depending on OS
Could you point me to that post? And if it runs on XP, will it look more classic then?
Re: vb and interface depending on OS
Re: vb and interface depending on OS
Also note that if you're using the Common Controls in your project, if you want access to the XP/Vista/7 styles you actually need to use the earlier version, the 5.0 controls. The reason is that these are bound closely to the actual windows common controls DLL while the 6.0 controls are not, so they have some features over 5.0 but stop there, whereas 5.0 upgrades with the rest of the system.
Everything that you can do with the 6.0 controls can also be done with 5.0, although you will have to use API calls and, for a few advanced things, subclassing. But if you want a modern looking application, it's worth the effort.
There's a few UI items that even that can't solve, but VB, in a technique that illustrates just how useful this language still is, allows you to fully create the controls yourself with CreateWindowEx. Check out the excellent common controls replacement here: http://www.vbforums.com/showthread.p...on-controls%29 which uses that method. The user controls from that project will very much modernize your application.
Further beyond that, you can even bring in .NET forms. See http://msdn.microsoft.com/en-us/vstudio/ms788241.aspx. Interfaces can give you modern UI dialogs; check out things like the ProgressDialog interface from OLELIB. http://www.mvps.org/emorcillo/en/code/vb6/index.shtml