We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GraphicsWindow.LastKey
#11
(translated by Google translator)

Thank you very much for this discussion.  Shy
This discussion is very helpful.
I didn't even know that such unexpected problems existed.

It would be great if other users would also share their problems on our forum.

I wish everyone good luck.  Wink
Reply
#12
Following from this discussion I added some new methods to LitDev extension, version 1.2.29.14 (get with Extension Manager or website).

LDFocus.ResetFocus()
LDTextWindow.LastKeyReset()
LDGraphicsWindow.LastKeyReset()
[-] The following 3 users Like litdev's post:
  • AbsoluteBeginner, jrmrhrb00, Scout
Reply
#13
LitDev,

Thanks for doing this! Here's proof that it works. Run the snippet and hit the return key. LDGraphicsWindow.LastKeyReset does it's function.

GraphicsWindow.Show()
While key <> "Return"
  Key=GraphicsWindow.LastKey
EndWhile
Program.Delay(10)
TW.WriteLine(key)
LDGraphicsWindow.LastKeyReset()
TW.WriteLine(GraphicsWindow.Lastkey)

JR
[-] The following 1 user Likes jrmrhrb00's post:
  • Scout
Reply
#14
Reflection is really awesome I was trying using ZSReflection to do this get assembly key then get type key of GW and the set the "_lastkey" field to none but got some errors I will try to diagnose why error are coming.
ZS
Reply
#15
Hi ZS,

Syntax is a bit nasty, but its one line of code so if you want I can share or help explain.
Reply
#16
i made code but it didn't work does you tried.
ZS
Reply
#17
(01-18-2025, 10:29 AM)z-s Wrote: i made code but it didn't work does you tried.

typeof(GraphicsWindow).GetField("_lastKey", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.IgnoreCase).SetValue(null, System.Windows.Input.Key.None);
[-] The following 1 user Likes litdev's post:
  • z-s
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)