here are the form i used, Public Class frmMain     Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load           'Display the Dormitory price in the list box         lstDormitories.Items.Add("Allen Hall - 2,500.00 ")         lstDormitories.Items.Add("Pike Hall - 2,200.00")         lstDormitories.Items.Add("Farthing Hall - 2,100.00")         lstDormitories.Items.Add("UniversitySuites - 2,800.00")       End Sub       Private Sub btnAddDormitory_Click(sender As Object, e As EventArgs) Handles btnAddDormitory.Click           ' if user don't choose any price in list box          Select Case lstDormitories.SelectedIndex             Case -1                 MessageBox.Show("Select A Dormitory Please!")         End Select           'Determine the value in Module and display the value of price to lblDormitory          Select Case lstDormitories.SelectedIndex             Case 0                 lblDormitory.Text = mdlsample.Allen_Hall.ToString("c2")             Case 1                 lblDormitory.Text = mdlsample.Pike_Hall.ToString("c2")             Case 2                 lblDormitory.Text = mdlsample.Farthing_Hall.ToString("c2")             Case 3                 lblDormitory.Text = mdlsample.UniversitySuites.ToString("c2")         End Select       End Sub       Private Sub btnViewMP_Click(sender As Object, e As EventArgs) Handles btnViewMeal.Click         'Display the second form (Meal Plan)         Me.Hide()         frmMeal.Show()       End Sub       Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click           'Clear all the label except the list box         lblDormitory.Text = String.Empty         lblMealPlan.Text = String.Empty         lblTotalCost.Text = String.Empty       End Sub       Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click           ' Exit Program          Application.Exit()       End Sub End Class   Public Class frmMeal     Private Sub frmMeal_Load(sender As Object, e As EventArgs) Handles MyBase.Load         'Display the Weekly Meal Plan price in the list box         lstMealPlans.Items.Add("7 Meals - $1,560.00")         lstMealPlans.Items.Add("14 Meals - $2,095.00")         lstMealPlans.Items.Add("Unlimited Meals - $2,500.00")     End Sub     Private Sub btnAddMealPlan_Click(sender As Object, e As EventArgs) Handles btnAddMealPlan.Click         Dim MealPlans As Decimal         'Declare the variable          ' if user doesn't choose any Meal Plan then display message box          Select Case lstMealPlans.SelectedIndex             Case -1                 MessageBox.Show("Select A Meal Plan Please!")         End Select           ' Determine the value in Module and display the value of price to lblMeal_Plan in form Main          Select Case lstMealPlans.SelectedIndex             Case 0                 frmMain.lblMealPlan.Text = mdlsample.Meal_Plan_7.ToString("c2")                 MealPlans = mdlsample.Meal_Plan_7.ToString("c2")             Case 1                 frmMain.lblMealPlan.Text = mdlsample.Meal_Plan_14.ToString("c2")                 MealPlans = mdlsample.Meal_Plan_14.ToString("c2")             Case 2                 frmMain.lblMealPlan.Text = mdlsample.Meal_Plan_Unilimited.ToString("c2")                 MealPlans = mdlsample.Meal_Plan_Unilimited.ToString("c2")         End Select         'Calculate the total of Dormitory and Meal Plan and display it to form Main           frmMain.lblTotalCost.Text = (frmMain.lblDormitory.Text + MealPlans).ToString("c2")         'Display to the form Main (frmMain)         Me.Hide()         Form1.Show()     End Sub     Private Sub frmMealPlans_Load(sender As Object, e As EventArgs) Handles MyBase.Load         'Display the Weedkly Meal Plan price in the list box         lstMealPlans.Items.Add("7 Meals - 1,560.00 ")         lstMealPlans.Items.Add("14 Meals - 2,095.00")         lstMealPlans.Items.Add("Unlimited Meals - 2,500.00")     End Sub     Private Sub btncClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click         ' Close program         Me.Close()     End Sub End Class     Module mdlSample     'Public constants for Dormitory prices and weedkly meal plan prices     Public Const Allen_Hall As Decimal = 2500D     Public Const Pike_Hall As Decimal = 2200D     Public Const Farthing_Hall As Decimal = 2100D     Public Const UniversitySuites As Decimal = 2800D       Public Const Meal_Plan_7 As Decimal = 1560D     Public Const Meal_Plan_14 As Decimal = 2095D     Public Const Meal_Plan_Unilimited As Decimal = 2500D   End Module   I have no errors but when I start the program it is blank. How do i fix this?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

here are the form i used,

Public Class frmMain

    Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load

 

        'Display the Dormitory price in the list box

        lstDormitories.Items.Add("Allen Hall - 2,500.00 ")

        lstDormitories.Items.Add("Pike Hall - 2,200.00")

        lstDormitories.Items.Add("Farthing Hall - 2,100.00")

        lstDormitories.Items.Add("UniversitySuites - 2,800.00")

 

    End Sub

 

    Private Sub btnAddDormitory_Click(sender As Object, e As EventArgs) Handles btnAddDormitory.Click

 

        ' if user don't choose any price in list box 

        Select Case lstDormitories.SelectedIndex

            Case -1

                MessageBox.Show("Select A Dormitory Please!")

        End Select

 

        'Determine the value in Module and display the value of price to lblDormitory 

        Select Case lstDormitories.SelectedIndex

            Case 0

                lblDormitory.Text = mdlsample.Allen_Hall.ToString("c2")

            Case 1

                lblDormitory.Text = mdlsample.Pike_Hall.ToString("c2")

            Case 2

                lblDormitory.Text = mdlsample.Farthing_Hall.ToString("c2")

            Case 3

                lblDormitory.Text = mdlsample.UniversitySuites.ToString("c2")

        End Select

 

    End Sub

 

    Private Sub btnViewMP_Click(sender As Object, e As EventArgs) Handles btnViewMeal.Click

        'Display the second form (Meal Plan)

        Me.Hide()

        frmMeal.Show()

 

    End Sub

 

    Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click

 

        'Clear all the label except the list box

        lblDormitory.Text = String.Empty

        lblMealPlan.Text = String.Empty

        lblTotalCost.Text = String.Empty

 

    End Sub

 

    Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click

 

        ' Exit Program 

        Application.Exit()

 

    End Sub

End Class

 

Public Class frmMeal

    Private Sub frmMeal_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        'Display the Weekly Meal Plan price in the list box

        lstMealPlans.Items.Add("7 Meals - $1,560.00")

        lstMealPlans.Items.Add("14 Meals - $2,095.00")

        lstMealPlans.Items.Add("Unlimited Meals - $2,500.00")

    End Sub

    Private Sub btnAddMealPlan_Click(sender As Object, e As EventArgs) Handles btnAddMealPlan.Click

        Dim MealPlans As Decimal

        'Declare the variable 

        ' if user doesn't choose any Meal Plan then display message box 

        Select Case lstMealPlans.SelectedIndex

            Case -1

                MessageBox.Show("Select A Meal Plan Please!")

        End Select

 

        ' Determine the value in Module and display the value of price to lblMeal_Plan in form Main 

        Select Case lstMealPlans.SelectedIndex

            Case 0

                frmMain.lblMealPlan.Text = mdlsample.Meal_Plan_7.ToString("c2")

                MealPlans = mdlsample.Meal_Plan_7.ToString("c2")

            Case 1

                frmMain.lblMealPlan.Text = mdlsample.Meal_Plan_14.ToString("c2")

                MealPlans = mdlsample.Meal_Plan_14.ToString("c2")

            Case 2

                frmMain.lblMealPlan.Text = mdlsample.Meal_Plan_Unilimited.ToString("c2")

                MealPlans = mdlsample.Meal_Plan_Unilimited.ToString("c2")

        End Select

        'Calculate the total of Dormitory and Meal Plan and display it to form Main

 

        frmMain.lblTotalCost.Text = (frmMain.lblDormitory.Text + MealPlans).ToString("c2")

        'Display to the form Main (frmMain)

        Me.Hide()

        Form1.Show()

    End Sub

    Private Sub frmMealPlans_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        'Display the Weedkly Meal Plan price in the list box

        lstMealPlans.Items.Add("7 Meals - 1,560.00 ")

        lstMealPlans.Items.Add("14 Meals - 2,095.00")

        lstMealPlans.Items.Add("Unlimited Meals - 2,500.00")

    End Sub

    Private Sub btncClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click

        ' Close program

        Me.Close()

    End Sub

End Class

 

 

Module mdlSample

    'Public constants for Dormitory prices and weedkly meal plan prices

    Public Const Allen_Hall As Decimal = 2500D

    Public Const Pike_Hall As Decimal = 2200D

    Public Const Farthing_Hall As Decimal = 2100D

    Public Const UniversitySuites As Decimal = 2800D

 

    Public Const Meal_Plan_7 As Decimal = 1560D

    Public Const Meal_Plan_14 As Decimal = 2095D

    Public Const Meal_Plan_Unilimited As Decimal = 2500D

 

End Module

 

I have no errors but when I start the program it is blank. How do i fix this?

 

Expert Solution
Step 1

There could be several reasons why your program is blank when you start it. Here are some possible solutions:

  1. Check if the forms are set as the startup form: Make sure that the form you want to display first is set as the startup form. You can do this by right-clicking on the form in the Solution Explorer, selecting "Set as StartUp Form", and then running the program again.

  2. Check if the controls are visible: Make sure that the controls on the form are set to Visible. You can do this by selecting the control and checking the Visible property in the Properties window.

  3. Check if the controls are properly positioned: Make sure that the controls are properly positioned on the form. If they are positioned outside the visible area of the form, they may not be visible when the form is displayed.

  4. Check if the controls are properly sized: Make sure that the controls are properly sized. If they are too small, they may not be visible when the form is displayed.

  5. Check if the controls are properly anchored: Make sure that the controls are properly anchored. If they are not anchored to the edges of the form, they may not be visible when the form is resized.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education