Click here to Skip to main content
16,005,339 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to check the data type of user input?VB.Net Pin
Charlie Williams14-Dec-03 8:28
Charlie Williams14-Dec-03 8:28 
QuestionHow to disable item editing in combobox?vb.Net Pin
MJay13-Dec-03 2:19
MJay13-Dec-03 2:19 
AnswerRe: How to disable item editing in combobox?vb.Net Pin
Colin Angus Mackay13-Dec-03 3:12
Colin Angus Mackay13-Dec-03 3:12 
GeneralRe: How to disable item editing in combobox?vb.Net Pin
MJay13-Dec-03 6:07
MJay13-Dec-03 6:07 
GeneralRe: How to disable item editing in combobox?vb.Net Pin
Colin Angus Mackay13-Dec-03 6:16
Colin Angus Mackay13-Dec-03 6:16 
GeneralRe: How to disable item editing in combobox?vb.Net Pin
MJay13-Dec-03 21:49
MJay13-Dec-03 21:49 
GeneralPassing variable between parent/child forms Pin
MadCow12-Dec-03 16:00
MadCow12-Dec-03 16:00 
GeneralRe: Passing variable between parent/child forms Pin
Colin Angus Mackay13-Dec-03 2:47
Colin Angus Mackay13-Dec-03 2:47 
The general way I'd do this would be to create a property for each value that I want to expose on Form2. Create an event handler for the Closing event and populate the values that the propery will expose.

e.g.
'The value to return to the other form
Private myValue As String

' This is the propery that exposes the value needed by
' the other form
Public ReadOnly Property ValueForOtherForm() As String
    Get
        Return Me.myValue
    End Get
End Property

' When the Form closes ensure that the value is transered so
' that the property works.
Private Sub Form2_Closing(ByVal sender As Object, _
            ByVal e As System.ComponentModel.CancelEventArgs) _
            Handles MyBase.Closing
    myValue = Me.tbSomeControl.Text
End Sub


Then, back in Form1, you can do this:
Private Sub MenuItem6_Click(ByVal sender As System.Object, _
                ByVal e As System.EventArgs) Handles MenuItem6.Click
    Dim frmAction As New fclsRoomAction
    frmAction.ShowDialog()
    lstRoomAction.Items.Add(Form2.ValueForOtherForm)
End Sub


I hope this helps.

--Colin Mackay--

"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)

Enumerators in .NET: See how to customise foreach loops with C#


GeneralRe: Passing variable between parent/child forms Pin
MadCow13-Dec-03 13:58
MadCow13-Dec-03 13:58 
GeneralRe: Passing variable between parent/child forms Pin
Colin Angus Mackay13-Dec-03 14:50
Colin Angus Mackay13-Dec-03 14:50 
GeneralRe: Passing variable between parent/child forms Pin
MadCow14-Dec-03 10:56
MadCow14-Dec-03 10:56 
Generaldetermining drive free space on remote machine Pin
findneville12-Dec-03 8:24
findneville12-Dec-03 8:24 
GeneralRe: determining drive free space on remote machine Pin
Dave Kreskowiak12-Dec-03 8:28
mveDave Kreskowiak12-Dec-03 8:28 
Questionhow to add checkbox or radio button to a specific column of listview? Pin
Tridip Bhattacharjee12-Dec-03 1:19
professionalTridip Bhattacharjee12-Dec-03 1:19 
Questionwhat is .htc file and tell me the use ? Pin
Tridip Bhattacharjee12-Dec-03 1:15
professionalTridip Bhattacharjee12-Dec-03 1:15 
Questionwhat is com+ and what is difference between com and com+ Pin
Tridip Bhattacharjee12-Dec-03 1:10
professionalTridip Bhattacharjee12-Dec-03 1:10 
AnswerRe: what is com+ and what is difference between com and com+ Pin
Dave Kreskowiak12-Dec-03 3:00
mveDave Kreskowiak12-Dec-03 3:00 
Questionhow to sort the datagrid when i will click on any column header Pin
Tridip Bhattacharjee12-Dec-03 1:08
professionalTridip Bhattacharjee12-Dec-03 1:08 
AnswerRe: how to sort the datagrid when i will click on any column header Pin
Member 76608416-Dec-03 18:30
Member 76608416-Dec-03 18:30 
GeneralVB.NET Pin
srieen11-Dec-03 22:20
srieen11-Dec-03 22:20 
GeneralUp to my neck in poo! Sub Finalize Pin
cnurse11-Dec-03 17:50
cnurse11-Dec-03 17:50 
GeneralRe: Up to my neck in poo! Sub Finalize Pin
Dave Kreskowiak12-Dec-03 2:53
mveDave Kreskowiak12-Dec-03 2:53 
GeneralRe: Up to my neck in poo! Sub Finalize Pin
cnurse12-Dec-03 3:09
cnurse12-Dec-03 3:09 
GeneralRe: Up to my neck in poo! Sub Finalize Pin
Dave Kreskowiak12-Dec-03 8:26
mveDave Kreskowiak12-Dec-03 8:26 
GeneralRe: Up to my neck in poo! Sub Finalize Pin
cnurse12-Dec-03 12:59
cnurse12-Dec-03 12:59 

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.