Search found 13684 matches

by jvierra
Wed Aug 07, 2019 12:13 pm
Forum: PowerShell GUIs
Topic: Copying whole row of DGV
Replies: 7
Views: 160

Re: Copying whole row of DGV

Also the user can just select the Row and type Ctrl-C and the row will be copied to the clipboard.

You can retrieve the row(s) in CSV form with this:

[system.windows.forms.clipboard]::GetText([System.Windows.Forms.TextDataFormat]::CommaSeparatedValue)
by jvierra
Wed Aug 07, 2019 11:58 am
Forum: PowerShell GUIs
Topic: Copying whole row of DGV
Replies: 7
Views: 160

Re: Copying whole row of DGV

Just get the row and format the output as needed with a "select-object" or "Format-Table" then copy to the clipboard.
by jvierra
Wed Aug 07, 2019 11:40 am
Forum: PowerShell GUIs
Topic: Formatting cells of a DataGridView best place for the code?
Replies: 12
Views: 371

Re: Formatting cells of a DataGridView best place for the code?

Very nice. You don't need some of the code. This does what you are trying to do: If ($this.Columns[$_.ColumnIndex].Name -eq 'ARTIST') { "-eq" is case insensitive and behaves better then the object method. Be careful with that when using C# code for an example. Much of what we can do easily in PowerS...
by jvierra
Wed Aug 07, 2019 9:45 am
Forum: PowerShell GUIs
Topic: Send a file to Powershell Studio exe (form): show name and extension
Replies: 9
Views: 234

Re: Send a file to Powershell Studio exe (form): show name and extension

if (([io.fileinfo]$commandarg).Extension -eq '.xmind') { $textboxResult.Text = 'XMind is the program you could open .XMind with' } else { $textboxResult.Text = 'no program found' } you have just demonstrated why you should almost never use interim variables. They make code harder to understand, mai...
by jvierra
Wed Aug 07, 2019 9:40 am
Forum: PowerShell GUIs
Topic: Send a file to Powershell Studio exe (form): show name and extension
Replies: 9
Views: 234

Re: Send a file to Powershell Studio exe (form): show name and extension

This is the correct way to do this in PowerShell. # get file information $file = [io.fileinfo]$commandarg $file.FullName $file.Name $file.Basename $file.DirectoryName $file.Extension #or ([io.fileinfo]$commandarg).Extension # get directory details $file.Directory.FullName # get all properties: $file...
by jvierra
Wed Aug 07, 2019 8:35 am
Forum: PowerShell Studio
Topic: PS Studio GUI unreadably small
Replies: 3
Views: 368

Re: PS Studio GUI unreadably small

Post questions about installation and configuration to the product support forum. The Sapien techs will give you the best answer to your issue.
by jvierra
Wed Aug 07, 2019 7:36 am
Forum: PowerShell GUIs
Topic: Formatting cells of a DataGridView best place for the code?
Replies: 12
Views: 371

Re: Formatting cells of a DataGridView best place for the code?

Please read the following short document:
by jvierra
Wed Aug 07, 2019 7:16 am
Forum: PowerShell GUIs
Topic: Formatting cells of a DataGridView best place for the code?
Replies: 12
Views: 371

Re: Formatting cells of a DataGridView best place for the code?

I think I now understand why you added this line: #Event Argument: $_ = [System.Windows.Forms.DataGridViewCellFormattingEventArgs] That is the e-> from the MSDN help. Thanks for your help I didn't add that. I just created the event in PSS and added the color assignments. Everything else is done by ...
by jvierra
Wed Aug 07, 2019 7:13 am
Forum: PowerShell GUIs
Topic: Formatting cells of a DataGridView best place for the code?
Replies: 12
Views: 371

Re: Formatting cells of a DataGridView best place for the code?

What I posted is not a function. It is the script block that Sapien adds to the controls event when the scrip is built. The comment in the script block explains what is available. PLease read the two links I posted very carefully until you understand what is being discussed and why. Until you unders...