Jump to content
Xtreme .Net Talk

viatorg

Members
  • Posts

    3
  • Joined

  • Last visited

Personal Information

  • Occupation
    ITC
  • Visual Studio .NET Version
    VS.NET 2003
  • .NET Preferred Language
    VB.NET

viatorg's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Sorry for the wording above I mean where the Mouse Location is not Cursor!!!!!! thanks Gerry
  2. Thanks for your help, but that doesn't work. While combobox1 list is being displayed and you mouse over and click combobox2. Combobox2 doesn't get focus until you click again. Any other help would be great. Thanks Gerry
  3. Hi all, Trying to make a combobox get focus when you left click on another combobox while the list part is down of the other combobox. It takes two clicks now to give another combobox focus. I was thinking I could make the control have focus where the cursor location is when I Left Mouse Down? When you left mouse down or when the list part retracts from the combo that you are on I could then catch CBN_CLOSEUP, but doesn't seam to send the message all the time? I have done alot of searching and find people telling to look at MSDN, but haven't found that to be very helpful or any samples to see how to use this in VB.NET. Can someone please help Public Class MyComboBox Inherits System.Windows.Forms.ComboBox Private Const CBN_DROPDOWN = 7 Private Const CBN_CLOSEUP = 8 Private Const WM_COMMAND As Long = &H111 Private Const WM_LBUTTONDOWN As Integer = &H201 '513 Public First As Boolean = False Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) If m.Msg = CBN_CLOSEUP Then Console.Write(m.Msg & " ComboBox Retracting List" & vbCrLf) 'Maybe do something here to give control focus where 'the cursor is located. End If MyBase.WndProc(m) End Sub End Class Thanks Gerry
×
×
  • Create New...