Project

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 8 years and 6 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
localpct
Posts: 397
Last visit: Thu Oct 27, 2022 5:57 am

Project

Post by localpct »

So I've completed a project and I have it launch three separate applications from the menu bar. The problem is when I launch them, I cannot do anything with the main form? Is there some reading on this I can do? Or some guidance you fine people can provide?

The type of project is "Multi-Form Project"
User avatar
SAPIEN Support Forums
Posts: 945
Last visit: Thu Oct 22, 2015 1:10 pm

Project

Post by SAPIEN Support Forums »

This is an automated post. A real person will respond soon.

Thank you for posting, localpct.

Here are some hints to help you get an accurate and complete answer to your question.

Ask in the best forum: If you asked in the wrong forum, just copy your question to the right forum.

Anticipate follow-up questions!

Did you remember to include the following?
  • 1. Product, version and build
    2. 32 or 64 bit product
    3. Operating system, e.g. Windows 7 64 bit.
    4. Attach a screenshot, if applicable
    5. Attach logs, crash reports, etc., in a ZIP file
If not, please take a moment to edit your original post or reply to this one.

*** Make sure you do not post any licensing information ***
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Project

Post by jvierra »

Start-Process <process file name>
User avatar
localpct
Posts: 397
Last visit: Thu Oct 27, 2022 5:57 am

Re: Project

Post by localpct »

so using start-process, they'll need to have the file on the computer right? Doesn't that defeat the purpose of the "project" where it's all combined?

My project is this. An all in one tool aka Toolbox for IT support staff and I have other tools such as my PingIT, Move-OU, and Temp Cleaner that cannot be added to the main Toolbox app. Pictures will help :D The bottom shows the apps that I want to call but not limit it to just that one app. Please let me know if I'm not clear enough.
Attachments
toolboxmain.png
toolboxmain.png (25.88 KiB) Viewed 3000 times
toolboxtools.png
toolboxtools.png (16.87 KiB) Viewed 3000 times
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Project

Post by jvierra »

You said three separate applications. An application is a process which is a separate exe. An EXE must exist on the machine where you are launching it from.

Why is it that that won't work?

How would you be able t have tools like "ping" run if it is not installed.

If you run most external programs fro PowerShell the form will freeze until the program completes. "Start-Process" can run an external program without freezing the form.
User avatar
localpct
Posts: 397
Last visit: Thu Oct 27, 2022 5:57 am

Re: Project

Post by localpct »

Thanks for the reply!

So, let me clear this up. Let's call my project

Toolbox
The mainform ( aka toolbox.psf) is the core application that has the Asset Tools, Servers, Websites, and PCT Tools drop down.

I then import the PingIT, Temp Cleaner and Move-OU .psf files into the project and call them using the default method

$moveOUToolStripMenuItem_Click={
#TODO: Place custom script here
if ((Call-Move-OU_1_5_psf) -eq 'OK')
{

}
}


. When I do that, I cannot interact the toolbox app
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Project

Post by jvierra »

Any form you call from a form is NOT an application. It is just a script form that runs as a modal dialog. The main form will freeze until the dialog closes.
This topic is 8 years and 6 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