dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Adding Windows XP Styles 2 Ur Application

  1. #1
    Join Date
    Jan 2007
    Posts
    22

    Adding Windows XP Styles 2 Ur Application

    First of all :
    What is meant by Windows XP Styles ?

    to understand what is meant by Windows XP Styles Look at the first attatched picture :


    to do that you must have this code in your project :

    Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
    Private Declare Function InitCommonControlsEx Lib "comctl32.dll" (init As InitCommonControlsExType) As Boolean

    Private Type InitCommonControlsExType
    dwSize As Long 'size of this structure
    dwICC As Long 'flags indicating which classes to be initialized
    End Type

    Private Type OSVERSIONINFO
    dwOSVersionInfoSize As Long
    dwMajorVersion As Long
    dwMinorVersion As Long
    dwBuildNumber As Long
    dwPlatformId As Long
    szCSDVersion As String * 128
    End Type
    Private Function InitCommonControls() As Boolean
    Dim InitCC As InitCommonControlsExType

    With InitCC
    .dwSize = Len(InitCC)
    .dwICC = ICC_USEREX_CLASSES
    End With

    InitCommonControls = InitCommonControlsEx(InitCC) 'initialize the common controls
    End Function

    Private Sub Form_Initialize()
    Dim os As OSVERSIONINFO
    os.dwOSVersionInfoSize = Len(os)
    GetVersionEx os
    If os.dwMajorVersion >= 5 Then InitCommonControls
    End Sub

    Note :
    Skip the previous step if the startup form has already a common-controls control such as progress bar


    Then ,
    use the attached XP Styler program to add XP Styles to your programs

    XP Styler can be used also as An ADD-In to make your application "XP-Styled " automatically on compile !

    You can make VB6 itself XP-Styled !


    Now Enjoy your XP Styled Program !!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    Thanks Amr .

    p.s. I knew another method , that add an xml file (mainfeast file) in the project resource .. the xml string is easy to be done , and I prefere it than using a closed exe package
    p.s.s in the online msdn there is steps in how to implement this xml .
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  3. #3
    Join Date
    Jan 2007
    Posts
    22
    Thank U amahdy,
    I understood what do u mean , this tool adds an internal or external manifest file to your application

    manifests can be added by using 2 methods :
    standalone manifest file named as your application.exe.manifest ( I don't like this )

    the other method is to add it to the application's resources in a "24" resource entry .

    The manifest file or resource looks like this :

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

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

    <assemblyIdentity

    version="1.0.0.0"

    processorArchitecture="X86"

    name="MyApp"

    type="win32"

    />

    <description>MyApp</description>

    <dependency>

    <dependentAssembly>

    <assemblyIdentity

    type="win32"

    name="Microsoft.Windows.Common-Controls"

    version="6.0.0.0"

    processorArchitecture="X86"

    publicKeyToken="6595b64144ccf1df"

    language="*"

    />

    </dependentAssembly>

    </dependency>

    </assembly>

    the work of my tool is to automate adding the resource on compile .

    instead of using another resource viewer or using BeginUpdateResource function

Similar Threads

  1. Replies: 1
    Last Post: 12-06-2006, 02:28 PM
  2. Replies: 0
    Last Post: 11-08-2006, 03:46 AM
  3. Replies: 0
    Last Post: 09-28-2002, 03:00 PM
  4. C# Windows Application
    By Dharmesh in forum .NET
    Replies: 0
    Last Post: 08-03-2001, 04:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center