Skip to content

How to Update a WinForm GUI From a Route? #65

Answered by scottoffen
Milkate asked this question in Q&A
Discussion options

You must be logged in to vote

You are correct, this is absolutely outside the scope of Grapevine. That being said, I'm sure many people will have this same question, so it's a good idea to address this here. Keep in mind that this is not necessarily the most optimal way to approach doing this, but rather a concise, working example to get you up and running on the right path.

In order to update your WinForms GUI, you have to get a handle to the open form and the specific control you want to update on it. If, for example, you have a form named Form1 that contains a text box named textBox1, and you want to update the textbox, you would import System.Windows.Forms into your route class, and use something like this:

var form 

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@scottoffen
Comment options

Answer selected by scottoffen
Comment options

You must be logged in to vote
2 replies
@Milkate
Comment options

@scottoffen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants