Home All Groups Group Topic Archive Search About

Listview columnheader question

Author
29 Jul 2006 7:25 AM
rb
Hi All,

Is there a property or method to keep the headercolumns from being
resized by the user
for a listview?

I am using Visual Basic in Visual Studio . net 2005

Thank you.

rb

Author
31 Jul 2006 3:19 PM
Claes Bergefall
A bit of WndProc overriding should do the trick:
http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv

   /claes

Show quoteHide quote
"rb" <rblo***@comcast.net> wrote in message
news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
> Hi All,
>
> Is there a property or method to keep the headercolumns from being resized
> by the user
> for a listview?
>
> I am using Visual Basic in Visual Studio . net 2005
>
> Thank you.
>
> rb
>
Author
31 Jul 2006 7:05 PM
JR
I don't get an error when I import this code in 2003 so I think it must work
also in 2003.

I get the message : Me.lstPartijen.WndProc = &H4E


Jan


How do I override the listviews property
Show quoteHide quote
"Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
news:Os7EVRLtGHA.1888@TK2MSFTNGP03.phx.gbl...
>A bit of WndProc overriding should do the trick:
> http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv
>
>   /claes
>
> "rb" <rblo***@comcast.net> wrote in message
> news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
>> Hi All,
>>
>> Is there a property or method to keep the headercolumns from being
>> resized by the user
>> for a listview?
>>
>> I am using Visual Basic in Visual Studio . net 2005
>>
>> Thank you.
>>
>> rb
>>
>
>
Author
31 Jul 2006 7:13 PM
JR
sorry wrong message.
I get the messageon line  Me.lstPartijen.WndProc = &H4E. Is not accesseble
becouse it is protected

Jan



Show quoteHide quote
"JR" <x.x@x.x.> schreef in bericht
news:Wvszg.567070$Eb7.13421621@phobos.telenet-ops.be...
>I don't get an error when I import this code in 2003 so I think it must
>work also in 2003.
>
> I get the message : Me.lstPartijen.WndProc = &H4E
>
>
> Jan
>
>
> How do I override the listviews property
> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
> news:Os7EVRLtGHA.1888@TK2MSFTNGP03.phx.gbl...
>>A bit of WndProc overriding should do the trick:
>> http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv
>>
>>   /claes
>>
>> "rb" <rblo***@comcast.net> wrote in message
>> news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
>>> Hi All,
>>>
>>> Is there a property or method to keep the headercolumns from being
>>> resized by the user
>>> for a listview?
>>>
>>> I am using Visual Basic in Visual Studio . net 2005
>>>
>>> Thank you.
>>>
>>> rb
>>>
>>
>>
>
>
Author
1 Aug 2006 2:55 PM
Claes Bergefall
That line doesn't make any sense. WndProc is a protected method. You can't
assign anything to it.

You need to use an inherited ListView. Did you copy the code in the link I
posted?

   /claes

Show quoteHide quote
"JR" <x.x@x.x.> wrote in message
news:5Dszg.567086$gF.13256755@phobos.telenet-ops.be...
> sorry wrong message.
> I get the messageon line  Me.lstPartijen.WndProc = &H4E. Is not accesseble
> becouse it is protected
>
> Jan
>
>
>
> "JR" <x.x@x.x.> schreef in bericht
> news:Wvszg.567070$Eb7.13421621@phobos.telenet-ops.be...
>>I don't get an error when I import this code in 2003 so I think it must
>>work also in 2003.
>>
>> I get the message : Me.lstPartijen.WndProc = &H4E
>>
>>
>> Jan
>>
>>
>> How do I override the listviews property
>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>> news:Os7EVRLtGHA.1888@TK2MSFTNGP03.phx.gbl...
>>>A bit of WndProc overriding should do the trick:
>>> http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv
>>>
>>>   /claes
>>>
>>> "rb" <rblo***@comcast.net> wrote in message
>>> news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
>>>> Hi All,
>>>>
>>>> Is there a property or method to keep the headercolumns from being
>>>> resized by the user
>>>> for a listview?
>>>>
>>>> I am using Visual Basic in Visual Studio . net 2005
>>>>
>>>> Thank you.
>>>>
>>>> rb
>>>>
>>>
>>>
>>
>>
>
>
Author
1 Aug 2006 7:04 PM
JR
Yes. I copyed into a new class module.

Must I place it somewhere else?

Jan


Show quoteHide quote
"Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
news:OWRgKoXtGHA.1216@TK2MSFTNGP03.phx.gbl...
> That line doesn't make any sense. WndProc is a protected method. You can't
> assign anything to it.
>
> You need to use an inherited ListView. Did you copy the code in the link I
> posted?
>
>   /claes
>
> "JR" <x.x@x.x.> wrote in message
> news:5Dszg.567086$gF.13256755@phobos.telenet-ops.be...
>> sorry wrong message.
>> I get the messageon line  Me.lstPartijen.WndProc = &H4E. Is not
>> accesseble becouse it is protected
>>
>> Jan
>>
>>
>>
>> "JR" <x.x@x.x.> schreef in bericht
>> news:Wvszg.567070$Eb7.13421621@phobos.telenet-ops.be...
>>>I don't get an error when I import this code in 2003 so I think it must
>>>work also in 2003.
>>>
>>> I get the message : Me.lstPartijen.WndProc = &H4E
>>>
>>>
>>> Jan
>>>
>>>
>>> How do I override the listviews property
>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>> news:Os7EVRLtGHA.1888@TK2MSFTNGP03.phx.gbl...
>>>>A bit of WndProc overriding should do the trick:
>>>> http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv
>>>>
>>>>   /claes
>>>>
>>>> "rb" <rblo***@comcast.net> wrote in message
>>>> news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
>>>>> Hi All,
>>>>>
>>>>> Is there a property or method to keep the headercolumns from being
>>>>> resized by the user
>>>>> for a listview?
>>>>>
>>>>> I am using Visual Basic in Visual Studio . net 2005
>>>>>
>>>>> Thank you.
>>>>>
>>>>> rb
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
2 Aug 2006 2:34 PM
Claes Bergefall
No that's fine.

You say you get an error on the line Me.lstPartijen.WndProc = &H4E. Where
does that line come from? Show your code

    /claes


Show quoteHide quote
"JR" <x.x@x.x.> wrote in message
news:0BNzg.570028$1P7.13477914@phobos.telenet-ops.be...
> Yes. I copyed into a new class module.
>
> Must I place it somewhere else?
>
> Jan
>
>
> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
> news:OWRgKoXtGHA.1216@TK2MSFTNGP03.phx.gbl...
>> That line doesn't make any sense. WndProc is a protected method. You
>> can't assign anything to it.
>>
>> You need to use an inherited ListView. Did you copy the code in the link
>> I posted?
>>
>>   /claes
>>
>> "JR" <x.x@x.x.> wrote in message
>> news:5Dszg.567086$gF.13256755@phobos.telenet-ops.be...
>>> sorry wrong message.
>>> I get the messageon line  Me.lstPartijen.WndProc = &H4E. Is not
>>> accesseble becouse it is protected
>>>
>>> Jan
>>>
>>>
>>>
>>> "JR" <x.x@x.x.> schreef in bericht
>>> news:Wvszg.567070$Eb7.13421621@phobos.telenet-ops.be...
>>>>I don't get an error when I import this code in 2003 so I think it must
>>>>work also in 2003.
>>>>
>>>> I get the message : Me.lstPartijen.WndProc = &H4E
>>>>
>>>>
>>>> Jan
>>>>
>>>>
>>>> How do I override the listviews property
>>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>>> news:Os7EVRLtGHA.1888@TK2MSFTNGP03.phx.gbl...
>>>>>A bit of WndProc overriding should do the trick:
>>>>> http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv
>>>>>
>>>>>   /claes
>>>>>
>>>>> "rb" <rblo***@comcast.net> wrote in message
>>>>> news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
>>>>>> Hi All,
>>>>>>
>>>>>> Is there a property or method to keep the headercolumns from being
>>>>>> resized by the user
>>>>>> for a listview?
>>>>>>
>>>>>> I am using Visual Basic in Visual Studio . net 2005
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> rb
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
3 Aug 2006 3:39 AM
JR
that is the line: Me.lstPartijen.WndProc = &H4E

the error is a blue underline in the vb editor

Private Sub FrmRonde_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.lstPartijen.WndProc = &H4E

End Sub

where lstpartijen is mij listview. It has 3 columns. I don't want them to
change the size. the column headers are Nonclickable
How must a do it. Can you give me some extra code, how to set each column
not to change? The class has no underline/error

Jan


Show quoteHide quote
"Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
news:egrVKBktGHA.4160@TK2MSFTNGP06.phx.gbl...
> No that's fine.
>
> You say you get an error on the line Me.lstPartijen.WndProc = &H4E. Where
> does that line come from? Show your code
>
>    /claes
>
>
> "JR" <x.x@x.x.> wrote in message
> news:0BNzg.570028$1P7.13477914@phobos.telenet-ops.be...
>> Yes. I copyed into a new class module.
>>
>> Must I place it somewhere else?
>>
>> Jan
>>
>>
>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>> news:OWRgKoXtGHA.1216@TK2MSFTNGP03.phx.gbl...
>>> That line doesn't make any sense. WndProc is a protected method. You
>>> can't assign anything to it.
>>>
>>> You need to use an inherited ListView. Did you copy the code in the link
>>> I posted?
>>>
>>>   /claes
>>>
>>> "JR" <x.x@x.x.> wrote in message
>>> news:5Dszg.567086$gF.13256755@phobos.telenet-ops.be...
>>>> sorry wrong message.
>>>> I get the messageon line  Me.lstPartijen.WndProc = &H4E. Is not
>>>> accesseble becouse it is protected
>>>>
>>>> Jan
>>>>
>>>>
>>>>
>>>> "JR" <x.x@x.x.> schreef in bericht
>>>> news:Wvszg.567070$Eb7.13421621@phobos.telenet-ops.be...
>>>>>I don't get an error when I import this code in 2003 so I think it must
>>>>>work also in 2003.
>>>>>
>>>>> I get the message : Me.lstPartijen.WndProc = &H4E
>>>>>
>>>>>
>>>>> Jan
>>>>>
>>>>>
>>>>> How do I override the listviews property
>>>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>>>> news:Os7EVRLtGHA.1888@TK2MSFTNGP03.phx.gbl...
>>>>>>A bit of WndProc overriding should do the trick:
>>>>>> http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv
>>>>>>
>>>>>>   /claes
>>>>>>
>>>>>> "rb" <rblo***@comcast.net> wrote in message
>>>>>> news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
>>>>>>> Hi All,
>>>>>>>
>>>>>>> Is there a property or method to keep the headercolumns from being
>>>>>>> resized by the user
>>>>>>> for a listview?
>>>>>>>
>>>>>>> I am using Visual Basic in Visual Studio . net 2005
>>>>>>>
>>>>>>> Thank you.
>>>>>>>
>>>>>>> rb
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
3 Aug 2006 2:03 PM
Claes Bergefall
Remove that line. Not sure why you put it in there. The code in the link I
sent you has a complete class with all the stuff needed. Change your
lstPartijen to be an instance of that class (i.e ListViewEx).

   /claes

Show quoteHide quote
"JR" <x.x@x.x.> wrote in message
news:KdeAg.220$4M4.11276@phobos.telenet-ops.be...
> that is the line: Me.lstPartijen.WndProc = &H4E
>
> the error is a blue underline in the vb editor
>
> Private Sub FrmRonde_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> Me.lstPartijen.WndProc = &H4E
>
> End Sub
>
> where lstpartijen is mij listview. It has 3 columns. I don't want them to
> change the size. the column headers are Nonclickable
> How must a do it. Can you give me some extra code, how to set each column
> not to change? The class has no underline/error
>
> Jan
>
>
> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
> news:egrVKBktGHA.4160@TK2MSFTNGP06.phx.gbl...
>> No that's fine.
>>
>> You say you get an error on the line Me.lstPartijen.WndProc = &H4E. Where
>> does that line come from? Show your code
>>
>>    /claes
>>
>>
>> "JR" <x.x@x.x.> wrote in message
>> news:0BNzg.570028$1P7.13477914@phobos.telenet-ops.be...
>>> Yes. I copyed into a new class module.
>>>
>>> Must I place it somewhere else?
>>>
>>> Jan
>>>
>>>
>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>> news:OWRgKoXtGHA.1216@TK2MSFTNGP03.phx.gbl...
>>>> That line doesn't make any sense. WndProc is a protected method. You
>>>> can't assign anything to it.
>>>>
>>>> You need to use an inherited ListView. Did you copy the code in the
>>>> link I posted?
>>>>
>>>>   /claes
>>>>
>>>> "JR" <x.x@x.x.> wrote in message
>>>> news:5Dszg.567086$gF.13256755@phobos.telenet-ops.be...
>>>>> sorry wrong message.
>>>>> I get the messageon line  Me.lstPartijen.WndProc = &H4E. Is not
>>>>> accesseble becouse it is protected
>>>>>
>>>>> Jan
>>>>>
>>>>>
>>>>>
>>>>> "JR" <x.x@x.x.> schreef in bericht
>>>>> news:Wvszg.567070$Eb7.13421621@phobos.telenet-ops.be...
>>>>>>I don't get an error when I import this code in 2003 so I think it
>>>>>>must work also in 2003.
>>>>>>
>>>>>> I get the message : Me.lstPartijen.WndProc = &H4E
>>>>>>
>>>>>>
>>>>>> Jan
>>>>>>
>>>>>>
>>>>>> How do I override the listviews property
>>>>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>>>>> news:Os7EVRLtGHA.1888@TK2MSFTNGP03.phx.gbl...
>>>>>>>A bit of WndProc overriding should do the trick:
>>>>>>> http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv
>>>>>>>
>>>>>>>   /claes
>>>>>>>
>>>>>>> "rb" <rblo***@comcast.net> wrote in message
>>>>>>> news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
>>>>>>>> Hi All,
>>>>>>>>
>>>>>>>> Is there a property or method to keep the headercolumns from being
>>>>>>>> resized by the user
>>>>>>>> for a listview?
>>>>>>>>
>>>>>>>> I am using Visual Basic in Visual Studio . net 2005
>>>>>>>>
>>>>>>>> Thank you.
>>>>>>>>
>>>>>>>> rb
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
3 Aug 2006 4:40 PM
JR
Thanks,

Now I think that I understand.
Is this the same as a usercontrol?

Jan


Show quoteHide quote
"Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
news:uhilvUwtGHA.1808@TK2MSFTNGP06.phx.gbl...
> Remove that line. Not sure why you put it in there. The code in the link I
> sent you has a complete class with all the stuff needed. Change your
> lstPartijen to be an instance of that class (i.e ListViewEx).
>
>   /claes
>
> "JR" <x.x@x.x.> wrote in message
> news:KdeAg.220$4M4.11276@phobos.telenet-ops.be...
>> that is the line: Me.lstPartijen.WndProc = &H4E
>>
>> the error is a blue underline in the vb editor
>>
>> Private Sub FrmRonde_Load(ByVal sender As System.Object, ByVal e As
>> System.EventArgs) Handles MyBase.Load
>> Me.lstPartijen.WndProc = &H4E
>>
>> End Sub
>>
>> where lstpartijen is mij listview. It has 3 columns. I don't want them to
>> change the size. the column headers are Nonclickable
>> How must a do it. Can you give me some extra code, how to set each column
>> not to change? The class has no underline/error
>>
>> Jan
>>
>>
>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>> news:egrVKBktGHA.4160@TK2MSFTNGP06.phx.gbl...
>>> No that's fine.
>>>
>>> You say you get an error on the line Me.lstPartijen.WndProc = &H4E.
>>> Where does that line come from? Show your code
>>>
>>>    /claes
>>>
>>>
>>> "JR" <x.x@x.x.> wrote in message
>>> news:0BNzg.570028$1P7.13477914@phobos.telenet-ops.be...
>>>> Yes. I copyed into a new class module.
>>>>
>>>> Must I place it somewhere else?
>>>>
>>>> Jan
>>>>
>>>>
>>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>>> news:OWRgKoXtGHA.1216@TK2MSFTNGP03.phx.gbl...
>>>>> That line doesn't make any sense. WndProc is a protected method. You
>>>>> can't assign anything to it.
>>>>>
>>>>> You need to use an inherited ListView. Did you copy the code in the
>>>>> link I posted?
>>>>>
>>>>>   /claes
>>>>>
>>>>> "JR" <x.x@x.x.> wrote in message
>>>>> news:5Dszg.567086$gF.13256755@phobos.telenet-ops.be...
>>>>>> sorry wrong message.
>>>>>> I get the messageon line  Me.lstPartijen.WndProc = &H4E. Is not
>>>>>> accesseble becouse it is protected
>>>>>>
>>>>>> Jan
>>>>>>
>>>>>>
>>>>>>
>>>>>> "JR" <x.x@x.x.> schreef in bericht
>>>>>> news:Wvszg.567070$Eb7.13421621@phobos.telenet-ops.be...
>>>>>>>I don't get an error when I import this code in 2003 so I think it
>>>>>>>must work also in 2003.
>>>>>>>
>>>>>>> I get the message : Me.lstPartijen.WndProc = &H4E
>>>>>>>
>>>>>>>
>>>>>>> Jan
>>>>>>>
>>>>>>>
>>>>>>> How do I override the listviews property
>>>>>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>>>>>> news:Os7EVRLtGHA.1888@TK2MSFTNGP03.phx.gbl...
>>>>>>>>A bit of WndProc overriding should do the trick:
>>>>>>>> http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv
>>>>>>>>
>>>>>>>>   /claes
>>>>>>>>
>>>>>>>> "rb" <rblo***@comcast.net> wrote in message
>>>>>>>> news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
>>>>>>>>> Hi All,
>>>>>>>>>
>>>>>>>>> Is there a property or method to keep the headercolumns from being
>>>>>>>>> resized by the user
>>>>>>>>> for a listview?
>>>>>>>>>
>>>>>>>>> I am using Visual Basic in Visual Studio . net 2005
>>>>>>>>>
>>>>>>>>> Thank you.
>>>>>>>>>
>>>>>>>>> rb
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
4 Aug 2006 2:10 PM
Claes Bergefall
Umm, yeah, sort of (but it inherits ListView instead of UserControl)

    /claes

Show quoteHide quote
"JR" <x.x@x.x.> wrote in message
news:IFpAg.1196$RM4.61501@phobos.telenet-ops.be...
> Thanks,
>
> Now I think that I understand.
> Is this the same as a usercontrol?
>
> Jan
>
>
> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
> news:uhilvUwtGHA.1808@TK2MSFTNGP06.phx.gbl...
>> Remove that line. Not sure why you put it in there. The code in the link
>> I sent you has a complete class with all the stuff needed. Change your
>> lstPartijen to be an instance of that class (i.e ListViewEx).
>>
>>   /claes
>>
>> "JR" <x.x@x.x.> wrote in message
>> news:KdeAg.220$4M4.11276@phobos.telenet-ops.be...
>>> that is the line: Me.lstPartijen.WndProc = &H4E
>>>
>>> the error is a blue underline in the vb editor
>>>
>>> Private Sub FrmRonde_Load(ByVal sender As System.Object, ByVal e As
>>> System.EventArgs) Handles MyBase.Load
>>> Me.lstPartijen.WndProc = &H4E
>>>
>>> End Sub
>>>
>>> where lstpartijen is mij listview. It has 3 columns. I don't want them
>>> to change the size. the column headers are Nonclickable
>>> How must a do it. Can you give me some extra code, how to set each
>>> column not to change? The class has no underline/error
>>>
>>> Jan
>>>
>>>
>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>> news:egrVKBktGHA.4160@TK2MSFTNGP06.phx.gbl...
>>>> No that's fine.
>>>>
>>>> You say you get an error on the line Me.lstPartijen.WndProc = &H4E.
>>>> Where does that line come from? Show your code
>>>>
>>>>    /claes
>>>>
>>>>
>>>> "JR" <x.x@x.x.> wrote in message
>>>> news:0BNzg.570028$1P7.13477914@phobos.telenet-ops.be...
>>>>> Yes. I copyed into a new class module.
>>>>>
>>>>> Must I place it somewhere else?
>>>>>
>>>>> Jan
>>>>>
>>>>>
>>>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>>>> news:OWRgKoXtGHA.1216@TK2MSFTNGP03.phx.gbl...
>>>>>> That line doesn't make any sense. WndProc is a protected method. You
>>>>>> can't assign anything to it.
>>>>>>
>>>>>> You need to use an inherited ListView. Did you copy the code in the
>>>>>> link I posted?
>>>>>>
>>>>>>   /claes
>>>>>>
>>>>>> "JR" <x.x@x.x.> wrote in message
>>>>>> news:5Dszg.567086$gF.13256755@phobos.telenet-ops.be...
>>>>>>> sorry wrong message.
>>>>>>> I get the messageon line  Me.lstPartijen.WndProc = &H4E. Is not
>>>>>>> accesseble becouse it is protected
>>>>>>>
>>>>>>> Jan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> "JR" <x.x@x.x.> schreef in bericht
>>>>>>> news:Wvszg.567070$Eb7.13421621@phobos.telenet-ops.be...
>>>>>>>>I don't get an error when I import this code in 2003 so I think it
>>>>>>>>must work also in 2003.
>>>>>>>>
>>>>>>>> I get the message : Me.lstPartijen.WndProc = &H4E
>>>>>>>>
>>>>>>>>
>>>>>>>> Jan
>>>>>>>>
>>>>>>>>
>>>>>>>> How do I override the listviews property
>>>>>>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>>>>>>> news:Os7EVRLtGHA.1888@TK2MSFTNGP03.phx.gbl...
>>>>>>>>>A bit of WndProc overriding should do the trick:
>>>>>>>>> http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv
>>>>>>>>>
>>>>>>>>>   /claes
>>>>>>>>>
>>>>>>>>> "rb" <rblo***@comcast.net> wrote in message
>>>>>>>>> news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
>>>>>>>>>> Hi All,
>>>>>>>>>>
>>>>>>>>>> Is there a property or method to keep the headercolumns from
>>>>>>>>>> being resized by the user
>>>>>>>>>> for a listview?
>>>>>>>>>>
>>>>>>>>>> I am using Visual Basic in Visual Studio . net 2005
>>>>>>>>>>
>>>>>>>>>> Thank you.
>>>>>>>>>>
>>>>>>>>>> rb
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
4 Aug 2006 3:15 PM
JR
thanks


Show quoteHide quote
"Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
news:%23l5NH98tGHA.1504@TK2MSFTNGP03.phx.gbl...
> Umm, yeah, sort of (but it inherits ListView instead of UserControl)
>
>    /claes
>
> "JR" <x.x@x.x.> wrote in message
> news:IFpAg.1196$RM4.61501@phobos.telenet-ops.be...
>> Thanks,
>>
>> Now I think that I understand.
>> Is this the same as a usercontrol?
>>
>> Jan
>>
>>
>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>> news:uhilvUwtGHA.1808@TK2MSFTNGP06.phx.gbl...
>>> Remove that line. Not sure why you put it in there. The code in the link
>>> I sent you has a complete class with all the stuff needed. Change your
>>> lstPartijen to be an instance of that class (i.e ListViewEx).
>>>
>>>   /claes
>>>
>>> "JR" <x.x@x.x.> wrote in message
>>> news:KdeAg.220$4M4.11276@phobos.telenet-ops.be...
>>>> that is the line: Me.lstPartijen.WndProc = &H4E
>>>>
>>>> the error is a blue underline in the vb editor
>>>>
>>>> Private Sub FrmRonde_Load(ByVal sender As System.Object, ByVal e As
>>>> System.EventArgs) Handles MyBase.Load
>>>> Me.lstPartijen.WndProc = &H4E
>>>>
>>>> End Sub
>>>>
>>>> where lstpartijen is mij listview. It has 3 columns. I don't want them
>>>> to change the size. the column headers are Nonclickable
>>>> How must a do it. Can you give me some extra code, how to set each
>>>> column not to change? The class has no underline/error
>>>>
>>>> Jan
>>>>
>>>>
>>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>>> news:egrVKBktGHA.4160@TK2MSFTNGP06.phx.gbl...
>>>>> No that's fine.
>>>>>
>>>>> You say you get an error on the line Me.lstPartijen.WndProc = &H4E.
>>>>> Where does that line come from? Show your code
>>>>>
>>>>>    /claes
>>>>>
>>>>>
>>>>> "JR" <x.x@x.x.> wrote in message
>>>>> news:0BNzg.570028$1P7.13477914@phobos.telenet-ops.be...
>>>>>> Yes. I copyed into a new class module.
>>>>>>
>>>>>> Must I place it somewhere else?
>>>>>>
>>>>>> Jan
>>>>>>
>>>>>>
>>>>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>>>>> news:OWRgKoXtGHA.1216@TK2MSFTNGP03.phx.gbl...
>>>>>>> That line doesn't make any sense. WndProc is a protected method. You
>>>>>>> can't assign anything to it.
>>>>>>>
>>>>>>> You need to use an inherited ListView. Did you copy the code in the
>>>>>>> link I posted?
>>>>>>>
>>>>>>>   /claes
>>>>>>>
>>>>>>> "JR" <x.x@x.x.> wrote in message
>>>>>>> news:5Dszg.567086$gF.13256755@phobos.telenet-ops.be...
>>>>>>>> sorry wrong message.
>>>>>>>> I get the messageon line  Me.lstPartijen.WndProc = &H4E. Is not
>>>>>>>> accesseble becouse it is protected
>>>>>>>>
>>>>>>>> Jan
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> "JR" <x.x@x.x.> schreef in bericht
>>>>>>>> news:Wvszg.567070$Eb7.13421621@phobos.telenet-ops.be...
>>>>>>>>>I don't get an error when I import this code in 2003 so I think it
>>>>>>>>>must work also in 2003.
>>>>>>>>>
>>>>>>>>> I get the message : Me.lstPartijen.WndProc = &H4E
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Jan
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> How do I override the listviews property
>>>>>>>>> "Claes Bergefall" <louplou@nospam.nospam> schreef in bericht
>>>>>>>>> news:Os7EVRLtGHA.1888@TK2MSFTNGP03.phx.gbl...
>>>>>>>>>>A bit of WndProc overriding should do the trick:
>>>>>>>>>> http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/msg/69dd7cedfbdea8e5?hl=sv
>>>>>>>>>>
>>>>>>>>>>   /claes
>>>>>>>>>>
>>>>>>>>>> "rb" <rblo***@comcast.net> wrote in message
>>>>>>>>>> news:B9WdnVx0ROr3kFbZnZ2dnUVZ_qqdnZ2d@comcast.com...
>>>>>>>>>>> Hi All,
>>>>>>>>>>>
>>>>>>>>>>> Is there a property or method to keep the headercolumns from
>>>>>>>>>>> being resized by the user
>>>>>>>>>>> for a listview?
>>>>>>>>>>>
>>>>>>>>>>> I am using Visual Basic in Visual Studio . net 2005
>>>>>>>>>>>
>>>>>>>>>>> Thank you.
>>>>>>>>>>>
>>>>>>>>>>> rb
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>