473,554 Members | 2,299 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.SendWa it("^{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 2077
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.co m

<jp******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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.SendWa it("^{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.goo glegroups.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
2585
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 for it eg:
5
3240
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 the sequence and write to the field. Sometimes, however, these sequence numbers will be discarded (after a transaction is complete), and thus...
1
2186
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, "someotherfield" TEXT, PRIMARY KEY("serialfield")
3
4692
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 to not be sequenced. (PERL hashes do not retain order information) First, the w3 specs don't mention the sequence in any detail - its just there...
8
3750
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 sequence of anything except ']' "%" matches a nonempty sequence of anything except '^' "%" matches a nonempty sequence of '-' "%" matches a nonempty...
3
1930
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 = DialogResult.OK Then DataSet1.WriteXml(sfSchemaFileDiag.FileName) End If
14
4786
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
7156
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 for documentation) // INVARIANT for the sequence class: // 1. The number of items in the sequence is in the member variable
1
3020
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 array data from 0 to3, I get this {13, JUNK VALUE, 17,38, 18} and JUNK VALUE is like 1.8e831 or something like that. This happens when I use the...
5
6595
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 program to check the correctness of the sequence class. I cannot figure out what the problem is and keep looking back and forth at the textbook and...
0
7612
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7814
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7576
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6163
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5443
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5165
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3583
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3564
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
853
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.