So for the Messagebox Form we have to run some code on the form load
Explaination
Do a test run to make sure that everything works. When it does, then we can continue.
So now we have to add functionallity to the Buttons
Cancel
Clicking cancel is basically changing your mind and therefore unchecks the Checkbox and re-enables the Builder Form while closing the Messagebox Form
But to answer the question "How would you like your cheese?"
We have choices Melted, Sliced, Shredded
Luckily the code for these three are the same
The Checkbox is already checked even before this Form loaded, so theres no more to do
So now we have Sauce and Cheese Groupboxes done. I left Meat alone except for asking how the Eggs are preferred done. (Scrambled, Over Easy, Sunny Side Up). And Asparagus asking if the Asparagus should be steamed or not.
For asparagus, I used the same format because it just wouldnt make sense to have a different style Messagebox to pop up
Now you are allowed to add any custom Messageboxes for whatever you want.
Next week I will go over Choosing Bread. Have a good weekend
Private Sub frmcheese_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Left = (Screen.PrimaryScreen.WorkingArea.Width - Me.Width) / 2
Me.Top = (Screen.PrimaryScreen.WorkingArea.Height - Me.Height) / 2
frmSandwhichBuilder.Enabled = False
Me.Text = frmSandwhichBuilder.Cheesename
End Sub
Explaination
Spoiler
Do a test run to make sure that everything works. When it does, then we can continue.
So now we have to add functionallity to the Buttons
Cancel
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
frmSandwhichBuilder.checktype.checked = False
frmSandwhichBuilder.Enabled = True
Me.Close()
End Sub
Clicking cancel is basically changing your mind and therefore unchecks the Checkbox and re-enables the Builder Form while closing the Messagebox Form
But to answer the question "How would you like your cheese?"
We have choices Melted, Sliced, Shredded
Luckily the code for these three are the same
frmSandwhichBuilder.Enabled = True
Me.Close()
The Checkbox is already checked even before this Form loaded, so theres no more to do
So now we have Sauce and Cheese Groupboxes done. I left Meat alone except for asking how the Eggs are preferred done. (Scrambled, Over Easy, Sunny Side Up). And Asparagus asking if the Asparagus should be steamed or not.
For asparagus, I used the same format because it just wouldnt make sense to have a different style Messagebox to pop up
Now you are allowed to add any custom Messageboxes for whatever you want.
Next week I will go over Choosing Bread. Have a good weekend
0 Comments On This Entry
Trackbacks for this entry [ Trackback URL ]
← January 2022 →
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 |
Tags
My Blog Links
Recent Entries
-
-
-
Menu Building Pt.4 Coding Custom Messageboxon Apr 15 2016 07:42 AM
-
-
Recent Comments
Search My Blog
6 user(s) viewing
6 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)



Leave Comment









|