VB help

  [DELETED] 18:50 10 Jun 2003
Locked

I have windows XP and when I create a program in VB the buttons I put on my form aren't like the rounded XP type but the old win98 and 2000(square) type. Does anyone know how I can make buttons XP style. The actual program form opens XP style but not the buttons. Thanks for your time.

  [DELETED] 19:25 10 Jun 2003

You have a few choices. You can write your program using the standard buttons and include a manifest file with it. This will persuade Windows XP to apply its buttons and toolbars to your program. A manifest file is an XML document with the extension of ".manifest"

Example code of a manifest file is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>


<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

<assemblyIdentity name="Microsoft.Windows.ProgramName" processorArchitecture="x86" type="win32" version="1.0.0.0"/>

<description>ProgramName</description>

<dependency>

<dependentAssembly>

<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" language="*" processorArchitecture="*" publicKeyToken="6595b64144ccf1df"/>

</dependentAssembly>

</dependency>

</assembly>

If this seems complex, that's because it can be. It also only works on XP systems; other versions of Windows will display the default Win98 style buttons and toolbars.

Your other options are to design your own custom graphics, but this can entail a lot of work since you'll need every graphic in all states (mouse over, mouse down, static and so on) or to download and use an existing library, and I don't know of a free one for you. Sorry.

click here

click here

Also try Google with the following search criteria;

"visual basic"+"xp"+"button"

There are some very nice XP add on libraries, but as I've said, I don't know of a free one and (bizarrely) the best one I've seen yet is for Delphi, not VB.

Hope this helps.

Taran

  [DELETED] 19:41 10 Jun 2003

Cheers Taran, I'll have a look around. I'm suprised that VB doesn't actually recognise the OS and adjust to it.

  [DELETED] 12:41 11 Jun 2003

If you are using VB (Professional Edition) you should have Sheridan Software installed with VB which will give you Rounded Corners, Bevels and 3- D effects for your command Buttons

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

How to watch the World Cup for free on TV and online

Meet Superfiction, the little design studio with a load of character

Best Mac buying guide 2018

Comment résoudre les problèmes de connexion internet d’un iPhone ?