Search found 14869 matches

by jvierra
Thu Jun 24, 2021 2:17 am
Forum: PowerShell
Topic: while loop with or statement
Replies: 2
Views: 2050

Re: while loop with or statement

That kind of statement never needs to be tested for null.

while ($log_in -eq 'JA99878')

No need for null test as it only runs when equal and will quit on not equal or null.
by jvierra
Wed Jun 23, 2021 11:17 am
Forum: PowerShell GUIs
Topic: Systray Application
Replies: 16
Views: 4572

Re: Systray Application

What is a Sapien GUI?

The SysTray is the same thing as "Toast". Systray creates Toast popups. They are the same thing and PowerShell can use both.

What is a Sapien GUI?
by jvierra
Tue Jun 22, 2021 5:30 pm
Forum: PowerShell GUIs
Topic: Systray Application
Replies: 16
Views: 4572

Re: Systray Application

If you hide any form that has a systray declared in the form then the systray will not work as expected. To do this then you wiill have to manually create the systray icon and object outside of the form then if the systray object is global you can manage it from the form.
by jvierra
Tue Jun 22, 2021 5:27 pm
Forum: PowerShell GUIs
Topic: Update progressbar from function?
Replies: 1
Views: 1203

Re: Update progressbar from function?

A function is executed in the context it is called from no matter where it is stored or stated. All functions always execute in the local context and can change contexts when the function needs to do that. Usually context changes are done by execution on a new thread but global objects can represent...
by jvierra
Tue Jun 22, 2021 2:41 am
Forum: PowerShell GUIs
Topic: Urgent!! How to use invoke-expression functionName when I click Button-Start Job in
Replies: 1
Views: 1192

Re: Urgent!! How to use invoke-expression functionName when I click Button-Start Job in

You cannot call a function that is not in an available module or included in the job script.
by jvierra
Mon Jun 21, 2021 10:51 pm
Forum: PowerShell
Topic: Populating datagridview from an object?
Replies: 1
Views: 1341

Re: Populating datagridview from an object?

That depends on what you want to load. The object is complex and hierarchical.
by jvierra
Sat Jun 19, 2021 7:06 am
Forum: PowerShell GUIs
Topic: Systray Application
Replies: 16
Views: 4572

Re: Systray Application

Works fine for me.

Reset the "Opacity" of the form. 0% with a NotifyIcon causes odd behaviors.
by jvierra
Sat Jun 19, 2021 12:51 am
Forum: PowerShell GUIs
Topic: Systray Application
Replies: 16
Views: 4572

Re: Systray Application

Here is a fixed version that displays in a message box. Removed reductant NI control.
by jvierra
Sat Jun 19, 2021 12:41 am
Forum: PowerShell GUIs
Topic: Systray Application
Replies: 16
Views: 4572

Re: Systray Application

Works fine for me. It writes the outtput to the console.
by jvierra
Fri Jun 18, 2021 5:42 pm
Forum: PowerShell GUIs
Topic: functions and parameters
Replies: 8
Views: 1918

Re: functions and parameters

You cannot use Write-Host to display anything in a GUI. You have to use a control and assign the text to it.