VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Changing app Look

by Jiten Mhatre (1 Submission)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 25th August 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Changing app Look

API Declarations



Create manifest file for changing your application visual style in winXP (only WinXP)

Using Notepad. add the following text to a new file and name the file vb6.exe.manifest. Save to the same folder containing VB6.exe.
To have your final app present with the XP styles when run as an executable, follow these tips:
create a manifest as above, naming it myapp.exe.manifest (where myapp is the name of your application)
install it into the same folder as the exe
declare the InitCommonControls() API in a bas module within the project, and call this from the Initialize event, not the Load event, in each form. Initialize fires when the code is loaded but before the graphical interface is created. Load is called when the interface is created, which is often too late and may result in a hung app.
controls (ie option buttons and check boxes) within a Frame control will loose the XP style and appear as black boxes. A tip I received from Quintin Prinsloo to overcome this problem is to place the controls inside a picture box, and place that picture box into the frame. Because XP repaints controls with the XP style, it requires the controls be hosted inside a container supporting a hDC, such as the form and picture box.


Rate Changing app Look



<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
   version="1.0.0.0"
   processorArchitecture="X86"
   name="Microsoft.VB6.VBnetStyles"
   type="win32"
/>
<description>VBnet Manifest for VB6 IDE</description>
<dependency>
   <dependentAssembly>
     <assemblyIdentity
       type="win32"
       name="Microsoft.Windows.Common-Controls"
       version="6.0.0.0"
       processorArchitecture="X86"
       publicKeyToken="6595b64144ccf1df"
       language="*"
     />
   </dependentAssembly>
</dependency>
</assembly>

Download this snippet    Add to My Saved Code

Changing app Look Comments

No comments have been posted about Changing app Look. Why not be the first to post a comment about Changing app Look.

Post your comment

Subject:
Message:
0/1000 characters