.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 6
quigs
606 Views, 5 Replies

F8

Good Afternoon,
douse anyone have any idea how to use the F8 Key as a modifier key.
I have this line of code, that lets me use the Caps Lock key, in place of it:

Dim capslock As Boolean = System.Windows.Forms.Control.IsKeyLocked(System.Windows.Forms.Keys.CapsLock)

But when I switch it out for the F8, it won’t work, obviously because you can’t
lock the F8 key. I’m pretty stumped to be honest.

Thanks for any help in advance.

Martin.
My name is Martin.. 😄
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: quigs

You can't use any key as a modifer key.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6376262@discussion.autodesk.com...
Good Afternoon,
douse anyone have any idea how to use the F8 Key as a modifier key.
I have this line of code, that lets me use the Caps Lock key, in place of it:

Dim capslock As Boolean =
System.Windows.Forms.Control.IsKeyLocked(System.Windows.Forms.Keys.CapsLock)

But when I switch it out for the F8, it won't work, obviously because you can't
lock the F8 key. I'm pretty stumped to be honest.

Thanks for any help in advance.

Martin.
Message 3 of 6
quigs
in reply to: quigs

OK,
maybe I worded it wrong. I used an example from Kian Walmsley:

http://through-the-interface.typepad.com/through_the_interface/2009/11/detecting-the-use-of-the-shift-and-control-keys-during-an-autocad-jig-using-net.html

Instead of using the shift keys, can the part where it detects
what key has been pressed be changed to the F8 key?

Cheers,

Martin.
My name is Martin.. 😄
Message 4 of 6
Anonymous
in reply to: quigs

You have to P/Invoke the GetKeyState() API, and test to see
if the key is currently pressed.

You also have to make sure that pressing the key does not
execute macros or do anything else, and how are you going
to stop a user from assigning something like a macro to the
key using the CUI?

Are you really sure you want to do that?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6376543@discussion.autodesk.com...
OK,
maybe I worded it wrong. I used an example from Kian Walmsley:

http://through-the-interface.typepad.com/through_the_interface/2009/11/detecting-the-use-of-the-shift-and-control-keys-during-an-autocad-jig-using-net.html

Instead of using the shift keys, can the part where it detects
what key has been pressed be changed to the F8 key?

Cheers,

Martin.
Message 5 of 6
quigs
in reply to: quigs

Thanks for the help Tony, I will have a look to see if I
can find anything on the webs that ties into what you have said.

Kind regards,

Martin.
My name is Martin.. 😄
Message 6 of 6
quigs
in reply to: quigs

Hi,

I actually found the answer, very simple really:

 

 Dim OrthoF8 As String = Application.DocumentManager.MdiActiveDocument.Database.Orthomode = True
If OrthoF8 = True Then
ElseIf OrthoF8 = False Then

end if

 

Cheers,

 

Martin.

My name is Martin.. 😄

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost