Hello, I attend an online college i desperately need some help in creating a progam that displays the square and square of a number. By the way, I'm new to this (1 months) and i'm studying computer informations and this visual basic 6.0 is giving me a hard time...lol...Any way, below is the assignment and what i have so far...Please don't laugh at me trying!
a)create an application that displays the square and square root of a number.The application must have 2 forms.
b)One of the forms should resemble a standard dialog box which prompts for his or her name.
c)The name must be displayed on the main form when the main form is run
d)The main form should include a square/square root button, print button and exit button.
e)InputBox function should be used in the square/square root button to prompt user for number. The application should then display both the square and square root of the number
f)Print button shoud send the focus to the square/square root button
Here is what i have so far...
I have created a dialog box
Private Sub cmdOK_Click()
strName = txtName.Text
frmWelcome.Show
Unload frmName
End Sub
Private Sub Form_Load()
frmName.Left = (Screen.Width - frmName.Width) / 2
frmName.Top = (Screen.Height - frmName.Height) / 2
End Sub
Private Sub txtName_Change()
End Sub
...................
For my main form i have the coding which displays the name and a hello message
Private Sub Form_Load()
Const conMsg1 As String = "Hello "
lblWelcome.Caption = conMsg1 & strName & "," & vbNewLine
End Sub
I'm trying to figure out how to code the square/square button to prompt the user for the number and display the results on the main form. I already have the coding for the print and exit button.
.................
Please be patient i'm new at this. If anyone can help me i will aprreciate it.
Thx-Jessica