Import-Module WPK
New-Window -Name "WPK" -Title "WPK Snippets" -Width 400 -Height 100 -Show {
New-Grid -Rows 28,28 -Columns 75,300* {
New-TextBlock -Text "Folder Path:" -Row 1 -Column 0 -Margin 3
New-TextBox -Name txtUserName -Width 300 -Row 1 -Column 1 -Margin 3
New-Button -Content "Folder" -Name btnFolder -Row 0 -Column 1 -Margin 3 -Width 300 -On_Click {
$obj = New-FolderBrowserDialog -RootFolder "MyComputer"
$obj.ShowDialog()
$txtUserName = $Window | Get-ChildControl txtUserName
$txtUserName.Text = $obj.SelectedPath }
}
}
You should see something similar to the following:
Clicking on the button brings up the familiar "Browse For Folder" Dialog box.
Select a folder and the path is placed in the appropriate textbox.
Enjoy!
4 comments:
Thanks
You are welcome!
Rip Blu-ray for Mac with Blu-ray Ripper for Mac, snow Leopard included.- Free Download and have a try.
Ultimate Blu-ray video converter is actually an 3-in-one software including Blu-ray Ripper, DVD Ripper and Video Converter.
Blu-ray ripper enables you directly rip and convert your Blu-ray movies and general DVDs, even the protected DVDs and Blu-ray DVDs into other popular audio and video formats.
This is really very informative site and all your articles are hot as hell, lots of useful stuff. One thing I just want to say is that your FatBeard's Adventures in PowerShell Blog is so perfect to me.
--------------------------
Our website: Holdem Poker Playing
Post a Comment