Search found 44 matches

by gkhairallah
Sun May 16, 2021 10:57 am
Forum: PowerShell GUIs
Topic: Array Returning an extra element when running in winforms project
Replies: 12
Views: 5880

Re: Array Returning an extra element when running in winforms project

Thanks @jvierra! This is very helpful, and I appreciate your guidance on how to best think about this. You're right in that the more I got lost, the more I started injecting "info" at each step to try and figure out what's happening. I have since taken out the code from my app and I have i...
by gkhairallah
Sun May 16, 2021 9:54 am
Forum: PowerShell GUIs
Topic: Array Returning an extra element when running in winforms project
Replies: 12
Views: 5880

Re: Array Returning an extra element when running in winforms project

Thanks for the input Alexander. That will give me a few things to look for. My goal from this is to simply take some values from a datagrid, and bring them back to the main form for processing. I have been studying the following : https://www.sapien.com/blog/2013/10/01/powershell-studio-passing-and-...
by gkhairallah
Sun May 16, 2021 8:14 am
Forum: PowerShell GUIs
Topic: Array Returning an extra element when running in winforms project
Replies: 12
Views: 5880

Re: Array Returning an extra element when running in winforms project

After stating that I spent over 3 hours on it, I figured it was clear that I tried to go through the debugger. In any case, thanks. will do.
Posting here isn't usually my first resort, but my last one.
by gkhairallah
Sat May 15, 2021 11:58 pm
Forum: PowerShell GUIs
Topic: Array Returning an extra element when running in winforms project
Replies: 12
Views: 5880

Array Returning an extra element when running in winforms project

I have a function inside Globals.ps1. It should enumerate the value in keys that exist in that registry path. In this example, there are 2 keys in the registry.. When the function in Globals.ps1 runs, the correct number of entries is populated in the array. function GetGridProfiles() { Write-Verbose...
by gkhairallah
Fri May 07, 2021 3:00 pm
Forum: PowerShell Studio
Topic: Leave Event Always Triggering Twice
Replies: 2
Views: 5497

Re: Leave Event Always Triggering Twice

Thanks for the guidance Brittney! It appears that the culprit was the: $textbox_password.focus() which was inside the handler, and it was re-triggering the "Leave" event, as the password field has to switch from $textbox_password.Enabled = $false to $textbox_password.Enabled = $true. I fol...
by gkhairallah
Fri May 07, 2021 12:23 pm
Forum: PowerShell Studio
Topic: Leave Event Always Triggering Twice
Replies: 2
Views: 5497

Leave Event Always Triggering Twice

Product, version and build:2021 5.8.188 Operating system: Windows 10 PowerShell version(s): 5.1 Hi, I've been observing an odd behavior, and can't find the cause of it. I have a "Leave" event on a Textbox that triggers a function. For some reason, the whole event is always triggering twice...
by gkhairallah
Thu May 06, 2021 5:39 pm
Forum: PowerShell Studio
Topic: Referencing controls from Globals.ps1 or Startup.pss
Replies: 2
Views: 5508

Re: Referencing controls from Globals.ps1 or Startup.pss

Thanks for the explanation Brittney. That makes sense, I just wanted to be 100% sure so that I don't end up unnecessarily torturing myself :)
Will take a look at the blog posts as well.
Cheers!
by gkhairallah
Wed May 05, 2021 8:02 pm
Forum: PowerShell Studio
Topic: Referencing controls from Globals.ps1 or Startup.pss
Replies: 2
Views: 5508

Referencing controls from Globals.ps1 or Startup.pss

Hi, I have a newbie question: Is it by design that I cannot auto-complete form controls (from a psf file) within the project, from within the Globals.ps1 or Startup.pss? I know that those get merged on run, so theoretically, they should be able to see and reference the controls. I was hoping that I ...
by gkhairallah
Sun Nov 15, 2020 4:17 pm
Forum: PowerShell
Topic: get-process returning one user when packaged
Replies: 8
Views: 16345

Re: get-process returning one user when packaged

Yup, indeed it does (on a local admin, regardless of UAC restriction). Very cool. Thanks again @jvierra!
by gkhairallah
Sun Nov 15, 2020 12:53 pm
Forum: PowerShell
Topic: get-process returning one user when packaged
Replies: 8
Views: 16345

Re: get-process returning one user when packaged

Thanks @jvierra. Agreed. I have researched that specific point and opted to change my method.

Cheers,