473,513 Members | 2,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

c# key sequence

Hi,

I'm trying to simulate a break sequence to a serial device ctrl +
pause/break
I tried it with limited succcess using this

SendKeys.SendWait("^{BREAK}")

I'm putting this code under a button click event,I think it may have
something to do with a keyboard hook but i'm not sure how to go about
it.

Any help would be appreciated.

Thanks

James

Feb 4 '06 #1
4 2072
James,

What device are you trying to send to? Why not just open the port to
the serial device (you can use the classes in the System.IO.Ports namespace
to connect to it) and then send the appropriate information through that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<jp******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi,

I'm trying to simulate a break sequence to a serial device ctrl +
pause/break
I tried it with limited succcess using this

SendKeys.SendWait("^{BREAK}")

I'm putting this code under a button click event,I think it may have
something to do with a keyboard hook but i'm not sure how to go about
it.

Any help would be appreciated.

Thanks

James

Feb 5 '06 #2
Hi Nicholas,

I'm communicating with a router over the console port sending a break
to the router is part of password recovery

Ctrl + pause/break sends a break to the device.

Im automating this process so I want the same key sequence to work
under a button click event for example.

I have no problem sending information to the device over the com port
I'm trying to simulate the ctrl + pause/break key sequence.

Thanks

James

Feb 5 '06 #3
<jp******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi Nicholas,

I'm communicating with a router over the console port sending a break
to the router is part of password recovery

Ctrl + pause/break sends a break to the device.

Im automating this process so I want the same key sequence to work
under a button click event for example.

I have no problem sending information to the device over the com port
I'm trying to simulate the ctrl + pause/break key sequence.


You might want to try the native SendInput function instead.
Feb 5 '06 #4
thanks I'll look into that from a little reading it looks similar to a
keyboard hook so maybe thats the road I have to take

cheers

James

Feb 6 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2577
by: Anthony Best | last post by:
I'm working on an idea that uses sequences. I'm going to create a table like this: id serial, sequence int, keyword varchar(32), text text for every keyword there will be a uniq sequence...
5
3235
by: Eric E | last post by:
Hi, I have a question about sequences. I need a field to have values with no holes in the sequence. However, the values do not need to be in order. My users will draw a number or numbers from...
1
2182
by: Marek Lewczuk | last post by:
Hello, I would like to ask if my problem with sequence is a proper behavior or this is a bug (probably not)... I have a table: CREATE TABLE "testtable" ( "serialfield" SERIAL,...
3
4677
by: kevin | last post by:
Is that even possible? I am creating a web service in .NET to expose some already created .NET programs to other groups. One group is writing the client in PERL, and thus wishes the wsdl schema...
8
3746
by: regis | last post by:
Greetings, about scanf matching nonempty sequences using the "%" matches a nonempty sequence of anything except '-' "%" matches a nonempty sequence of anything except ']" matches a nonempty...
3
1920
by: Daniel Wilson | last post by:
I am trying to read data from MS SQL Server and turn it into an XML message to send to a remote server, as follows. sfSchemaFileDiag.FilterIndex = 2 If sfSchemaFileDiag.ShowDialog =...
14
4781
by: pat270881 | last post by:
hello, I have to implement a sequence class, however the header file is predefined class sequence { public: // TYPEDEFS and MEMBER CONSTANTS
6
7153
by: Defcon2030 | last post by:
<bHey, can someone help me with this? I've been working on it for a few days now, and my head's starting to spin... </b> // FILE:ex1_imp.cxx // // // // CLASS IMPLEMENTED: sequence (see ex1.h...
1
3015
davydany
by: davydany | last post by:
Hey guys...a n00b Here for this site. I'm making a sequence class for my C++ class. And The thing is in the array that I have, lets say i put in {13,17,38,18}, when i see the current values for the...
5
6590
by: Anan18 | last post by:
Hello sir, I'm supposed to Implement and Test the sequence Class Using a Fixed-Sized Array (Chapter 3), from Data Structures & Other objects using c++. The header file is provided, and so is a test...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7379
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
7535
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...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
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
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
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
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
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.