How do I share a .psf

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 3 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
MoneySolver
Posts: 7
Last visit: Wed Nov 02, 2022 12:09 pm

How do I share a .psf

Post by MoneySolver »

When you look at the properties of a .psf project file, there is a property called "Shared". It's currently greyed out and I cannot figure out how to change this.

Now before you go saying "why would you want to make a file shared, that isn't best practice". I'm totally open to suggestions or help with that I'm trying to accomplish.

- I have one form (form 1) that contains a bunch of controls and a function that processes all the data in those controls.
- I have a second form (let's call it the processing form) that has a rich text box. I'm trying to treat that form/text box like a command output screen so the person running it can see everything that's happening live.
- I want each output that happens in the function (from form 1) to be added to the rich text box in the processing form.
- I don't want to keep reloading the form so obviously pipping the output to the show-processingform as an argument is not feasible.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: How do I share a .psf

Post by jvierra »

"Shared" makes a project file external.
You cannot have two active forms at the same time. PowerShell only allows modal dialog forms.
MoneySolver
Posts: 7
Last visit: Wed Nov 02, 2022 12:09 pm

Re: How do I share a .psf

Post by MoneySolver »

Thanks for that explanation. With that being said, I'm still in need of a solution. Or is the answer that I just have to pass every single piece of information from the controls(which is a lot) as arguments into the processing form (which will house the big function that does the processing).
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: How do I share a .psf

Post by jvierra »

Unfortunately your question is too vague for me to guess at an answer. Are you just trying to create an updatable report form? You can use IE as a writable target to output text to. You can also use a runspace to launch a form in another independent form which can be written to.
This topic is 3 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