Click here to Skip to main content
15,914,071 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: hi Pin
DanB19833-Oct-07 9:19
DanB19833-Oct-07 9:19 
GeneralRe: hi Pin
newbie@vb4-Oct-07 2:19
newbie@vb4-Oct-07 2:19 
GeneralRe: hi Pin
DanB19833-Oct-07 11:06
DanB19833-Oct-07 11:06 
GeneralRe: hi Pin
GuyThiebaut3-Oct-07 11:09
professionalGuyThiebaut3-Oct-07 11:09 
AnswerRe: hi Pin
Christian Graus3-Oct-07 12:33
protectorChristian Graus3-Oct-07 12:33 
QuestionPassing a variable to another form Pin
Zaegra3-Oct-07 4:05
Zaegra3-Oct-07 4:05 
AnswerRe: Passing a variable to another form [modified] Pin
Kenny McKee3-Oct-07 4:19
Kenny McKee3-Oct-07 4:19 
AnswerRe: Passing a variable to another form Pin
Johan Hakkesteegt3-Oct-07 4:57
Johan Hakkesteegt3-Oct-07 4:57 
Hi Zaegra,

Best is to declare a property in the target form (frm2). You can then assign the property the value you want to pass on from the calling form (frm1):

Public Class frm1<br />
Dim DriveValue as String<br />
    Public Property Drive() As String<br />
        Get<br />
            Return DriveValue<br />
        End Get<br />
        Set(ByVal Value As String)<br />
            DriveValue = Value<br />
        End Set<br />
    End Property<br />
Private Sub frm1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
MsgBox(DriveValue.ToString)<br />
End Sub<br />
End Class<br />
<br />
Public Class frm2<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim frm As New frm1<br />
frm.Drive = "C:\"<br />
frm.Show()<br />
End Sub<br />
Dim <br />
End Class


or something like that...

Good luck,

Johan

My advice is free, and you may get what you paid for.

QuestionDatatable sort Pin
cstrader2323-Oct-07 3:38
cstrader2323-Oct-07 3:38 
AnswerRe: Datatable sort Pin
Dave Kreskowiak3-Oct-07 4:53
mveDave Kreskowiak3-Oct-07 4:53 
GeneralRe: Datatable sort Pin
cstrader2323-Oct-07 8:53
cstrader2323-Oct-07 8:53 
GeneralRe: Datatable sort Pin
Dave Kreskowiak3-Oct-07 12:02
mveDave Kreskowiak3-Oct-07 12:02 
GeneralRe: Datatable sort Pin
cstrader2323-Oct-07 12:33
cstrader2323-Oct-07 12:33 
QuestionInitialize Date and time picker Vb 2005 Pin
nishkarsh_k3-Oct-07 2:46
nishkarsh_k3-Oct-07 2:46 
AnswerRe: Initialize Date and time picker Vb 2005 Pin
Johan Hakkesteegt3-Oct-07 8:00
Johan Hakkesteegt3-Oct-07 8:00 
GeneralRe: Initialize Date and time picker Vb 2005 Pin
nishkarsh_k3-Oct-07 8:22
nishkarsh_k3-Oct-07 8:22 
GeneralRe: Initialize Date and time picker Vb 2005 Pin
TremaHD3-Oct-07 12:05
TremaHD3-Oct-07 12:05 
GeneralRe: Initialize Date and time picker Vb 2005 Pin
Johan Hakkesteegt3-Oct-07 19:49
Johan Hakkesteegt3-Oct-07 19:49 
GeneralRe: Initialize Date and time picker Vb 2005 Pin
nishkarsh_k3-Oct-07 20:18
nishkarsh_k3-Oct-07 20:18 
GeneralRe: Initialize Date and time picker Vb 2005 Pin
Johan Hakkesteegt3-Oct-07 20:38
Johan Hakkesteegt3-Oct-07 20:38 
AnswerRe: Initialize Date and time picker Vb 2005 Pin
visualhint4-Oct-07 3:48
visualhint4-Oct-07 3:48 
QuestionHai give an idea Pin
Senthil S3-Oct-07 2:11
Senthil S3-Oct-07 2:11 
AnswerRe: Hai give an idea Pin
Colin Angus Mackay3-Oct-07 3:16
Colin Angus Mackay3-Oct-07 3:16 
AnswerRe: Hai give an idea Pin
Scott Dorman3-Oct-07 12:12
professionalScott Dorman3-Oct-07 12:12 
AnswerRe: Hai give an idea Pin
koolprasad20034-Oct-07 1:00
professionalkoolprasad20034-Oct-07 1:00 

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.