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.
Locked
User avatar
localpct
Posts: 320
Joined: Wed Sep 09, 2015 12:53 pm

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
Joined: Wed Dec 03, 2014 2:26 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: 14614
Joined: Tue May 22, 2007 9:57 am
Answers: 2
Has voted: 1 time
Been upvoted: 3 times
Contact:

Re: Project

Post by jvierra »

Start-Process <process file name>

User avatar
localpct
Posts: 320
Joined: Wed Sep 09, 2015 12:53 pm

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 2135 times
toolboxtools.png
toolboxtools.png (16.87 KiB) Viewed 2135 times

jvierra
Posts: 14614
Joined: Tue May 22, 2007 9:57 am
Answers: 2
Has voted: 1 time
Been upvoted: 3 times
Contact:

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: 320
Joined: Wed Sep 09, 2015 12:53 pm

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: 14614
Joined: Tue May 22, 2007 9:57 am
Answers: 2
Has voted: 1 time
Been upvoted: 3 times
Contact:

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.

Locked