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.
Locked
MoneySolver
Posts: 7
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Tue Dec 31, 2019 7:43 am

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: 14368
Joined: Tue May 22, 2007 9:57 am
Contact:

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
Joined: Tue Dec 31, 2019 7:43 am

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: 14368
Joined: Tue May 22, 2007 9:57 am
Contact:

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.

Locked