G
Guest
Hi All
I have problem with converting VB.NET code to C#. This code looks like this
Declare Function SendMessage Lib "Coredll" Alias "SendMessageW" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Intege
Declare Function GetFocus Lib "Coredll" () As Intege
Const LVM_SETCOLUMNWIDTH = &H101
Public Shared Sub Autosize_ListView(ByVal lv As ListView
lv.Focus(
Dim col2adjust As Intege
For col2adjust = 0 To lv.Columns.Count -
Call SendMessage(GetFocus(), LVM_SETCOLUMNWIDTH, col2adjust, -2
Nex
End Su
I have problem with calling SendMessage function (cannot convert from int to System.IntPtr). Can enyone help me with translation to c#
Thanks for your help
Very kind regards
Krzysztof Kazmierczak
I have problem with converting VB.NET code to C#. This code looks like this
Declare Function SendMessage Lib "Coredll" Alias "SendMessageW" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Intege
Declare Function GetFocus Lib "Coredll" () As Intege
Const LVM_SETCOLUMNWIDTH = &H101
Public Shared Sub Autosize_ListView(ByVal lv As ListView
lv.Focus(
Dim col2adjust As Intege
For col2adjust = 0 To lv.Columns.Count -
Call SendMessage(GetFocus(), LVM_SETCOLUMNWIDTH, col2adjust, -2
Nex
End Su
I have problem with calling SendMessage function (cannot convert from int to System.IntPtr). Can enyone help me with translation to c#
Thanks for your help
Very kind regards
Krzysztof Kazmierczak