473,473 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Set control to a button in control the tool bar

274 Contributor
hi everyone,
I want to make a quick access to the first button in the tool bar.To start a transation on press Enter Key from the Enter pad. or you can assume that I want to set a default selection on one menu option.I can't program fro keypress or keydown evern for the mdiform.What I should do ?
thanks in advance
farhana
Sep 27 '07 #1
11 1403
creative1
274 Contributor
Hi Experts
Should I assume that this is something that we can't do??? My co-op employer wants me do that. He insists to start sales transection by pressing Enter from the keyboard. I am really screwed up with this. Can't find anything about it. Please help me resolve this problem.
regards
farhana
Sep 28 '07 #2
hariharanmca
1,977 Top Contributor
Be clear with your problem. explain your problem in detail and version of front-end.
Sep 28 '07 #3
creative1
274 Contributor
I am a student developer.In fact I have desinged a PoP application using VB6. I created an interactive enviornment for quick access to all controls and menu options. This application will be used in a very fast paced syatem. Where people don't have time to use mouse to switch between menu control option and can't click on tool bar buttons too.
I am asked to design an appliation that will work on keystrokes. I have programmed Enterpad for company. this enterpad has many shortcut keys for quick access to products, menu options, and reprts. Such as when user hit Purchase button it displays Purchase Window and when user press Account Statement button from enter pad it will print a report.

Now the problem is , old syatem was developed in Foxpro, and Purchase process started on pressingEnter Key from enterpad. But I programmed a new key on Enterpad that will start Purchase module. But old users insist to use Enter key instead Purchase(that is Ctrl-Q shortcut key in the menu). for operator's convience I added a toolbar where I kept a few picture boxes with some shortcut keys entered with them so that user can remember these keys such as Ctrl-Q to start a transection, Ctrl-X to Exit etc.

Now I am lookin gfor ways how I can start purchase transection on Enter keys . I can logically think if I set focus on Purchase button in the tool bar. or you can say how I can set default focus on one control in menu to start it.

I hope now you understand what I want to do. Although small issue but .... I am not able to do that.
Is this somethng that we can do using Vb6?
regards
farhana
Sep 28 '07 #4
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Create Menus, and Assign Short-Cut Keys for those Menus.
Menu Short-Cut keys will work for MDI Form..
may be in the menu_Click event, u can call ToolBarClick event with
passing Appropriate button.

I think this is an easy way out..


REgards
Veena
Sep 28 '07 #5
hariharanmca
1,977 Top Contributor
I am a student developer.In fact I have desinged a PoP application using VB6. I created .....................
I think the below code helps you if you are using vb 6

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  2.     Select Case KeyCode
  3.         Case vbKeyReturn:
  4.             Select Case KeyCode
  5.                 Case 1:
  6.                     'Key Shift+Enter : Your purchase order code here
  7.                 Case 2:
  8.                     'Key Ctrl+Enter : Your purchase order code here
  9.                 Case 3:
  10.                     'Key Ctrl+Shift+Enter : Your purchase order code here
  11.                 Case 4:
  12.                     'Key Alt+Enter : Your purchase order code here
  13.                 Case 5:
  14.                     'Key Alt+Shift+Enter : Your purchase order code here
  15.                 Case 6:
  16.                     'Key Alt+Ctrl+Enter : Your purchase order code here
  17.                 Case 7:
  18.                     'Key Ctrl+shift+Alt+Enter : Your purchase order code here
  19.             End Select
  20.     End Select
  21. End Sub
  22.  
  23. Private Sub Form_Load()
  24.     Me.KeyPreview = True
  25. End Sub
  26.  
Now the problem is , old syatem was developed in Foxpro, ..................
Should be sure keypad is VB or Foxpro

Now I am lookin gfor ways how I can start purchase .........
Do not call purchace order method by simply hit enter. (Because that is usualy presed by end user.

I hope now you understand what I want to do. ......
Till not clear just Guessing.
Sep 28 '07 #6
hariharanmca
1,977 Top Contributor
Hi,
Create Menus, and Assign...........
But there is no short key for return!
Sep 28 '07 #7
QVeen72
1,445 Recognized Expert Top Contributor
Hi Hari,

He has his ToolBar on MDI Form.. and MDI is his main startup form,
Key Events does not work for MDI...


Regards
Veena
Sep 28 '07 #8
hariharanmca
1,977 Top Contributor
Hi Hari,
He has his ToolBar on MDI Form..
Okay, i didn't read it properly (she should type MDI in caps)...
Sep 28 '07 #9
QVeen72
1,445 Recognized Expert Top Contributor
Hi Creative,

There is one more way,

Place a PictureBox on the MDI, Fill the MDI with whole of Picture Box, and Make TabIndex of PictureBox =0.
and write the Code what Hari Suggested for PictureBox1_KeyUp event..
It shud work OK..


Regards
Veena
Sep 28 '07 #10
creative1
274 Contributor
Thanks Veena n Hari
I'll try this out and tell what I will come out with. By the way I m SHE.
regards
Farhana
Sep 28 '07 #11
creative1
274 Contributor
Hi Veena and Hari
Finally I got what I wanted to do, with your help thanks here is what I did
1.. used a picture box maximized it...(I was going to used one theme picture as background picture.)
2.. then I set tab for picture to 0
3... called mnuPurchasefrmQuickCash_Click event

now I can startpurchase transection on Enter Key. Very easy but Mind-blowing you two
thanks
Farhana
Sep 28 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: amita | last post by:
hi, 1.I want to show a image file of type '.tif' in the browser window; for that I'm writting as ASP code page. 2.This '.tif' type image can be shown better with 'Kodak Image Control'. 3.To...
6
by: grist2mill | last post by:
I want to create a standard tool bar that appears on all pages that is a control. The toolbar has a button 'New'. What I wolud like when the user clicks on 'New' depends on the page they are on. I...
7
by: John Smith | last post by:
As it is now apparently illegal in the UK to produce a website which is inaccessible to the disabled, which includes the JavaScript-disabled and images-disabled, am I right in thinking that the...
5
by: c676228 | last post by:
Hi, I guess I am confused. In aspx script, I mean (you won't use Codebehind="enrollinfo.aspx.vb", but mix code with html and code together) You can access user control's property directly. Since I...
2
by: Mark A. Sam | last post by:
Hello, I want to use a literal control to provide information about people listed on a webpage, where the control is on the same line as the person it addresses, so that I have a button, the...
2
by: Paolo | last post by:
Hi to all, I have an error that drove me crazy. Try the following page that should only allow to upload a file: <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">...
3
by: goot | last post by:
I'm trying to use the login control and have it use the membership provider framework to authenticate users and am having a problem (which i'm sure will turn out to be a stupid mistake on my...
4
by: Duncan Dimech | last post by:
Dear All I am writing a tool which requires to have controls added to it dynamically. To make the task more complex, the addition of the control cannot happen anywhere but it has to be instead of...
9
by: timnels | last post by:
I have an issue where I have a user control that is launched into a floating form. At some point later, I allow the user to "unfloat" the user control by reparenting it on a split container in...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.