Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


I need the user to be able to add information in a form using classes in vb.net

Posted on 2004-11-01
Medium Priority
Last Modified: 2010-04-17
I need a user to be able to add first name, last name,  address, city, state, and zip from a form.  In my program I have a person file that has a constructor with all of the following info.

In class how do I go about this?
Question by:Kahlan27265
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 19

Expert Comment

ID: 12470007
?? Could not get your Query

You need to have a Form with these fields and User will add Record
When he clicks save the data is to be passed to a class which will save it

Is this what you want??

Accepted Solution

PreachDotNet earned 2000 total points
ID: 12471688
Public Class clsUser
   Private mName
   Private mSurname
   Private mAddress

  Public Function Create (Optional inName as string = "", Optional inSurname as string = "", Optional inAddress as string = "") as Boolean
  mName = inName
  mSurname = inSurname
  mAddress = inAddress
  return true
End Function
End Class

in your form

Public Function Submit_Button_Click
  Dim mUser as new clsUser
 Dim mResponse as boolean =  mUser.Create txtName.Text, txtSurname.Text, txtAddress.Text
if mResponse then
  msgbox "Success"
  msgBox "Fail"
End if
end function

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Six Sigma Control Plans

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question