473,797 Members | 2,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Systemwide-HotKey

Hi all
Can anybody suggest a very simple system-wide hotkey?

A bit of Example code is what I am looking for

Thanks in advance

Farhana

Nov 13 '06 #1
1 1372
fa*********@yah oo.co.in wrote:
Hi all
Can anybody suggest a very simple system-wide hotkey?

A bit of Example code is what I am looking for

Thanks in advance

Farhana
Public Declare Auto Function SendMessage Lib "user32.dll " (ByVal hWnd As
IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal s As String)
As Int32
Const WM_SETHOTKEY As Long = &H32
Const HotKey_Alt_F12 As Long = &H47B

Private Sub MainFrm_Load(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

SendMessage(Me. Handle, WM_SETHOTKEY, HotKey_Alt_F12, 0)

End Sub
This example will create a system-wide Hotkey combination of Alt-F12.
Press this combination and your application will be given the focus,
even if it's been minimized. (Watch for wrapping)

Hope this helps.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Nov 13 '06 #2

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

Similar topics

2
3713
by: jayPLEASEtylerNOwilliamsSPAM | last post by:
Hi, I set up PHP 4.xx using Apache 1.3 on Windows XP to begin a project. The project now needs to be moved to a real test box. Admittedly, I am not quite sure how I was able to access Oracle on my machine, but I know I have the Oracle client installed, have two odbc DSNs (CAI/PT Oracle 8) installed and uncommented php_oci8.dll and php_oracle.dll. Other than that, I kind of just played around until it worked. Now my code needs to be...
7
6225
by: hokieghal99 | last post by:
Does anyone know of a keystroke logger that has been written in Python for Windows machines? I'd like to see such a script and use it as a point of reference for a real-time backup project that I'm working on. Basically, I'd like to be able to capture all keystrokes from the keyboard buffer and write them to a text file so I could reporduce emails, documents, etc. in the event of file loss that occurs between nightly backups. For example,...
2
4991
by: Olli Piepponen | last post by:
Hi, I'm having a little problem catching keystrokes under Windows. I did a little research and found that with mscvrt.getch() one can cath a single key that is pressed. However this doesn't work when the program is run on the backround and not as the primary task. What I would like to have is a same sort of function that would also work when the program is being run on the background. I'm trying to implement a program that would listen...
3
1566
by: Vance Green | last post by:
Ther reason I ask is that the .NET install overwrote my perfectly working IE 5.5 SP2 install with the buggy IE 6, and I'm not very happy about it...lots of problems. The release notes say NOTHING about this, and the install DID NOT ask me if I wanted to. If .NET is OK with 5.5, I'll be removing 6.0 as fast as I can open Add/Remove programs...
2
5884
by: Garry Clarke | last post by:
I have enabled the query governor on our SQL2000 SP2 server with a threshold of 3600. Now, some of the maintenance jobs fail due to the limit being to low (e.g. one of the user databases integrity check fails nightly). I have tried to put the command 'SET QUERY_GOVERNOR_COST_LIMIT 0' just before the line in the step which reads 'EXECUTE master.dbo.xp_sqlmaint N'-Plan etc' but it has no effect.
9
7011
by: Mikey | last post by:
Hi all I'm doing my first CSS with a CGI, and I'm haivng some configuration problems. I'm on a Mac, Panther. I've got a CGI that prints a head with "@import url" to connect to a stylesheet. The web page comes out fine, but without the stylesheet applied. The CGI is in the systemwide cgi-bin
4
2225
by: Vivek Chaudhary | last post by:
Is it possible to set an environment variable in python script whose value is retained even after the script exits. Doing the following creates an environment variable "name" which is visible to only subprocesses created by os.system() and os.popen(). os.putvar("name", "vivek") Is it possible to somehow create this environment variable inside python script which will be avaibale even after the script exits. In
17
1804
by: Ray Gardener | last post by:
I've always wondered what other C++ programmers fail to do while coding even though they know what they're doing is... naughty (and some of the items below occur in other languages, of course). People make these slip-ups all the time accidentally, but what I'm getting at is when we make them while we consciously _know_ that we're being bad. This is the more interesting phenomenon because I tend to interpret consciously "fighting the...
14
8227
by: phil_gg04 | last post by:
Dear C++ Experts, Over the last couple of months I have been writing my first program using shared memory. It has been something of an "in-at-the-deep-end" experience, to say the least. At present the shared memory contains a few fixed-size structs, but I really need to be able to store more complex variable-sized data in there. So the next task is to work out how to store C++ objects, and if possible STL containers, in this shared...
1
1477
by: Jigar mehta | last post by:
Hye, How to create systemwide hooks for keyboard for keys like WIN, ALT+TAB, CTRL+ALT+DEL even when the application does not have the focus on it... Thanks,
0
9685
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9536
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10468
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10245
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10205
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9063
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7559
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
3
2933
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.