Results 1 to 9 of 9

Thread: Rendering ListView using Windows Vista Styles

Hybrid View

  1. #1
    Member
    Join Date
    Jan 2013
    Posts
    48

    Re: Rendering ListView using Windows Vista Styles

    Quote Originally Posted by JuggaloBrotha View Post
    This is the CodeBank for .Net, so the code in this thread is assumed to not work with vb6. That being said, I'm sure you could come up with something similar in vb6 if you wanted but it would be up to you to do, or you could forget vb6 considering it's 15 years old.
    i try this code .which is similar to this code but it doesn't work ...


    Private Declare Function SetWindowTheme Lib "uxtheme.dll" (ByVal hwnd As Long, ByVal pszSubAppName As Long, ByVal pszSubIdList As Long) As Long

    Private Sub Form_Load()
    Call SetWindowTheme(ListView1.hwnd, StrPtr("explorer"), 0)
    'Call SetWindowTheme(TreeView1.hwnd, StrPtr("explorer"), 0)
    ListView1.SmallIcons = ilRecordIco
    a = ListView1.ListItems.Add(, , "asd" & vbNewLine & "asd", 1, 1)
    End Sub


  2. #2
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Rendering ListView using Windows Vista Styles

    Quote Originally Posted by adrian1207 View Post
    i try this code .which is similar to this code but it doesn't work ...


    Private Declare Function SetWindowTheme Lib "uxtheme.dll" (ByVal hwnd As Long, ByVal pszSubAppName As Long, ByVal pszSubIdList As Long) As Long

    Private Sub Form_Load()
    Call SetWindowTheme(ListView1.hwnd, StrPtr("explorer"), 0)
    'Call SetWindowTheme(TreeView1.hwnd, StrPtr("explorer"), 0)
    ListView1.SmallIcons = ilRecordIco
    a = ListView1.ListItems.Add(, , "asd" & vbNewLine & "asd", 1, 1)
    End Sub

    You might want to ask in the vb6 forum here, I don't know about other .Net developers here but I haven't used vb6 in over 7 years now and haven't a clue how things are done in it anymore.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

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