vb question...

Alex

Diamond Member
Oct 26, 1999
6,995
0
0
i cant seem to remember how to do it:

btw the OS for this is winnt4 in case its relevant.

part1:
is there any way to disable/reassign keys? im writting a program that absolutely requires the combination ctrl + alt + del to be pressed at the same time to trigger an action. if you've ever used winnt, you'll know that you get the options menu where u can lock workstation, logoff, etc... is there any way to temporarily disable that combination of keys for windows and have them reassigned to trigger the action in my program?

part2:
ok, how do i specify 'ctrl + alt + del' for vb? its a keydown or keypress trigger isnt it? ive tried using +s or 'and's to little avail...

any help is greatly appreciated! :)
 

Alex

Diamond Member
Oct 26, 1999
6,995
0
0
is there any way to assign the key combination to vb tho? what would the code be?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Sorry, I can't help you. I've successfully forgotten all the VB I've ever known, and I feel much better for it =)
 

Alex

Diamond Member
Oct 26, 1999
6,995
0
0


<< Sorry, I can't help you. I've successfully forgotten all the VB I've ever known, and I feel much better for it =) >>



fine i admit its not all that sophisticated but its a nice asset to have...
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
fine i admit its not all that sophisticated but its a nice asset to have...

I'm not really knocking you, VB has it's purposes, I just really dislike it. I also use Linux for most of my daily work now, so a MS-only language is far from appropriate.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0


<< I'm not really knocking you, VB has it's purposes, I just really dislike it. I also use Linux for most of my daily work now, so a MS-only language is far from appropriate. >>



You say this in every VB-related thread it seems. I don't think he asked for opinions on whether VB was an appropriate language for you... ;)

Also, your information

<< ctrl+alt+del is hard coded into winlogon in NT, you can't intercept it. >>

is incorrect. You can intercept it, it's just quite difficult. You will not be able to implement this in VB, as a standard win32 DLL is required. What needs to happen, is you need to replace MS' msgina.dll with your own. Your new DLL could simply LoadLibrary() the old msgina.dll and delegate the calls, and you'd have the opportunity to trap the WLX_SAS_TYPE_CTRL_ALT_DEL message (defined in winwlx.h). Search on MSDN for more info if you really want to delve into it.

[edit]This link might also be of help.[/edit]
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Also, if you simply want to create your own "hot" key combinations, have a look-see at RegisterHotKey().
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You can intercept it, it's just quite difficult. You will not be able to implement this in VB, as a standard win32 DLL is required. What needs to happen, is you need to replace MS' msgina.dll with your own.

That's just arguing semantics. He asked if he could intercept Ctrl+Alt+Del in a VB app, I said no winlogon always gets it. You reply saying I'm wrong because it's possible, but only if you write a custom gina, although that can't be done in VB.
 

Alex

Diamond Member
Oct 26, 1999
6,995
0
0


<< Also, if you simply want to create your own "hot" key combinations, have a look-see at RegisterHotKey(). >>



come again?
 

coder1

Senior member
Jul 29, 2000
433
0
0
Here Nothinman goes again. All you did was explain to franguinho that it couldn't be done. And throw your "Anti-MS", "VB is a poor language" crap in his face. You didn't give him any other options. Descartes is right, you reply the same to every thread that has the letters VB in it. Im not going to get into 'another' argument over VB. Descartes was right about the API calls. No VB does not have it as part of the VB object library. (VB.net does) He will have to use Win32 from within is VB app. We have two applicatiosn tath do intercept this. They are both VB app services. Works fine.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
All you did was explain to franguinho that it couldn't be done. And throw your "Anti-MS", "VB is a poor language" crap in his face.

Why are all VB programmers so defensive? If you can explain how it can be done I'll be more than happy to say I'm wrong.

And who in their right mind would write a whole new Gina just to capture 1 specific key combination? Wouldn't it make more sense simply to choose another key combination?