! 0Falco
Explore posts from serversHow to refer to the mainwindow class from another class.
Creating a WPF app. I have one main class where all the mainwindow controls are operated.
I have a different class that's called FilterManager. In this class I want to operate some data on the mainwindow as well. But I'm not sure how, what's a clean way to refer to the mainwindow from this class?
5 replies
How to create a hotkey so the user can stop/pause the program.
I created a WPF app that automates mouse movements. When the program is active the user cannot press the stop button since the mouse is being used. How do I create a hotkey that can be pressed and stop the programming.
I searched the internet and I found 2 options, but I don't know which is best
1. Use a side thread for the program and a main thread that listens for any hotkeys. Then the main thread either pauses or kills the side thread.
2. Use Task ? But I'm not sure how that works.
18 replies