Click here to Skip to main content
16,005,316 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to pass not simple types using .NET Remoting [modified] Pin
Nigor4-Aug-06 9:10
Nigor4-Aug-06 9:10 
GeneralRe: How to pass not simple types using .NET Remoting Pin
code-frog4-Aug-06 14:46
professionalcode-frog4-Aug-06 14:46 
GeneralRe: How to pass not simple types using .NET Remoting [modified] Pin
Nigor5-Aug-06 3:18
Nigor5-Aug-06 3:18 
QuestionDataGridView Button w/ Image Pin
swcrissman31-Jul-06 5:13
swcrissman31-Jul-06 5:13 
QuestionInstance from the active form Pin
Ramez Quneibi31-Jul-06 4:31
Ramez Quneibi31-Jul-06 4:31 
AnswerRe: Instance from the active form Pin
Judah Gabriel Himango31-Jul-06 5:12
sponsorJudah Gabriel Himango31-Jul-06 5:12 
GeneralRe: Instance from the active form [modified] Pin
Ramez Quneibi31-Jul-06 21:36
Ramez Quneibi31-Jul-06 21:36 
GeneralRe: Instance from the active form Pin
Judah Gabriel Himango1-Aug-06 4:39
sponsorJudah Gabriel Himango1-Aug-06 4:39 
Ramez Quneibi wrote:
he problem is that i cant make an instance from the active form to close it when i press button next from Form2.


OK, a couple things worth mentioning here. If you need to pass an instance of form1 over to form2, add an argument to the Form2 constructor that stores the form1 instance:

class Form2
{
   readonly Form1 firstFormInstance;
   
   public Form2(Form1 instance)
   {
       this.firstFormInstance = instance;
   }
}


A second thing to note is that you cannot access a control or a form on a thread other than the one it was created on. Say you have Form1 instance created by "thread1". You start a new thread, "thread2" to launch a new Form2 instance. This is all valid, however, inside form2, you cannot access form1 because it was created by a different thread. If you need to do that, you'll need to use form1.Invoke or form1.BeginInvoke, which will invoke some method on the correct thread for form1.


Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Messianic Instrumentals (with audio)
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


GeneralRe: Instance from the active form Pin
Ramez Quneibi1-Aug-06 21:26
Ramez Quneibi1-Aug-06 21:26 
GeneralRe: Instance from the active form Pin
Judah Gabriel Himango2-Aug-06 5:20
sponsorJudah Gabriel Himango2-Aug-06 5:20 
GeneralRe: Instance from the active form Pin
Ramez Quneibi4-Aug-06 5:22
Ramez Quneibi4-Aug-06 5:22 
GeneralRe: Instance from the active form Pin
Judah Gabriel Himango4-Aug-06 10:04
sponsorJudah Gabriel Himango4-Aug-06 10:04 
GeneralRe: Instance from the active form Pin
Ramez Quneibi4-Aug-06 22:47
Ramez Quneibi4-Aug-06 22:47 
QuestionCopy an instance Pin
sjembek31-Jul-06 4:30
sjembek31-Jul-06 4:30 
AnswerRe: Copy an instance Pin
Dustin Metzgar31-Jul-06 4:44
Dustin Metzgar31-Jul-06 4:44 
GeneralRe: Copy an instance Pin
sjembek31-Jul-06 5:50
sjembek31-Jul-06 5:50 
GeneralRe: Copy an instance Pin
Dustin Metzgar31-Jul-06 6:25
Dustin Metzgar31-Jul-06 6:25 
GeneralRe: Copy an instance Pin
sjembek31-Jul-06 6:42
sjembek31-Jul-06 6:42 
AnswerRe: Copy an instance Pin
A.A.31-Jul-06 4:45
A.A.31-Jul-06 4:45 
GeneralRe: Copy an instance Pin
sjembek31-Jul-06 5:35
sjembek31-Jul-06 5:35 
AnswerRe: Copy an instance Pin
LongRange.Shooter31-Jul-06 5:12
LongRange.Shooter31-Jul-06 5:12 
AnswerRe: Copy an instance Pin
Judah Gabriel Himango31-Jul-06 5:29
sponsorJudah Gabriel Himango31-Jul-06 5:29 
GeneralRe: Copy an instance Pin
sjembek31-Jul-06 5:52
sjembek31-Jul-06 5:52 
GeneralRe: Copy an instance Pin
sjembek31-Jul-06 6:43
sjembek31-Jul-06 6:43 
AnswerRe: Copy an instance Pin
Libor Tinka31-Jul-06 12:44
Libor Tinka31-Jul-06 12:44 

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.