Results 1 to 3 of 3

Thread: A small piece of code to share

Hybrid View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2009
    Posts
    93

    A small piece of code to share

    Just wanted to share a small piece of code that i found. I had started a thread asking about how to prevent some controls from taking XP styles when using manifest files. But i can't find that thread. But anyway i got the solution. Here it is: (In this example i use a scrollbar)


    Option Explicit
    Private Declare Function DeactivateWindowTheme Lib "uxtheme" _
    Alias "SetWindowTheme" ( _
    ByVal hWnd As Long, _
    Optional ByRef pszSubAppName As String = " ", _
    Optional ByRef pszSubIdList As String = " ") _
    As Integer

    Private Sub Form_Load()
    DeactivateWindowTheme VScroll1.hWnd
    End Sub

    Regards
    Krishley

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Apr 2009
    Posts
    93

    Re: A small piece of code to share

    Oops I've posted this in the wrong place. Can any moderators please move it to the VB6 section?

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: A small piece of code to share

    The VB6 forum is for questions, code snippets belong in the CodeBank forums - so I have moved it to the CodeBank-VB6 forum.

    I recommend changing the thread title (click "Edit" in the first post, then "Go Advanced") to something which describes what the code does... perhaps "prevent controls from using styles while using manifest files"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width