Giving Your Project Controls a XP Look by Project SP

You can talk about VB programming here

Giving Your Project Controls a XP Look by Project SP

Postby locohacker » Mon Nov 22, 2004 4:47 pm


This was explain by salmanpaji in the old forums 8)

Put This In You Programs Codes And See It Will Work, NoMatter What
Kind of Control You're Working With

Code: Select all
Private Declare Function InitCommonControls Lib "comctl32.dll" () As Long


Code: Select all
Private Sub Form_Initialize()
Call InitCommonControls
End Sub



Create A Manifest File From NotePad And Name the FileName That
you Want It To Have a XP Look'

e.g; the FileName Is "ProjectSP.exe"

then Make The Manifest FileName Like This

e.g: ProjectSP.exe.manifest

>>>>> Put These Codes In The NotePad
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" processorArchitecture="*" version="6.0.0.0" name="ProjectSP"/>
<dependency>
   <dependentAssembly>
      <assemblyIdentity
           type="win32"
           name="Microsoft.Windows.Common-Controls" version="6.0.0.0"
           language="*"
           processorArchitecture="*"
         publicKeyToken="6595b64144ccf1df"
      />
   </dependentAssembly>
</dependency>
</assembly>


THIS METHOD 100%....... Project SP A.K.A. Salman Paji
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4325
Joined: Fri Dec 31, 2004 6:59 pm

lol

Postby Guest » Fri Feb 04, 2005 11:15 pm

na thats just more code to add i can save time by adding a ctl file i use :)
Guest
 

Postby locohacker » Sat Mar 12, 2005 10:39 am

Check I was looking for this solution, where all the options controls or check boxes turb black inside a frame when giving a xp look, but i found this and it works to take the black away.

controls (such as option buttons and check boxes) within a Frame control will loose the XP style and appear as black boxes. The problem is that to draw the XP styles the container must provide a device context handle (hDc) with which to perform the GDI functions. Since frames don't provide an hDc the result is an unpainted (black) controls. A tip I received from Quintin Prinsloo to overcome this problem is to place the controls inside a picture box - which has a hDc - and then place the picture box into the frame. By setting the border style to none the controls paint correctly without the appearance of the extra picture box.

Cool :)
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4325
Joined: Fri Dec 31, 2004 6:59 pm


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests