Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 01:17:12 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Detect button pressed
Pages: 1   Go Down
Print
Author Topic: Detect button pressed  (Read 1228 times)
0 Members and 2 Guests are viewing this topic.
freeze-tec
Active Member

Offline Offline

Posts: 3


View Profile
« on: April 09, 2008, 08:55:54 AM »

Hi to all of you,

Is it possible with VB to detect whether or not a button is pressed?
I am writing a routine for manual parting on my lathe

What I want it to do is the following:

When I press the arrow up key the parting move starts (at feedrate in the -X direction)
This should go on as long as I keep the arrow up key pressed

When I release the arrow up key, the parting move should stop, and backoff a little bit (to clear the workpiece)
How can I detect if the arrow up key is depressed in VB?
(I cannot find anything on this topic on the forum)

Any help is appreciated

Jan
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 1,707


Briceville, TN, USA


View Profile WWW
« Reply #1 on: April 09, 2008, 04:58:15 PM »

In VB (in Mach) you can do it indirectly by watching what the button is controlling and when that LED or DRO changes state or hits some value, you can then take other action.

For what you want to do directly, you will have to do it in FLASH. In Flash you can look at button states and take actions depending on that state.

scott
Logged

Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!