473,587 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can Any Body Help Me:- I Want To Send Numeric Enter Key To A Dos Application

11 New Member
could nebody help me out of this problem.
i want to send numeric enter key to a dos application. i tried sendkeys but it doesn't trace out the dos application.
i have designed new module but it also doesn't differentiate between standard enter key and numpad enter key.
Feb 23 '08 #1
7 1965
Killer42
8,435 Recognized Expert Expert
Sorry to see you're not getting any response to this.

I'm afraid I don't know the answer, either. VB doesn't seem to differentiate between the two Enter keys, same with Shift, or Control or Alt. I knew KeyPress events wouldn't care which Enter was pressed, but was a bit surprised to find that KeyDown also doesn't care.

All I can think of is to try to track down a Windows API function to send a message indicating that a particular key was pressed. I did a quick Google search on "windows api send key" and came up with a few entries that sounded interesting. Try it yourself, or see whether these first couple are any help...
P.S. I'm using VB6, what version do you have?
Feb 25 '08 #2
net2knot
11 New Member
Sorry to see you're not getting any response to this.

I'm afraid I don't know the answer, either. VB doesn't seem to differentiate between the two Enter keys, same with Shift, or Control or Alt. I knew KeyPress events wouldn't care which Enter was pressed, but was a bit surprised to find that KeyDown also doesn't care.

All I can think of is to try to track down a Windows API function to send a message indicating that a particular key was pressed. I did a quick Google search on "windows api send key" and came up with a few entries that sounded interesting. Try it yourself, or see whether these first couple are any help...


P.S. I'm using VB6, what version do you have?
thanks killer42. Atleast i got reply from u r side.
i too using vb6.0
i tried the keybd_event api but it doesn't work.
either i could not used properly....
but i need a immediate solution as i am trying this for last many months n could not get a proper reply. atlast i got reference of this site n hope for a solution
Feb 25 '08 #3
net2knot
11 New Member
thanks killer42. Atleast i got reply from u r side.
i too using vb6.0
i tried the keybd_event api but it doesn't work.
either i could not used properly....
but i need a immediate solution as i am trying this for last many months n could not get a proper reply. atlast i got reference of this site n hope for a solution
Feb 25 '08 #4
Killer42
8,435 Recognized Expert Expert
One very important thing to remember, with SendKeys and probably also with Windows API functions. If you send a keyboard event, it will generally go to whatever currently has the focus. So you will generally need to set the focus to the appropriate window before simulating a keypress.

In other words, generally you don't send a key to anyone in particular. You are simply telling Window "the user pressed this key". So it will handle it however it would normally.
Feb 25 '08 #5
net2knot
11 New Member
One very important thing to remember, with SendKeys and probably also with Windows API functions. If you send a keyboard event, it will generally go to whatever currently has the focus. So you will generally need to set the focus to the appropriate window before simulating a keypress.

In other words, generally you don't send a key to anyone in particular. You are simply telling Window "the user pressed this key". So it will handle it however it would normally.
thanks killer42.
i tried it using sendinput but either i am missing some code or something wrong.
i got focus over the dos application but still it doesn't react to the sendinput or the api.
either i am missing some code...
i would be thankful if help me out in coding...
Feb 25 '08 #6
Killer42
8,435 Recognized Expert Expert
i tried it using sendinput but either i am missing some code or something wrong. i got focus over the dos application but still it doesn't react to the sendinput or the api. either i am missing some code... i would be thankful if help me out in coding...
All I know is that I tried many years ago to get some text to or from a DOS applciation and found that they are a completely different story to a regular Windows one. I don't think I was ever successful, but I also didn't try very hard - I was just curious.

I've just tried a Google search for "vb interact with dos". Here are the first few entries which sounded as though they may be of some use...Note, I think the last one is an overview of a commercial product.
Feb 25 '08 #7
net2knot
11 New Member
All I know is that I tried many years ago to get some text to or from a DOS applciation and found that they are a completely different story to a regular Windows one. I don't think I was ever successful, but I also didn't try very hard - I was just curious.

I've just tried a Google search for "vb interact with dos". Here are the first few entries which sounded as though they may be of some use...Note, I think the last one is an overview of a commercial product.
thanks killer42.
but i didn't get the solution of my problem.
i am in an urgent need of finding the solution of this problem.
neway i am thankful to u.
Feb 26 '08 #8

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

Similar topics

6
7482
by: Patrick | last post by:
Hi I am a newbie struggling a little with css.It is hard to get it right in all browsers, so i decided to read the CSS2 specification on the w3 site. What is the following from the CSS2 specification: "Quote starts": 5.6 Child selectors
11
2453
by: Joe | last post by:
If you display the styles in use at Yahoo.com, you can see some interesting things. For example, this: html>body{font:84.5%/122% arial;} I tried creating a sample page using this style and it didn't do anything. Anyone know whether having this ">" is real code or a syntax error? I'm not sure what that "/" does in the font style, either. ...
4
14332
by: Viken Karaguesian | last post by:
Hello all, I have a question. I trying to run two Javascripts on my webpage, both of which need a <body onload> command. They are as follows: <body onload="runMe()"> <body onload="SwapImgs()"> What would be the proper format to include these on the same line? would it be:
14
4060
by: christopher.secord | last post by:
Can someone please tell me why this works: document.body.innerHTML = "<table><tr><th>one</th></tr><tr><td>two</td></tr></table>"; But this does not work: document.body.innerHTML = "<table><tr>"; document.body.innerHTML = document.body.innerHTML + "<th>one</th></tr><tr><td>two</td></tr></table>";
2
4429
by: Earl Teigrob | last post by:
I am trying to build a custom control to wrap my smart navigation implimention (not microsofts 'cause it has problems) The follow code works fine when the onclick and onload events are defined in the Body tag. However, when I try to set them in Javascript code, I get errors. What am I doing wrong??? **********THIS WORKS ************...
3
1780
by: Alan No Spam | last post by:
I am using Visual Studio 2003 and in order not to repeat body tag details in every page <body leftmargin=0 topmargin=0 .... I put those details as an variable in my class: public class WebRoot: System.Web.UI.Page { public String my_body = "leftmargin=0 topmargin=0"; ......
5
5573
by: Progman | last post by:
<body id="body" style="background-image:url(../../Pictures/System/CountryMosaic.JPG)"> how do i get/set body.style from asp.net?
5
2082
by: Big Bill | last post by:
http://www.promcars.co.uk/pages/rebecca.php this is not the way it's supposed to be, is it... ok then for me just to remove the body tags from the include files, it'll all work ok? I don't know php and I'm working with a webmaster who, I suspect, doesn't know it too well either. BB --
3
2955
by: Water Cooler v2 | last post by:
Questions: 1. Can there be more than a single script block in a given HEAD tag? 2. Can there be more than a single script block in a given BODY tag? To test, I tried the following code. None of the script gets executed. Can someone please give me a direction as to what I may be missing? Thanks.
5
3299
by: kenia | last post by:
Hi, I'm trying to get the body element of a page using a webBrowser control. Right now I'm testing in javascript to make sure i can access the body through the webBrowser control, but soon I'll create an activeX control and use the control from there. My code is: var wb = document.getElementById("wbSave"); wb.Navigate(window.location); var...
0
7849
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8215
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. ...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6626
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
5718
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
5394
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
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1189
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.