Create the following application in VB.NET.The Form should contain the following menu Area Exit Circle Rectangle Square On selection of the menu option 'Circle',one form should be open in that form user enters radius into textboxand display area of circle in message box.On selection of the menu option 'Rectangle',one form should be open in that form user enters length and breadth into textboxand display area of rectangle in message box.On selection of the menu option 'Square',one form should be open in thatform user enters side into textboxand display area of circle in message box.
Public Class frmMain Private Sub CircleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CircleToolStripMenuItem.Click frmcircle.mdiparent = Me frmcircle.show() End Sub Private Sub RectangleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RectangleToolStripMenuItem.Click frmrectangle.MdiParent = Me frmrectangle.show() End Sub Private Sub SquareToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SquareToolStripMenuItem.Click frmsquare.mdiparent = Me frmsquare.show() End Sub Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click End End Sub Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub AriaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AriaToolStripMenuItem.Click End Sub End Class Public Class frmcircle Private Sub butcal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butcal.Click Dim R, A As Double R = Convert.ToDouble(txtradius.Text) A = (22 + R * R) \ 7 lblr.Text = A.ToString() End Sub Private Sub butclose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butclose.Click Me.Hide() Me.Dispose() End Sub End Class Public Class frmrectangle Private Sub butclose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butclose.Click Me.Hide() Me.Dispose() End Sub Private Sub butcal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butcal.Click Dim H, W, R As Double H = Convert.ToDouble(txth.Text) W = Convert.ToDouble(txtw.Text) R = (H * W) lblr.Text = R.ToString() End Sub Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click End Sub End Class Public Class frmsquare Private Sub butclose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butclose.Click Me.Hide() Me.Dispose() End Sub Private Sub butcal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butcal.Click Dim S, A As Double S = Convert.ToDouble(txtside.Text) A = S * S lblr.Text = A.ToString() End Sub End Class
Create the following application in VB.NET.The Form should contain the following menu Area Exit Circle Rectangle Square On selection of the menu option 'Circle',one form should be open in that form user enters radius into textboxand display area of circle in message box.On selection of the menu option 'Rectangle',one form should be open in that form user enters length and breadth into textboxand display area of rectangle in message box.On selection of the menu option 'Square',one form should be open in thatform user enters side into textboxand display area of circle in message box.
Reviewed by
on
April 27, 2015
Rating: