It works perfectly now.
I'm obviously not as good with a calculator than I thought.
> You have Public Const LVM_FIRST = 1750, it's supposed to be 0x1000 which is
> 4096 decimal.
> BL
>>Hi BL,
>>Well I can't make it work. I just wanted to see it work in a C solution,
>>that way I might better convert it to VB.Net.
>>I know you can't help me with my VB solution, but for others, here's my
>>solution so far (it's not working, I mean it's not making the first
>>column gray):
>>Public Class Form1
>> Inherits System.Windows.Forms.Form
>> ' Windows Form Designer generated code ... stuff.
>> Private Declare Auto Function SendMessage Lib "User32" (ByVal hWnd _
>> As IntPtr, ByVal msg As Integer, ByVal wParam As Integer, ByVal _
>> lParam As Integer) As Integer
>> Public Const LVM_FIRST = 1750
>> Public Const LVM_SETSELECTEDCOLUMN = (LVM_FIRST + 140)
>> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As _
>> System.EventArgs) Handles MyBase.Load
>> SendMessage(ListView1.Handle, LVM_SETSELECTEDCOLUMN, 0, 0)
>> End Sub
>>End Class
>>Any ideas?
>>Thanks.
>>M O J O
>>>I can't really help with porting this example to VB, the code is copied
> from
>>>one of my projects and it works fine.
>>>What's exactly the problem?
>>>BL
>>>>Hi BL,
>>>>Thanks for answering my post!
>>>>Hmmm .... I'm trying to translate it to VB.Net without any luck.
>>>>If it's not to much to ask of you, is it possible that you can email me
>>>>a tiny solution with an example (in C.Net)???
>>>>My email addy is mojo"at"newwebsolutions.dk, just replace "at" with an
>>>>Thanks!!!!!!!!!!!!
>>>>M O J O
>>>>>public const uint LVM_FIRST = 0x1000;
>>>>>public const uint LVM_SETSELECTEDCOLUMN = (LVM_FIRST + 140);
>>>>>[DllImport("user32.dll")]
>>>>>public extern static int SendMessage(IntPtr hWnd, uint msg, uint
> wParam,
>>>>>uint lParam);
>>>>>public int SelectedColumn
>>>>>{
>>>>> set
>>>>> {
>>>>> SendMessage(this.Handle, LVM_SETSELECTEDCOLUMN, (uint)col, 0);
>>>>> }
>>>>>}
>>>>>BL
>>>message
>>>>>>Hi,
>>>>>>I've succeeded (almost) in creating a ListView with XP theme by
> messing
>>>>>>with the manifest file.
>>>>>>I have a question ....
>>>>>>How do I get the first column to be gray and all other columns to be
>>>>>>white (like in the explorer)??
>>>>>>Thanks!
>>>>>>M O J O