Click here to Skip to main content
15,902,745 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Recursive File Copy/Delete Pin
Anonymous4-Jan-04 10:55
Anonymous4-Jan-04 10:55 
GeneralRe: Recursive File Copy/Delete Pin
Dave Kreskowiak5-Jan-04 4:02
mveDave Kreskowiak5-Jan-04 4:02 
GeneralComparing lists Pin
Member 7476772-Jan-04 8:22
Member 7476772-Jan-04 8:22 
GeneralRe: Comparing lists Pin
mitreviper3-Jan-04 16:25
mitreviper3-Jan-04 16:25 
GeneralNeed help on DateTimePicker Pin
cometz2-Jan-04 6:25
cometz2-Jan-04 6:25 
GeneralRe: Need help on DateTimePicker Pin
sagmam23-Jul-04 6:58
sagmam23-Jul-04 6:58 
GeneralPassing Data between Windows Forms Pin
Robert Gronenthal2-Jan-04 5:28
Robert Gronenthal2-Jan-04 5:28 
GeneralRe: Passing Data between Windows Forms Pin
Charlie Williams2-Jan-04 7:33
Charlie Williams2-Jan-04 7:33 
You need to give formB a way to reference formA. One way of going about this is to add a private field of type formA to formB and then pass the calling instance of formA to formB in its constructor:

(In formA...)
<br />
dim frmB as new formB(Me)


(In formB...)
<br />
Private frm as formA<br />
Public Sub New(ByVal frmRef as formA)<br />
  frm = frmRef<br />
End Sub


Then, in formB you can say frm.TextBox1.Text = "Howdy from formB!"

As an aside, you may want to reconsider the way you are designing your app. It might be a better idea to add public properties to your forms and update the display with these properties than to allow direct access to the controls from other classes. This would make it a lot easier to alter your classes in the future.

For example, as it stands now, if you decide that you want to use a combo box instead of a text box you will have to change the code in both forms instead of just the form that is implementing the change.






Charlie

if(!curlies){ return; }
GeneralRe: Passing Data between Windows Forms Pin
Robert Gronenthal5-Jan-04 10:34
Robert Gronenthal5-Jan-04 10:34 
GeneralRe: Passing Data between Windows Forms Pin
Charlie Williams6-Jan-04 5:16
Charlie Williams6-Jan-04 5:16 
GeneralRemote scripting Pin
neo2k32-Jan-04 4:02
neo2k32-Jan-04 4:02 
GeneralRe: Remote scripting Pin
Dave Kreskowiak4-Jan-04 8:24
mveDave Kreskowiak4-Jan-04 8:24 
QuestionDynamic Enums... Is this possible? Pin
Anonymous1-Jan-04 18:16
Anonymous1-Jan-04 18:16 
AnswerRe: Dynamic Enums... Is this possible? Pin
Charlie Williams2-Jan-04 7:47
Charlie Williams2-Jan-04 7:47 
GeneralNot sure? Help! Pin
Member 7957781-Jan-04 18:03
Member 7957781-Jan-04 18:03 
GeneralRe: Not sure? Help! Pin
Hesham Amin1-Jan-04 22:02
Hesham Amin1-Jan-04 22:02 
GeneralRe: Not sure? Help! Pin
code_demon2-Jan-04 7:03
code_demon2-Jan-04 7:03 
GeneralRe: Not sure? Help! Pin
icypyro2-Jan-04 12:51
icypyro2-Jan-04 12:51 
GeneralUse Outlook Send Email Pin
jjwangel1-Jan-04 17:04
jjwangel1-Jan-04 17:04 
GeneralRe: Use Outlook Send Email Pin
Dave Kreskowiak4-Jan-04 8:23
mveDave Kreskowiak4-Jan-04 8:23 
GeneralVB.Net-Data Grid control Pin
NachiketP1-Jan-04 8:53
NachiketP1-Jan-04 8:53 
GeneralHelp in VB6 Pin
Fire_Worm1-Jan-04 5:26
Fire_Worm1-Jan-04 5:26 
GeneralRe: Help in VB6 Pin
skrtbh1-Jan-04 7:14
skrtbh1-Jan-04 7:14 
Questiongot problem -- how to transfer file with the help of windows socket using vb.net from one machine to another machine ? Pin
Tridip Bhattacharjee1-Jan-04 1:22
professionalTridip Bhattacharjee1-Jan-04 1:22 
AnswerRe: got problem -- how to transfer file with the help of windows socket using vb.net from one machine to another machine ? Pin
Niels Penneman12-Jan-04 10:38
Niels Penneman12-Jan-04 10:38 

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.