Search found 11 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
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.
by jvierra
Tue May 04, 2021 5:33 am
Jump to forum
Jump to topic

Re: Dynamic form location based on monitor size?

[System.Windows.Forms.Screen]::AllScreens[0].bounds.width - ($f.bounds.Width +50)

This gets the left upper target position for the new location.
by jvierra
Sat May 08, 2021 8:07 am
Jump to forum
Jump to topic

Re: Run GUI with build in credentials

You can set the package to run with alternate credentials when you package the script. See the documentation for instructions.
-