In this second part of this blog series I will show you how to make the user part of the form.
As I said in part 01 I like group boxes.
So we start to create two Groupboxes.
One for the Given name and one for Surname.
Just drag a GroupBox from Controls toolbox to the form just under the User Information GroupBox that we created in part 01.
Then do the same with a another GroupBox and put it at the right side of the fist one.
As in the picture bellow.
When these are created, click on the first GroupBox and change the following properties:
Text: Given Name
Then change the second one to:
Now it’s time to add TextBoxes to Given Name and Surname.
Just drag a TextBox from the Control Toolbox and under the Given name GroupBox.
Like the picture bellow. And when it is where you want it just drop it.
Then drag the TextBox in the right corer to the right side of the GroupBox.
When the Given Name TextBox is in place. Do the same thing with the Surname TextBox.
When finished with that it’s time to give those TextBoxes new names.
Click on the first text box in the Givenname GroupBox.
Go to the properties and change:
Then change the second textBox to:
Now we have two TextBoxes in our Form.
To speed things up a little bit we can copy the two TextBoxes we just created including GroupBoxes for our next step.
Displayname and Description
Go to the form and place the pointer just left of the Given Name, press the left mouse button and drag the mouse to just under the lower right of the Surname GroupBox
and drop it.
Now it should look like the picture above.
Pres Ctrl-C and then Ctrl-V
Now you will get a new set of the copied Given name and Surname just in front of the old one. Click on the four arrows like in the picture above and drag everything to a new space bellow Given name and Surname.
It’s time to change the text and name for both the GroupBoxes and TextBoxes for our new controls.
Click on the copied Given name GroupBox, go to Properties and change it to:
Do the same thing with the copied Surname GroupBox and change these properties:
And then we have the both TextBoxes left.
The Displayname TextBox
The Description TextBox
The form should look like this now:
For the Telephone and Password TextBoxes we will do the same copy procedure.
Copy the Given name and Surname Groupboxes and TextBoxes as you did before.
Drag them to below the Displayname GroupBox and drowp it.
Now we have these things left:
- Enabled (CheckBox)
- OU (ComboBox)
- Country (ComboBox)
- Office (ComboBox)
- Status (RichtextBox)
- Status Bar (StatusBar)
Now add four GroupBoxes as the picture below.
Then change the properties as bellow.
It’s time to add ComboBoxes to the OU, Country and Office GroupBoxes.
Drag and drop them in the right GroupBoxes and then drag them so they will fit in the GroupBox. Like the picture below.
Change the properties for these ComboBoxes:
Add a CheckBox to the Enabled GroupBox.
Change the following properties:
And move the CheckBox to the middle of Enabled GroupBox.
Drag a RichTextBox from the Controls Toolbox to the status GroupBox and drag the corners so it fit the status GroupBox as the picture bellow.
Change the property
Then it’s only the StatusBar left for the making of the form for this part of the blog series.
Drag and drop a StatusBar to the lower left corner of the form.
Change the properties
The form is now ready for this stage and have an okay look.
We will change it a bit in the next part, before we starts to add own code to the script.
You can find my PowerShell studio file here.
This is the end of part 02.
Part 01 can be found here.