Advertisement
stevennathaniel

Menampilkan Jendela Beserta Button GUI

Aug 7th, 2015
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [void] [reflection.assembly]::loadwithpartialname("System.Windows.Forms")
  2.  
  3. $form = new-object Windows.Forms.Form
  4.  
  5. $form.text = "Form Pertama Ku"
  6.  
  7. $button = new-object windows.forms.button
  8.  
  9. $button.text = "Tekan Tombol Ini"
  10.  
  11. $button.dock = "fill"
  12.  
  13. $button.add_click({$form.close()})
  14.  
  15. $form.controls.add($button)
  16.  
  17. $form.add_shown({$form.Activate()})
  18.  
  19. $form.showdialog()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement