I was confused in my program here, I want to transfer the inputted string text from a from to display it to the other form. I made a class library here to code my function but to return the value of inputted string. But my problem is how can I display this string to the form.
I got 2 forms here and 1 class library.
frmMain - my main form and used to open the input form and display the text that is typed on input form (that should be the case but i got problems here)
frmInput - this serve as a input tool for the string.
ClassLibrary - my class (operation) and function (name) are here.
My Code:
------------------------------------
Imports ClassLibrary
Public Class frmInput
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
Operation.Name(txtBoxInput.Text)
Me.Close()
End Sub
End Class
-----------------------------------
Public Class Operation
Public Shared Function Name(ByVal myname As String) As String
Return myname
End Function
End Class
-----------------------------------
mports ClassLibrary
Public Class frmMain
Private Sub btnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnter.Click
frmInput.Show()
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim display As String
display = txtBoxName.Text
Operation.Name(display)
End Sub
End Class
---------------------------------
If my are wrong or not relevant to the topic, please give me sample of codes on how to do it.
This post has been edited by GunnerInc: 31 July 2012 - 08:51 PM
Reason for edit:: Added code tags

New Topic/Question
Reply



MultiQuote





|