zxing qr code encoder example c# OnKey Method in C#

Painting QR Code in C# OnKey Method

OnKey Method
Paint QR Code In C#.NET
Using Barcode creation for Visual Studio .NET Control to generate, create QR image in .NET applications.
www.OnBarcode.com
QR Code ISO/IEC18004 Reader In C#.NET
Using Barcode recognizer for .NET framework Control to read, scan read, scan image in .NET framework applications.
www.OnBarcode.com
6
Creating Barcode In Visual C#.NET
Using Barcode creator for VS .NET Control to generate, create bar code image in .NET framework applications.
www.OnBarcode.com
Barcode Recognizer In C#.NET
Using Barcode decoder for VS .NET Control to read, scan read, scan image in .NET applications.
www.OnBarcode.com
The OnKey method allows you to create hotkeys that will run a particular routine when pressed or block Excel from behaving normally when the key combination is pressed. The syntax for the OnKey method is
QR Generator In VS .NET
Using Barcode generation for ASP.NET Control to generate, create QR-Code image in ASP.NET applications.
www.OnBarcode.com
Printing QR Code In Visual Studio .NET
Using Barcode generation for VS .NET Control to generate, create QR Code 2d barcode image in Visual Studio .NET applications.
www.OnBarcode.com
Application.OnKey(Key, Prodecure)
Draw QR Code ISO/IEC18004 In Visual Basic .NET
Using Barcode generation for .NET framework Control to generate, create QR Code ISO/IEC18004 image in VS .NET applications.
www.OnBarcode.com
PDF 417 Encoder In Visual C#
Using Barcode generator for Visual Studio .NET Control to generate, create PDF-417 2d barcode image in VS .NET applications.
www.OnBarcode.com
Part 3: The Excel Object Mode
Drawing UPC - 13 In Visual C#.NET
Using Barcode printer for VS .NET Control to generate, create EAN 13 image in .NET framework applications.
www.OnBarcode.com
Barcode Encoder In C#
Using Barcode creation for .NET framework Control to generate, create barcode image in .NET applications.
www.OnBarcode.com
Microsoft Office Excel 2003 Programming Inside Out Key is a string value representing the key combination to be assigned; see Table 6-3 for a list of special key codes. Procedure is a string value representing the name of the procedure to be invoked. If Procedure is blank (that is, the parameter is set to the empty string by assigning it the value " "), the key combination performs no action, even if Excel normally reacts to the key combination. If the Procedure argument is omitted entirely (that is, there is nothing after the comma), the key combination is reset to normal, default actions. You can combine a key with one or more of the key modifiers (Shift, Ctrl, and/or Alt) to create key combinations as needed. The following example runs a procedure when Alt+H is pressed:
Code 128 Code Set B Generator In C#.NET
Using Barcode encoder for .NET Control to generate, create Code 128C image in .NET framework applications.
www.OnBarcode.com
Identcode Maker In C#
Using Barcode encoder for .NET framework Control to generate, create Identcode image in .NET applications.
www.OnBarcode.com
Application.OnKey "%h", "MyProcedure"
Print QR In Objective-C
Using Barcode generator for iPad Control to generate, create Denso QR Bar Code image in iPad applications.
www.OnBarcode.com
Encode ANSI/AIM Code 39 In Java
Using Barcode generation for BIRT reports Control to generate, create Code-39 image in BIRT reports applications.
www.OnBarcode.com
The following example takes the key combination that normally opens the Excel Find and Replace (Ctrl+H) dialog box and uses it to invoke a custom procedure:
Generate EAN13 In VB.NET
Using Barcode maker for VS .NET Control to generate, create UPC - 13 image in Visual Studio .NET applications.
www.OnBarcode.com
Create EAN / UCC - 14 In Objective-C
Using Barcode generation for iPad Control to generate, create EAN / UCC - 14 image in iPad applications.
www.OnBarcode.com
Application.OnKey "^h", "MyProcedure"
Paint Matrix Barcode In VS .NET
Using Barcode generator for Visual Studio .NET Control to generate, create Matrix 2D Barcode image in .NET applications.
www.OnBarcode.com
UPC-A Creator In .NET Framework
Using Barcode generator for ASP.NET Control to generate, create GS1 - 12 image in ASP.NET applications.
www.OnBarcode.com
This example stops any code from running when Ctrl+H is pressed.
Printing USS Code 128 In None
Using Barcode generator for Microsoft Excel Control to generate, create Code 128C image in Microsoft Excel applications.
www.OnBarcode.com
Scanning EAN128 In Visual Basic .NET
Using Barcode decoder for .NET framework Control to read, scan read, scan image in Visual Studio .NET applications.
www.OnBarcode.com
Application.OnKey "^h", ""
This last example resets Ctrl+H to the default action in Excel (Find and Replace).
Application.OnKey "^h"
The most common usage of the OnKey method would be to set hot keys when a workbook is opened or closed. This allows the workbook to provide hot keys that are specific to the workbook and resets the keys to their default values when closed. The two following procedures, when placed inside the Y2001ByMonth.xls file, assign the hot key of Alt+C to the CopySheet procedure to add a new worksheet to the workbook:
Sub Auto_Open() Application.OnKey "%c", "CopySheet" End Sub Sub Auto_Exit() Application.OnKey "%c" End Sub
Table 6-3.
Key Codes
Key Code
{Backspace} or {BS} {Break} {CapsLock} {Clear}
Backspace
6
Break Caps Lock Clear
Part 3: The Excel Object Mode
The Application Object
Table 6-3.
Key Codes
Key Code
{Delete} or {Del} {Down} {End} ~ (Tilde) {Enter} {F1} through {F15} {Help} {Home} {Insert} {Left} {NumLock} {PGDN} {PGUP} {Return} {Right} {ScrollLock} {Tab} {Up}
Key Code
+ (Plus Sign)
^ (Caret)
% (Percent Sign)
Delete or Del Down Arrow End Enter Enter (Numeric Keypad) F1 through F15 Help Home Insert or Ins Left Arrow Num Lock Page Down Page Up Return Right Arrow Scroll Lock Tab Up Arrow Key Modifier Shift Ctrl Alt
SendKeys Method
The SendKeys method allows you to send keystrokes to the keyboard buffer for when you need to send keystrokes to the current application. This can be especially useful if you know your procedure will cause a dialog box to open and there is no method to prevent the dialog box from appearing and waiting on user input. The syntax for the SendKeys method is
expression.SendKeys (Keys, Wait)
expression Keys
is an optional expression that returns an Application object.
is a required variant expression, usually expressed as a string, that contains the key codes you want to send. (See Table 6-3 for a list of key codes for special keys.)
6
Part 3: The Excel Object Mode
Microsoft Office Excel 2003 Programming Inside Out
Wait
is an optional variant expression, usually expressed as a True or False Boolean value that specifies if the procedure should halt further execution until the keys have been processed. When True, the procedure will pause until all keys sent have been pro cessed. When False or omitted, the procedure continues execution without regard to whether or not the keys have been processed.
The keys are placed into a key buffer first until an application calls for keys from the buffer. This means the keys need to placed into the buffer before you call a method that will require the keystrokes. This example goes through a list of customers and generates a personalized e-mail message for each customer. The SendKeys method is used to pass an Alt+S keystroke to the default e-mail program to actually send the e-mail message. The Wait method is used to allow the e-mail program time to generate the e-mail message before trying to send it.
Sub SendEmail()
Copyright © OnBarcode.com . All rights reserved.