Microsoft
Software
Hardware
Network
Question : How to collaspe a menustrip in vb.net?
Hi
I have a menustrip with some further options in vs 2008 express. I have changed one of the menu options into a text box format. So When I click on menu name "Options" and then click on my "Change Value" the next drop down is in the form of a text box so I can key in a value. When I key in a value and Press the Enter key I want the drop down dispaly staus of the menu to collaspe and just to be looking at the main form. However after some messing around I cannot find a solution to this without hvaing to click on the form with the mouse. I hope I explained it well
Here is my code.
Private Sub DocketNoChangeToolStripMen
uItem_KeyP
ress(ByVal
sender As Object, ByVal e As System.Windows.Forms.KeyPr
essEventAr
gs) Handles DocketNoChangeToolStripMen
uItem.KeyP
ress
Dim KeyPressed As Integer = AscW(e.KeyChar)
Dim SetDocketNo As New clsDocketNo
Try
' only Allow digits and contol keys to be pressed
If Char.IsNumber(e.KeyChar) = True Or Char.IsControl(e.KeyChar) = True Then
e.Handled = False
Else
e.Handled = True
End If
'Save New Docket Number after the ENTER key is pressed
If KeyPressed = 13 Then
SetDocketNo.SetDocketNo(Do
cketNoChan
geToolStri
pMenuItem.
Text)
txtDocketNo.Text = DocketNoChangeToolStripMen
uItem.Text
DocketNoChangeToolStripMen
uItem.Text
= Nothing
'I ASSUME I NEED TO COLLASPE MENU HERE
End If
Catch ex As Exception
End Try
End Sub
Answer : How to collaspe a menustrip in vb.net?
TopParentMenuName.DropDown
.Close()
Random Solutions
Print 'Incomplete' for crystal report subtotal if any detail records are zero
Exchange 2003 to Exchange 2007
SCCM Query to Report
Creating a list item from sharepoint custom workflow with Multiple values from another list
Modifying - Updating Registry via scripts or batch file
delete one line in ms word
How do I transition mailboxes from exchange 2003 to exchange 2010 when both exchange servers are in different domains without causing an outage
Cisco ccent gns Vlan
Including fields in Filemaker email
How to run an executable packaged inside a JAR?