Click here to Skip to main content
15,888,351 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Drag drop multiple rows between datagrids Pin
Eddy Vluggen28-Nov-14 5:26
professionalEddy Vluggen28-Nov-14 5:26 
GeneralRe: Drag drop multiple rows between datagrids Pin
tommydk29-Nov-14 6:19
tommydk29-Nov-14 6:19 
GeneralRe: Drag drop multiple rows between datagrids Pin
Eddy Vluggen30-Nov-14 4:46
professionalEddy Vluggen30-Nov-14 4:46 
GeneralRe: Drag drop multiple rows between datagrids Pin
tommydk12-Feb-15 10:18
tommydk12-Feb-15 10:18 
GeneralRe: Drag drop multiple rows between datagrids Pin
Eddy Vluggen12-Feb-15 11:37
professionalEddy Vluggen12-Feb-15 11:37 
Questionhow to convert excel sheet to xml Pin
Member 1126441326-Nov-14 0:37
Member 1126441326-Nov-14 0:37 
AnswerRe: how to convert excel sheet to xml Pin
Eddy Vluggen26-Nov-14 8:15
professionalEddy Vluggen26-Nov-14 8:15 
Questioni need help with a vb project anything helps! :) Pin
Member 1126438325-Nov-14 17:49
Member 1126438325-Nov-14 17:49 
Im completing a project for my VB class and kind of lost at some things.. these are the requirements:



Julia really liked the How Big is My Room app but realized it would be much
better if she could calculate the cost of ALL of her rooms in the same window. She would keep a
similar layout, but change the program to handle a list of rooms, displaying the size and cost of all
of the rooms and a total cost to resurface the floors in her entire home.
1.
She knows that if she measures the length and width of each room, she can determine the area or
square-footage. (roomSize = roomWidth * roomLength)
2.
To get the price for each room she multiplies the area of the room times the price of the material
(totalCost = roomSize * costOfMaterial)
3.
Presents the user with a picture of carpet or other flooring material (you will need to find an
images on the World Wide Web and download it. Must be in JPG,PNG,GIF,TIF format)
a.
b. Present the user the option to enter her first name
c. Present the user the option to enter her last name
d. Present the user the option to enter the room name
e. Present the user the option to enter the room width (in feet)
f. Present the user the option to enter the room length (in feet)
1) The picture must change to the corresponding floor type
2) The cost of material must change
3) The cost per room for each room must change and be displayed properly
4) The output totals should reflect the change
i. When a user changes a floor type…
Present the user the option to choose a floor type using radio buttons. The text of the radio
button should reflect the type and cost per sq/ft for that type.
g.
Present a list of rooms in a list box. Each room in the list box will be indicated by its room
name
h.
i. Use other listboxes to keep track of the length, width and total cost of a room.
Presents the user the option to submit the entry with a button by clicking with the mouse or
pressing the enter key.
j.Check to make sure all boxes are filled in. Warn the user with a message box that
states "Please enter something in all boxes" (or a similar message) -- (hint: if
textbox1.text <> "" and textbox2.text <> "" then…)
i.
Check to make sure the user has chosen a floor type. Warn the user with a message
that states "Please choose a Floor Type first!" (or a similar message) -- (hint: if
radio1.checked = true then…)

iii. Enter the room information to the appropriate list boxes
a) First Name "Julia"
b) Last Name "Anderson"
1) If the user provides the following input
iv. Output as indicated below…
k. When the user clicks the button…
4. Create a Visual Basic 2012 Program for Julia that does the following
i) "Hello Julia, the Anderson home estimate:"
ii) "Total number of Rooms: 00"
iii) "Total Square Footage: 0.0 sq/ft"
iv) "Total cost to resurface: $0.00"
a) The output should be displayed as follows
i. Wood Floors: $5.00 sq/ft
a. When the form loads, you will need to set the cost of the material and radio buttons text
Programming Assignment #3 - How Big are My Rooms?
i. Wood Floors: $5.00 sq/ft
ii. Carpet: $3.00 sq/ft
iii. "Carpet: $3.00 sq/ft"
iv. "Wood: $5.00 sq/ft"
Other notes:
• The program requires the Option Strict compiler directive


and my code I have so far is :
VB
Option Strict On

Public Class fmResurface
    Public Const dblWoodFlooring As Double = 5D
    Public Const dblCarpetFlooring As Double = 3D ' This class variable doesnt change and is available througout app'
    Dim dbldefaultWoodcost As Double
    Dim dbldefaultcarpetcost As Double
    Private Sub Label1_Click(sender As Object, e As EventArgs) Handles lblOutput.Click

    End Sub

    Private Sub Label1_Click_1(sender As Object, e As EventArgs) Handles lblOutputNumberRooms.Click

    End Sub

    Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GBFloorType.Enter

    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        dbldefaultcarpetcost = dblCarpetFlooring
        dbldefaultWoodcost = dblWoodFlooring

    End Sub

    Private Sub Label1_Click_2(sender As Object, e As EventArgs) Handles Label1.Click

    End Sub

    Private Sub btnEnter_Click(sender As Object, e As EventArgs) Handles btnEnter.Click
        Dim strFirstName As String
        Dim strLastName As String
        Dim strRoomName As String
        Dim strRoomWidth As String
        Dim strRoomLength As String
        Dim dbltotalcost As Double

        strFirstName = txtFirstName.Text
        strLastName = txtLastName.Text
        strRoomName = txtRoomName.Text
        strRoomLength = txtRoomLength.Text
        strRoomWidth = txtRoomWidth.Text


        If strFirstName <> "" And strLastName <> "" And strRoomLength <> "" And strRoomName <> "" And strRoomWidth <> "" Then
            MessageBox.Show("Enter data into boxes!")
        End If
        dbltotalcost = Val(txtRoomLength.Text) * Val(txtRoomWidth.Text)
            If RBWoodFloor.Checked = False And RBCarpet.Checked = False Then MessageBox.Show("Choose a floor type!")
            If RBWoodFloor.Checked = True Then dbldefaultWoodcost = dblWoodFlooring
            If dbldefaultWoodcost = dblWoodFlooring Then Call lbRoomName.Items.Add(txtRoomName.Text)
            If dbldefaultWoodcost = dblWoodFlooring Then Call lbRoomLength.Items.Add(txtRoomLength.Text)
            If dbldefaultWoodcost = dblWoodFlooring Then Call lbRoomWidth.Items.Add(txtRoomWidth.Text)
            If dbldefaultWoodcost = dblWoodFlooring Then Call lbTotalCost.Items.Add(dbltotalcost * dblWoodFlooring)
ElseIf dbldefaultcarpetcost = dblCarpetFlooring Then Call lbTotalCost.Items.Add(dbltotalcost * dblCarpetFlooring)
        If RBCarpet.Checked = True Then dbldefaultcarpetcost = dblCarpetFlooring
            If dbldefaultcarpetcost = dblCarpetFlooring Then Call lbRoomName.Items.Add(txtRoomName.Text)
            If dbldefaultcarpetcost = dblCarpetFlooring Then Call lbRoomLength.Items.Add(txtRoomLength.Text)
            If dbldefaultcarpetcost = dblCarpetFlooring Then Call lbRoomWidth.Items.Add(txtRoomWidth.Text)

            End
    End Sub

    Private Sub lbTotalCost_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lbTotalCost.SelectedIndexChanged

    End Sub

    Private Sub RBWoodFloor_CheckedChanged(sender As Object, e As EventArgs) Handles RBWoodFloor.CheckedChanged
        If RBWoodFloor.Checked Then pccarpet.Image = My.Resources.floor

    End Sub

    Private Sub RBCarpet_CheckedChanged(sender As Object, e As EventArgs) Handles RBCarpet.CheckedChanged
        If RBCarpet.Checked Then pccarpet.Image = My.Resources.nice


    End Sub

    Private Sub pccarpet_Click(sender As Object, e As EventArgs) Handles pccarpet.Click



    End Sub

    Private Sub lbRoomName_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lbRoomName.SelectedIndexChanged

    End Sub

    Private Sub txtFirstName_TextChanged(sender As Object, e As EventArgs) Handles txtFirstName.TextChanged

    End Sub
End Class

Tia Lawrence

AnswerRe: i need help with a vb project anything helps! :) Pin
Eddy Vluggen26-Nov-14 8:19
professionalEddy Vluggen26-Nov-14 8:19 
GeneralRe: i need help with a vb project anything helps! :) Pin
Member 1126438326-Nov-14 8:31
Member 1126438326-Nov-14 8:31 
GeneralRe: i need help with a vb project anything helps! :) Pin
Eddy Vluggen26-Nov-14 10:27
professionalEddy Vluggen26-Nov-14 10:27 
GeneralRe: i need help with a vb project anything helps! :) Pin
rx7man1-Dec-14 9:30
rx7man1-Dec-14 9:30 
Questionwebbrowser class, automation, document complete Pin
jkirkerx23-Nov-14 13:56
professionaljkirkerx23-Nov-14 13:56 
AnswerRe: webbrowser class, automation, document complete [solved] Pin
jkirkerx23-Nov-14 16:58
professionaljkirkerx23-Nov-14 16:58 
AnswerRe: webbrowser class, automation, document complete Pin
Richard Deeming24-Nov-14 2:46
mveRichard Deeming24-Nov-14 2:46 
GeneralRe: webbrowser class, automation, document complete Pin
jkirkerx24-Nov-14 9:51
professionaljkirkerx24-Nov-14 9:51 
Questionexcel data validation using xml Pin
Member 1125000520-Nov-14 15:40
Member 1125000520-Nov-14 15:40 
AnswerRe: excel data validation using xml Pin
Chris Quinn20-Nov-14 20:41
Chris Quinn20-Nov-14 20:41 
Questionhow to get SQL DATA DIRECTORY PATH USING VB.NET?? Pin
yogeshysankar20-Nov-14 1:39
yogeshysankar20-Nov-14 1:39 
AnswerRe: how to get SQL DATA DIRECTORY PATH USING VB.NET?? Pin
Otekpo Emmanuel20-Nov-14 11:37
Otekpo Emmanuel20-Nov-14 11:37 
GeneralRe: how to get SQL DATA DIRECTORY PATH USING VB.NET?? Pin
yogeshysankar20-Nov-14 17:48
yogeshysankar20-Nov-14 17:48 
AnswerRe: how to get SQL DATA DIRECTORY PATH USING VB.NET?? Pin
Chris Quinn20-Nov-14 20:40
Chris Quinn20-Nov-14 20:40 
Questionhow to get SQL DATA DIRECTORY PATH USING VB.NET Pin
yogeshysankar20-Nov-14 1:38
yogeshysankar20-Nov-14 1:38 
QuestionArrays in vb Pin
Otekpo Emmanuel19-Nov-14 4:13
Otekpo Emmanuel19-Nov-14 4:13 
AnswerRe: Arrays in vb Pin
Tim Carmichael19-Nov-14 4:31
Tim Carmichael19-Nov-14 4:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.