Product: PowerShell Studio 2020 (64 Bit)
Build: v5.7.172
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.18363.0
PowerShell version(s): 5.1.18362
I refer here to my own entry:
viewtopic.php?p=80198#p80198
The task is simple:
I want to execute code, or call a function, or run a job AFTER a GUI has been loaded.
So in other words, I want my GUI to be there first and THEN perform any actions.
Plain and simple.
To do this, I create a new GUI project, create a job that collects data, and display that collected data in the GUI in a text field.
But what happens now is that the job is always executed first and the GUI starts only then, which leads to a considerable startup delay.
How can I change this behavior.
thanks for your help in advance.
Thomas
The relevant code is:
Run code after gui is loaded
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Run code after gui is loaded
[Topic moved by moderator to PowerShell GUIs forum]
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Run code after gui is loaded
See the following articles:
https://info.sapien.com/index.php/guis/ ... sive-loops
https://info.sapien.com/index.php/guis/ ... sive-forms
There are many articlkes on that page that you will need to review to learn how to work with WinForms and PowerShell.
https://info.sapien.com/index.php/guis/ ... sive-loops
https://info.sapien.com/index.php/guis/ ... sive-forms
There are many articlkes on that page that you will need to review to learn how to work with WinForms and PowerShell.
- GHIsolierung
- Posts: 62
- Last visit: Tue Nov 02, 2021 12:46 am
Re: Run code after gui is loaded
Thanks for your reply, those are both sites I know.
However, that is not my real problem.
I want to display a GUI - wait 2 seconds after that if I want - and then I want to perform some action.
With the pages you showed me, I would have a gui that I can 'move' in the meantime of the job, but it doesn't fix my problem with the order.
However, that is not my real problem.
I want to display a GUI - wait 2 seconds after that if I want - and then I want to perform some action.
With the pages you showed me, I would have a gui that I can 'move' in the meantime of the job, but it doesn't fix my problem with the order.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Run code after gui is loaded
https://docs.microsoft.com/en-us/dotnet ... ew=net-5.0
That would be the Form.Shown event. The Microsoft website https://docs.microsoft.com/en-us/dotnet ... esktop-4.8
has a brief explanation and order of Windows Forms events.
A google search for <windows forms events> produces additional examples and documentation.
That would be the Form.Shown event. The Microsoft website https://docs.microsoft.com/en-us/dotnet ... esktop-4.8
has a brief explanation and order of Windows Forms events.
A google search for <windows forms events> produces additional examples and documentation.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- GHIsolierung
- Posts: 62
- Last visit: Tue Nov 02, 2021 12:46 am
Re: Run code after gui is loaded
To be honest, I don't feel like watching all the documentaries.
I am not a programmer anyway and never want to become one.
That's why I go to professionals and pay licenses for support.
Would it be possible, you could give me a possible solution based on the code I provided?
Thank you very much.
I am not a programmer anyway and never want to become one.
That's why I go to professionals and pay licenses for support.
Would it be possible, you could give me a possible solution based on the code I provided?
Thank you very much.
Re: Run code after gui is loaded
Sorry but this is not product support. There are other forums for product support. ALso note that basic programming and reading instructions are not part of any support for any product.
The links are not videos they are explanations and instructions on how to proceed to do what you ask. Why should I write the whiole thing all over when someone did such a good job or that already?
The instructions are short and can be read in less than ten minutes.
A simple hiont is to use a timer or use thee forn "Shown" event. That won't necessarily do what you ask so the whole of possibilites are described in the two articles.
The links are not videos they are explanations and instructions on how to proceed to do what you ask. Why should I write the whiole thing all over when someone did such a good job or that already?
The instructions are short and can be read in less than ten minutes.
A simple hiont is to use a timer or use thee forn "Shown" event. That won't necessarily do what you ask so the whole of possibilites are described in the two articles.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Run code after gui is loaded
The product purchase includes product support. It does not mean we will be writing the code for you.
Kind of like asking Microsoft do write your essay because you have an Office license
Go read the articles, they don't bite and it feels good to accomplish something.
Kind of like asking Microsoft do write your essay because you have an Office license
Go read the articles, they don't bite and it feels good to accomplish something.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.