OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15-05-2010, 07:04
aakkaarr aakkaarr is offline
Senior Member
 
Join Date: Jan 2009
Posts: 154
Default How to get and set the status of CAPs Lock & Nums Lock

hi
How to get and set the status of CAPs Lock & Nums Lock at run time
Also is there any way to insert Barcodes by VBA
Reply With Quote
  #2  
Old 18-05-2010, 14:02
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,770
Blog Entries: 10
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Numlock and Capslock

Here is a way to see if Numlock or Capslock is on.
Code:
Public Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer

Sub ExampleUse()
    If GetCapslock() Then
        MsgBox "Caps Lock is ON!"
    Else
        MsgBox "Caps Lock is OFF!"
    End If
 
    If GetNumlock() Then
        MsgBox "Num Lock is ON!"
    Else
        MsgBox "Num Lock is OFF!"
    End If
End Sub

Function GetCapslock() As Boolean
  'Return the CapsLock Value
  GetCapslock = CBool(GetKeyState(vbKeyCapital) And 1)
End Function

Function GetNumlock() As Boolean
  'Return the NumLock Value
  GetNumlock = CBool(GetKeyState(vbKeyNumlock) And 1)
End Function
As for the barcode I don't believe there is any VBA support for it, you might be able to put together some sendkeys, but that is about it.

-Shelby
Reply With Quote
  #3  
Old 19-05-2010, 16:59
aakkaarr aakkaarr is offline
Senior Member
 
Join Date: Jan 2009
Posts: 154
Default

Thanx
you have always been a great help.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Haw update Status Bar dear CorelDRAW/Corel DESIGNER VBA 1 30-04-2009 19:00
Determining teh status of the active layer knowbodynow CorelDRAW/Corel DESIGNER VBA 2 17-05-2007 09:52
Lock an Object who ... Hernán General 2 08-04-2005 22:41
Undocumented Application.Status property in CDR12 zlatev CorelDRAW/Corel DESIGNER VBA 2 21-02-2005 16:30
Corel 12 Dynamic update of coordinates in the Status Bar mpp_piotrp General 0 27-09-2004 23:51


All times are GMT -5. The time now is 22:33.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com