Click here to Skip to main content
15,917,702 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Dataset bind to DataGridView update tabel in SQL Server 2005 DB Pin
Adam R Harris6-Aug-09 9:58
Adam R Harris6-Aug-09 9:58 
AnswerRe: C# Dataset bind to DataGridView update tabel in SQL Server 2005 DB Pin
Wheels01210-Aug-09 7:10
Wheels01210-Aug-09 7:10 
Question"Screenshot" from handle? Pin
dandy726-Aug-09 9:33
dandy726-Aug-09 9:33 
AnswerRe: "Screenshot" from handle? Pin
pelnor7-Aug-09 4:25
pelnor7-Aug-09 4:25 
GeneralRe: "Screenshot" from handle? Pin
dandy728-Aug-09 4:28
dandy728-Aug-09 4:28 
QuestionCalling functions and methods in a child form Pin
alias bill6-Aug-09 9:24
alias bill6-Aug-09 9:24 
AnswerRe: Calling functions and methods in a child form Pin
OriginalGriff6-Aug-09 10:20
mveOriginalGriff6-Aug-09 10:20 
AnswerRe: Calling functions and methods in a child form Pin
DaveyM696-Aug-09 10:54
professionalDaveyM696-Aug-09 10:54 
I like OriginalGriff's analogy!

Just in case it's not clear, and without the car thing...

Somewhere in your parent you are creating an instance of FileForm. Maybe something like this:
FileForm fileForm = new FileForm();
The instance fileForm is what you need to access that instance. If you need to, you can use the Parent's MdiChildren property to iterate over all child windows and find the instance you need.
foreach (Form form in MdiChildren)
{
    if (form is FileForm)
    {
        FileForm fileForm = form as FileForm;
        fileForm.YourMethod();
        break;
    }
}
I notice you are trying to access FileForm.textBox1. Control instances in a form are by default added as private and should stay that way. If you want to do something with a control, add a method or property in the FileForm class and use that to manipulate the control.
public void SetTextBox1(string text)
{
    textBox1.Text = text;
}
fileForm.SetTextBox1("Hello World!");


Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus)

GeneralRe: Calling functions and methods in a child form Pin
alias bill6-Aug-09 12:02
alias bill6-Aug-09 12:02 
GeneralRe: Calling functions and methods in a child form Pin
DaveyM696-Aug-09 21:54
professionalDaveyM696-Aug-09 21:54 
AnswerRe: Calling functions and methods in a child form [modified] Pin
nelsonpaixao6-Aug-09 13:58
nelsonpaixao6-Aug-09 13:58 
QuestionUsing a Session variable in an UpdateCommand Pin
JohnQuar16-Aug-09 9:17
JohnQuar16-Aug-09 9:17 
AnswerRe: Using a Session variable in an UpdateCommand [ Posted on Wrong Forum ] Pin
Abhijit Jana6-Aug-09 9:24
professionalAbhijit Jana6-Aug-09 9:24 
QuestionMS word tables using C# Pin
Member 41540746-Aug-09 9:00
Member 41540746-Aug-09 9:00 
AnswerRe: MS word tables using C# Pin
toby316-Aug-09 12:01
toby316-Aug-09 12:01 
GeneralRe: MS word tables using C# Pin
Member 41540746-Aug-09 21:51
Member 41540746-Aug-09 21:51 
GeneralRe: MS word tables using C# Pin
toby316-Aug-09 22:09
toby316-Aug-09 22:09 
GeneralRe: MS word tables using C# Pin
Member 41540747-Aug-09 7:58
Member 41540747-Aug-09 7:58 
QuestionProblem Calling CheckListBox Pin
Member 28652716-Aug-09 7:31
Member 28652716-Aug-09 7:31 
AnswerRe: Problem Calling CheckListBox Pin
Andrew Rissing6-Aug-09 7:56
Andrew Rissing6-Aug-09 7:56 
AnswerRe: Problem Calling CheckListBox Pin
Luc Pattyn6-Aug-09 7:56
sitebuilderLuc Pattyn6-Aug-09 7:56 
GeneralRe: Problem Calling CheckListBox Pin
Member 28652716-Aug-09 11:48
Member 28652716-Aug-09 11:48 
AnswerRe: Problem Calling CheckListBox Pin
DaveyM696-Aug-09 11:14
professionalDaveyM696-Aug-09 11:14 
GeneralRe: Problem Calling CheckListBox Pin
Member 28652716-Aug-09 15:01
Member 28652716-Aug-09 15:01 
Questionread Sql DataBase Error Pin
toby316-Aug-09 7:28
toby316-Aug-09 7:28 

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.