Information call question

I am currently trying to build a system but its llooking a mess so im trying to make it look presentable.

Its based on a booking system of cars with customers. Before i had just one form where i can input both information and then book it for a given period. But instead now what i want to do is to insert the information of customers on one form, and insert the information of the car on the second form, however i want to use a third form as a confirmation screen which will show who has taken which car using the information on the previous two screens.

Any ideas anyone



Answer this question

Information call question

  • wjcyg

    You can expose the desired information as properites of your forms:

    Customer form...
    Public Readonly Property CustomerName as string
    Get
    CustomerName = TextBox1.Text
    End Get
    End Property

    and so forth, then on your confirmation form you can reference the property, CustomerForm.CustomerName. A better method, in my option, is to make your confirmation form have the properties, then set them. For example:

    Private Sub btnBookIt_Click....
    Dim poForm as New frmConfirm

    poForm.Customer = name from this form
    poForm.CarMake = car from other form
    If poForm.ShowDialog() = DialogResult.OK Then
    ....
    End If

    By adding properties to the confirm form you can enacapsulate the how the confirmation form is layed out and displayed to the user in one place.


  • Ranjit Charles

    I have actually done that. Iv cut my system down from nigh on 12 forms down to just 4. However what i wanted to know is that how can use the information in the text boxes on one form for use on labels on another form. As a sort of confirmation page. Anyone
  • Ali Khan

    There are some subtleties that are elusive. I use group boxes profusely. They can contain groups of controls and the entire groupbox can be made visible or invisible with a single line of code. (gb.visible = false). This gives you a whole lot more options than form after form after.....



  • Information call question