>I want to combine a combo with a treeview, so when the arrow is clicked, I am going to drop down the tree instead.So does your ComboBox *ever* act like a ComboBox? Or are you simply using it to get a treeview to display? Are you trying to mimic the behavior of an old application that you're converting? I'm sorry, I just can't see why you want this kind of behavior from a ComboBox ... it is certainly not what most users would expect to see happen when they click on a Combo's down-arrow.
~~Bonnie
>
>
>
>>Kevin,
>>
>>What exactly is it that you want to accomplish? This sounds like very non-standard ComboBox functionality. If you'd tell us the whole story, maybe we'll have some other ideas.
>>
>>~~Bonnie
>>
>>
>>
>>
>>
>>>Thanks. This is exactly what I'm looking for. Next, I would like to raise an event inside IF called ArrowClicked if the message is
>>>WM_LBUTTONDOWN.
>>>
>>>I'm not sure how to code.
>>>
>>>
>>>
>>>>
>>>>public class MyComboBox : ComboBox
>>>> protected override void WndProc(ref System.Windows.Forms.Message m)
>>>> {
>>>> if (m.Msg == 0x201 //WM_LBUTTONDOWN || m.Msg == 0x203) //WM_LBUTTONDBLCLK
>>>> {
>>>> return;
>>>> }
>>>> base.WndProc(ref m);
>>>> }
>>>>}
>>>>
>>>>or
>>>>
>>>>Public Class MyComboBox
>>>> Inherits ComboBox
>>>> Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
>>>> If m.Msg = &H201 OrElse m.Msg = &H203 Then 'WM_LBUTTONDOWN or WM_LBUTTONDBLCLK
>>>> Return
>>>> End If
>>>> MyBase.WndProc(m)
>>>>
>>>> End Sub 'WndProc
>>>>End Class 'MyComboBox
>>>>
>>>>
>>>>