Search found 33 matches

Return

by jvierra
Mon Jul 13, 2015 5:09 pm
Jump to forum
Jump to topic

Re: DataGridView Saving and Printing

Same thing:
PowerShell Code
Double-click the code block to select all.
$datagridview1.Rows |
    select -expand DataBoundItem |
    Format-Table -Auto |
    Out-String |
    Out-File printfile.txt
by jvierra
Thu May 11, 2017 8:06 am
Jump to forum
Jump to topic

Re: GUI: Progress Multiple Com Objects/Progress Bar - Responsive Form

What does you jobscript look like? Did you try mu test?

$jobscript = { Get-ChildItem$env:ProgramFiles -recurse }

In the completed script just do this.

Code: Select all

$Competed = {
Param($job)
$res = $job | Receive-Job
[System.Windows.Forms.MessageBox]::Show( $res.Count)
}
by jvierra
Fri Oct 12, 2018 4:01 am
Jump to forum
Jump to topic

Re: Select All Items in a CheckedListBox

Code: Select all

# check all items
(0..($checkedlistbox1.Items.Count -1)) | %{ $checkedlistbox1.SetItemChecked($_,$true)}
by jvierra
Fri Oct 09, 2020 11:03 pm
Jump to forum
Jump to topic

Re: Disabled Button Color

Simple. Just set the backcolor property of the button or almost any other control.
by jvierra
Sun Nov 15, 2020 1:27 pm
Jump to forum
Jump to topic

Re: get-process returning one user when packaged

This should always work:

(Get-WmiObject Win32_Process -filter "Name = 'powershell.exe'").GetOwner().User
by jvierra
Sun Nov 15, 2020 5:57 pm
Jump to forum
Jump to topic

Re: get-process returning one user when packaged

I suspect that Get-Process should also work as it is built on top of the WMI class but the security restrictions on the Net Framework classes for the CmdLets may be rest6rticting this. When some CmdLet fails then direct access via WMI may help.
by jvierra
Wed Dec 16, 2020 6:26 am
Jump to forum
Jump to topic

Re: Dynamically adding a column to a CSV output file

A CSV cannot have a variable number of columns per row. You will need to determine the number of columns in advance. This is an exercise in data relations and would normally be done with two CSV files that would be joined on the relational key. To learn what a CSV is you can start with the following...
by jvierra
Tue Feb 02, 2021 10:24 am
Jump to forum
Jump to topic

Re: Refresh Gridview, focus on row selected in middle of grid (scrollbar)

https://docs.microsoft.com/en-us/dotnet ... ngRowIndex

$dataGridView1.FirstDisplayedScrollingRowIndex = $dataGridView1.SelectedRows[0].Index
by jvierra
Sun Apr 04, 2021 3:27 am
Jump to forum
Jump to topic

Re: Add a calculated field to result data from a database

Here is a simple example that doesn't alter the table after it is built except to assign the correct values. function Update-Grid_Database4_ComputersTable{ param( [Parameter(Mandatory)] [string[]]$ComputerName ) $connStr = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database.mdb;Password=;User ID=...
by jvierra
Mon Apr 05, 2021 6:48 pm
Jump to forum
Jump to topic

Re: PowerShell GUI - Hide actual URLs in RichTextBox

A little investigation shows that you cannot create hidden text in the RichTextControl. This may be for security reasons.