• 5,786,718
    REGISTERED
  • 38,897
    ONLINE NOW

Developer API Tricks in VB.Net 2008

Difficulty:
3
Developer API Tricks in VB.Net 2008

If you are a developer, you will agree that is not easy to find good tricks. This time, XDA member lyriquidperfection presents the results of his search on using p/invoke, a series of codes Helper Class to apply the WM6.5 visual styles.
As language and terms are not easy to digest and the fact that I am not an expert on the subject, I rather quote the original poster to explain better what is this all about.

Originally posted by lyriquidperfection
Developer API Tricks in VB.Net 2008

Here are a few useful tricks using p/invoke that some developers may find usefull and some were hard to find on the net so I created my own Wrappers with a little research.

The following code is a Helper Class to apply the WM6.5 visual styles to some controls using .net framework. This Wrapper lets you apply the visual style to the Tab Control, Apply Background Image to ListView, Enable Double Buffering for ListView, Show Grid Lines in ListView and Enable Visual Style for ListView. To call these functions you just simply put the control in the brackets you wish to apply the visual style to. For Example: EnableListViewStyle(lvMyListview)

Code:
Public Class VisualStyleHelper

Public Const GWL_STYLE As Integer = -16
Public Const GW_CHILD As Int32 = 5
Public Const LVS_EX_THEME As Integer = &H2000000
Public Const LVM_SETEXTENDEDLISTVIEWSTYLE As Integer = &H1000 + 54
Public Const LVM_GETEXTENDEDLISTVIEWSTYLE As Integer = &H1000 + 55
Public Const LVS_EX_GRIDLINES As Integer = &H1

You can find more information in theĀ original thread.

_________
Want something on the XDA Portal? Send us a tip! -- Join us for xda:devcon 2014!
Advertisment
Advertisement

XDA TV: Most Recent Video

Buy/Sell on Swappa

  • Nexus 5 (Unlocked) buy | sell
  • Galaxy Note 3 (T-Mobile) buy | sell
  • HTC One M7 (Verizon) buy | sell
  • Galaxy S 5 (Unlocked) buy | sell
  • Nexus 7 2013 buy | sell
  • Swappa is the official marketplace of XDA