Search found 62 matches

by lontru
Tue Oct 01, 2019 2:15 am
Forum: PowerShell GUIs
Topic: datagridview - remove empty row to the left or make it smaller?
Replies: 4
Views: 232

Re: datagridview - remove empty row to the left or make it smaller?

my brain is little slow today...did some thinking and came up with this. Would this be the simple and fastest way? $textbox_SearchVendor_TextChanged={ # NOTE: Make sure you ignore the default watermark text when validating if($textboxWatermark.Text -eq $textboxWatermark.Tag) { $vendors = Get-ChildIt...
by lontru
Tue Oct 01, 2019 2:07 am
Forum: PowerShell GUIs
Topic: datagridview - remove empty row to the left or make it smaller?
Replies: 4
Views: 232

Re: datagridview - remove empty row to the left or make it smaller?

my next mission is to search in the grid
I will be using a textbox for the input and the result match showed below as i type in the textbox?

how would you code this?

Image
by lontru
Mon Sep 30, 2019 4:31 am
Forum: PowerShell GUIs
Topic: datagridview - remove empty row to the left or make it smaller?
Replies: 4
Views: 232

Re: datagridview - remove empty row to the left or make it smaller?

Is this the right way?

$datagridview_vendors.RowHeadersVisible = $false
by lontru
Mon Sep 30, 2019 3:17 am
Forum: PowerShell GUIs
Topic: datagridview - remove empty row to the left or make it smaller?
Replies: 4
Views: 232

datagridview - remove empty row to the left or make it smaller?

How do i remove this row or size it smaller? so i can use the space more efficient. https://i.imgur.com/tNVhRJo.png the code i use is below. $vendors = Get-ChildItem $SDpath -Directory | Select-Object Name $vendors_table = ConvertTo-DataTable -InputObject $vendors $datagridview_vendors.AutoSizeColum...
by lontru
Mon Apr 01, 2019 1:49 am
Forum: Windows PowerShell
Topic: Working with MAC address
Replies: 5
Views: 1248

Re: Working with MAC address

I needed to validate diff way to type a mac address socreated the function for that purpose.
by lontru
Tue Mar 26, 2019 3:41 am
Forum: Windows PowerShell
Topic: Working with MAC address
Replies: 5
Views: 1248

Re: Working with MAC address

created below function to return XX:XX:XX:XX:XX:XX if syntax is a valid mac Validate-MAC -MACAddress '01:23:45:67:89:ab' Validate-MAC -MACAddress '3D:F2:C9:A6:B3:00' Validate-MAC -MACAddress '001e.1324.683f' Validate-MAC -MACAddress '001E.1324.683F' Validate-MAC -MACAddress '00-25-86-DC-FD-3B' Valid...
by lontru
Tue Mar 26, 2019 2:42 am
Forum: Windows PowerShell
Topic: Working with MAC address
Replies: 5
Views: 1248

Working with MAC address

Hi Im working on a tool where i need the mac address in this syntax xx:xx:xx:xx:xx:xx I have below code to validate diff syntax but want it xx:xx:xx:xx:xx:xx so how to do this ? function Validate-MAC ($MACAddress) { $patterns = @( '^([0-9a-f]{2}:){5}([0-9a-f]{2})$' '^([0-9a-f]{2}-){5}([0-9a-f]{2})$'...
by lontru
Mon Mar 25, 2019 3:25 am
Forum: PowerShell GUIs
Topic: Ping/Tracert Gui - responsive forms
Replies: 4
Views: 379

Re: Ping/Tracert Gui - responsive forms

Think i understand it a little but seem to work $buttonStartJob_Click = { $Count = '5' $Device = $($textbox1.Text) $buttonStartJob.Enabled = $false Write-Host "$Device $Count" #Create a New Job using the Job Tracker Add-JobTracker -Name 'JobName' ` -JobScript { #-------------------------------------...
by lontru
Mon Mar 25, 2019 1:45 am
Forum: PowerShell GUIs
Topic: Marquee - progress bar how to use it?
Replies: 6
Views: 550

Re: Marquee - progress bar how to use it?

i see i will look into those sample code
by lontru
Mon Mar 25, 2019 1:24 am
Forum: PowerShell GUIs
Topic: Ping/Tracert Gui - responsive forms
Replies: 4
Views: 379

Re: Ping/Tracert Gui - responsive forms

I have tried the sample code from the blog and it works but my brain can gasp it. So i created a simple form and added the custom control "Button - Start Job" https://i.imgur.com/g4tMkah.png $buttonStartJob_Click={ $buttonStartJob.Enabled = $false #Create a New Job using the Job Tracker Add-JobTrack...