Click here to Skip to main content
15,905,316 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionSharing data between Windows forms Pin
roraima5-Sep-05 12:17
roraima5-Sep-05 12:17 
AnswerRe: Sharing data between Windows forms Pin
Christian Graus5-Sep-05 12:18
protectorChristian Graus5-Sep-05 12:18 
GeneralRe: Sharing data between Windows forms Pin
roraima5-Sep-05 12:23
roraima5-Sep-05 12:23 
GeneralRe: Sharing data between Windows forms Pin
Christian Graus5-Sep-05 12:35
protectorChristian Graus5-Sep-05 12:35 
GeneralRe: Sharing data between Windows forms Pin
roraima5-Sep-05 14:14
roraima5-Sep-05 14:14 
AnswerRe: Sharing data between Windows forms Pin
_mubashir6-Sep-05 2:38
_mubashir6-Sep-05 2:38 
AnswerRe: Sharing data between Windows forms Pin
korso_rogan6-Sep-05 9:08
korso_rogan6-Sep-05 9:08 
AnswerRe: Sharing data between Windows forms Pin
eagertolearn8-Sep-05 8:59
eagertolearn8-Sep-05 8:59 
My suggestion is to have a shared variable between the 2 forms. That way, if you modify the variable from one form, it keeps the value of the variable when you access it from form2.

So for example:

you can specify a variable str in form1 this way

Public Class Form1
Public shared str as string
...
end class

you can access the variable form either form1 or form2.
to modify it form form1, simply use this way
str = txtDocument.text

to access or modify from form2, use this way
form1.str = "Another Text"
or you can also use it in you textbox.

My.Computer.FileSystem.ReadAllText(Form1.str)

Hope this helps Smile | :)

Good luck
AnswerRe: Sharing data between Windows forms Pin
roraima14-Sep-05 7:24
roraima14-Sep-05 7:24 
QuestionIntelligent Datagrid Pin
| Muhammad Waqas Butt |5-Sep-05 6:05
professional| Muhammad Waqas Butt |5-Sep-05 6:05 
AnswerRe: Intelligent Datagrid Pin
mikone5-Sep-05 10:16
mikone5-Sep-05 10:16 
QuestionOpen default mail client with attachments Pin
marowle5-Sep-05 4:19
marowle5-Sep-05 4:19 
QuestionListview selects? Pin
dave@ennead5-Sep-05 3:26
dave@ennead5-Sep-05 3:26 
AnswerRe: Listview selects? Pin
dave@ennead5-Sep-05 3:35
dave@ennead5-Sep-05 3:35 
QuestionSlow WMI-Query, what reason? Pin
mikone5-Sep-05 3:26
mikone5-Sep-05 3:26 
AnswerRe: Slow WMI-Query, what reason? Pin
progload6-Sep-05 9:41
progload6-Sep-05 9:41 
GeneralRe: Slow WMI-Query, what reason? Pin
mikone7-Sep-05 21:28
mikone7-Sep-05 21:28 
QuestionT-SQL Clause Pin
Greeky5-Sep-05 3:17
Greeky5-Sep-05 3:17 
AnswerRe: T-SQL Clause Pin
maximvs5-Sep-05 7:15
maximvs5-Sep-05 7:15 
QuestionBooks about .NET with examples for learning Pin
hcmuns5-Sep-05 0:59
susshcmuns5-Sep-05 0:59 
AnswerRe: Books about .NET with examples for learning Pin
Christian Graus5-Sep-05 11:29
protectorChristian Graus5-Sep-05 11:29 
QuestionRotation of Label control in vb.net Pin
premanand jha5-Sep-05 0:46
premanand jha5-Sep-05 0:46 
AnswerRe: Rotation of Label control in vb.net Pin
Briga5-Sep-05 2:51
Briga5-Sep-05 2:51 
QuestionSpecified argument was out of the range of valid values. Pin
Rabeek5-Sep-05 0:25
Rabeek5-Sep-05 0:25 
AnswerRe: Specified argument was out of the range of valid values. Pin
_mubashir5-Sep-05 3:23
_mubashir5-Sep-05 3:23 

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.