Progressbar problem still exist

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
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.
This topic is 7 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
monoeagle
Posts: 108
Last visit: Fri Jan 26, 2024 10:44 am

Re: Progressbar problem still exist

Post by monoeagle »

Hi Dan,

thanks for the demo. I'll modify it for test purpose(step by step) if I get the robocopy thing running with the correct behaviour.

greetz
mono
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Progressbar problem still exist

Post by jvierra »

The update event is where we check the job status. Please go back and read the blog articles very carefully. They explain this in detail.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Progressbar problem still exist

Post by jvierra »

Once more I will try to stress that you cannot use a progress bar with multiple jobs. It makes no logical sense. What progress are you measuring and how do you know the meaning?

You ae trying to do too many complex things without an understanding of how any of this works. Start small and learn how to run one job with no progress then consider how this works with multiple jobs.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Progressbar problem still exist

Post by jvierra »

monoeagle wrote:hmm maybe I think to complicated.

I have a datagridview and for every checked row a job will be generated if the download button was pressed.
If a job is finished an XML will be edited the 2 cells in the datagridview. This 2 actions have to be in the -CompletedScript Part??
The completed script runs once per job. It is not how we would do this without considering the additive nature of the events.
User avatar
monoeagle
Posts: 108
Last visit: Fri Jan 26, 2024 10:44 am

Re: Progressbar problem still exist

Post by monoeagle »

I'm doing so and breaking the code down. That a progress bar makes no sense if multiple jobs will use it is clear. The way dan use the bar is not a option? Everytime a job is finished the bar makes a step.

thanks for your patience, I'm learning(trying) every day and stumble a lot. =)
User avatar
monoeagle
Posts: 108
Last visit: Fri Jan 26, 2024 10:44 am

Re: Progressbar problem still exist

Post by monoeagle »

Now the Jobs runs as expected. With the example of Dan and adding functinality step by step the goal is finished.

The commitment of variables in the job and the changes in the GUI works.

Thanks a lot dan and jvierra.

Now it's time for the night. =)
This topic is 7 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked