Hi Friends,
Question:- In my VB6.0 Form I have used a ComboBox and a ToolBar in which I have provided some buttons such as Add,Modify,Abor t,Delete,Save,P rint,Exit. and also provided shortcuts to these buttons such as Ctrl+A for Add,Ctrl+M for Modify ,Ctrl+B for Abort.Now the problem is when I Load the Form it is in Find Mode and the focus is on the ComboBox .Now to Add new entry I need to go to Add Mode which can be done in two ways .
1. By Clicking on to Add Button using a Mouse .
2. By pressing the Shortcut key(.i.e Ctrl+A)
Now when I do it using a Mouse the ListIndex of the ComboBox remains the same as it was in Find mode.
But when I use Shortcut to go to Add mode the ListIndex of ComboBox changes to the value whose text starts from A .(Similar thing is happening when I press Ctrl+M to enter Modify Mode i.e. the listindex of combobox changes to the value whose text starts from M)This should not happen list index should remain the same as it was in Find Mode.
For further information I havn't written any thing in KeyDown or KeyPress events of the ComboBox. and the code for these shortcuts is written in KeyDown event of Form.
Question:- In my VB6.0 Form I have used a ComboBox and a ToolBar in which I have provided some buttons such as Add,Modify,Abor t,Delete,Save,P rint,Exit. and also provided shortcuts to these buttons such as Ctrl+A for Add,Ctrl+M for Modify ,Ctrl+B for Abort.Now the problem is when I Load the Form it is in Find Mode and the focus is on the ComboBox .Now to Add new entry I need to go to Add Mode which can be done in two ways .
1. By Clicking on to Add Button using a Mouse .
2. By pressing the Shortcut key(.i.e Ctrl+A)
Now when I do it using a Mouse the ListIndex of the ComboBox remains the same as it was in Find mode.
But when I use Shortcut to go to Add mode the ListIndex of ComboBox changes to the value whose text starts from A .(Similar thing is happening when I press Ctrl+M to enter Modify Mode i.e. the listindex of combobox changes to the value whose text starts from M)This should not happen list index should remain the same as it was in Find Mode.
For further information I havn't written any thing in KeyDown or KeyPress events of the ComboBox. and the code for these shortcuts is written in KeyDown event of Form.
Comment