🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
6 messages
6 total messages Started by Emmanuel Mon, 28 Apr 2008 18:03
keybd_event in Service
#409
Author: Emmanuel
Date: Mon, 28 Apr 2008 18:03
8 lines
1025 bytes
Dear All,

how can I do the same effect in Service?

keybd_event(VK_CAPITAL, 0, 0,0);
keybd_event(VK_CAPITAL, 0, KEYEVENTF_KEYUP,0);

Emmanuel
Re: keybd_event in Service
#410
Author: Remy Lebeau (TeamB)
Date: Mon, 28 Apr 2008 21:29
34 lines
2612 bytes
"EmmanueFrom -4022111522121214338
X-Google-Thread: 10cc67,61b1edc79d66af39
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: using WTSGetActiveConsoleSessionId()
Date: Thu, 17 Apr 2008 10:55:58 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <ei3f04tjjo26foakgluf6tb76nuc0hr4v8@4ax.com>
References: <48074a72@newsgroups.borland.com> <48077f50$1@newsgroups.borland.com> <480788ac@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.145.64
X-Trace: newsgroups.borland.com 1208454955 67.77.145.64 (17 Apr 2008 10:55:55 -0700)
Lines: 15
Path: g2news1.google.com!news2.google.com!news.glorb.com!feed.xsnews.nl!border-1.ams.xsnews.nl!news.astraweb.com!newsrouter-eu.astraweb.com!newsfeed2.ip.tiscali.net!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
Xref: g2news1.google.com borland.public.cppbuilder.nativeapi:6979

Mike Collins wrote:

>Does it matter where you redefine it?

Yes.
It must be defined prior to reading the
header that uses it, or it will do no good.

#define _WIN32_WINNT 0x0501
#include <vcl.h>
#pragma hdrstop
Re: keybd_event in Service
#411
Author: Emmanuel
Date: Tue, 29 Apr 2008 07:25
17 lines
1581 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> д����Ϣ����:481642eb$1@newsgroups.borland.com...
>
> "Emmanuel" <emmanuel@erphk.com> wrote in message 
> news:481611bf@newsgroups.borland.com...
>
>> how can I do the same effect in Service?
>
> For what purpose exactly?  A service does not run in the same input 
> session that the user interacts with.  Thus, a service does not have 
> access to change the keyboard state of the current interactive user.  What 
> are you trying to accomplish exactly?
>
>
> Gambit
>
I want to keep the Num Lock on or off by the service,before login the PC 
Re: keybd_event in Service
#314
Author: Remy Lebeau (TeamB)
Date: Tue, 29 Apr 2008 16:23
12 lines
1294 bytes
"Emmanuel" <emmanuel@erphk.com> wrote in message 
news:4816cd76@newsgroups.borland.com...

> I want to keep the Num Lock on or off by the service,
> before login the PC

You can't do that from a service.  Why not simply configure the BIOS to do 
that for you?


Gambit 
Re: keybd_event in Service
#315
Author: Emmanuel
Date: Tue, 29 Apr 2008 16:50
19 lines
1467 bytes
If I am using XP, eventhough I set the bios  NUMLOCK is on
when enter xp Login page, it automaticaly set NUMLOCK off,

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> д���ʼ�
news:48174ee2$1@newsgroups.borland.com...
>
> "Emmanuel" <emmanuel@erphk.com> wrote in message
> news:4816cd76@newsgroups.borland.com...
>
> > I want to keep the Num Lock on or off by the service,
> > before login the PC
>
> You can't do that from a service.  Why not simply configure the BIOS to do
> that for you?
>
>
> Gambit
>
>
Re: keybd_event in Service
#318
Author: Remy Lebeau (TeamB)
Date: Tue, 29 Apr 2008 18:21
19 lines
1808 bytes
"Emmanuel" <emmanuel@erphk.com> wrote in message 
news:4817522b$1@newsgroups.borland.com...

> If I am using XP, eventhough I set the bios  NUMLOCK is on
> when enter xp Login page, it automaticaly set NUMLOCK off,

You are not the only one who wants to change that.  Searching the newsgroup 
archives at http://www.deja.com shows plenty of discussions about this 
topic:

http://groups.google.com/groups/search?q=xp+login+num+lock

Some people use logon/off scripts to manipulate the Registry, since that is 
where the problem actually exists.  Even if the physical NumLock key is on, 
XP may see it as off instead because of that.


Gambit 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads