If I click invoke all toolstrip menu then only these four forms display(my forms: car Retrieval, keylocation, RetrievalAlert, Car Delivery confirmation). I grouped together these four forms in one click.
Code is like this:
private void InvloveAllToolStripMenuItem_Click(System.Object sender, System.EventArgs e)
{
this.KeyUp += HandleKeyPress; frmKeyAssignBoard frm = new frmKeyAssignBoard();
frm.Location = new Point(625, 0); frm.MdiParent = this; frm.KeyUp += HandleKeyPress; frm.Show(); FrmrecievedDelivaryRequest frm1 = new FrmrecievedDelivaryRequest();
frm1.Location = new Point(625, 225);
frm1.MdiParent = this;
frm.KeyUp += HandleKeyPress;
frm1.Show();
FrmDelivary frm2 = new FrmDelivary();
frm2.Location = new Point(965, 0);
frm2.MdiParent = this;
frm.KeyUp += HandleKeyPress;
frm2.Show();
frmCarCall frm3 = new frmCarCall();
frm3.Location = new Point(0, 0);
frm3.MdiParent = this;
frm.KeyUp += HandleKeyPress;
frm3.Show();
}
Actually these forms are child forms of my master forms. I want to use function keys in these form.
I mean if I click 'k' that should locate cursor to keylocation form - carid textbox, and if I click 'D' that should locate cursor to retreval alert - driver id gridview row, if I click 'R',then it should locate cursor to car retrieval - car id textbox. How can I do this?
i try to write your code in my master key down event like this: Private Sub frmMaster_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown If e.KeyCode = Keys.A Then Dim form As New FrmDelivary form.Show() form.txtTicket.Focus() Cursor.Position = form.txtTicket.Location End If End Sub if i click A nothing happening