Click here to Skip to main content
15,901,687 members
Home / Discussions / C#
   

C#

 
GeneralRe: Add LinkLabel To Richtextbox ? Pin
WDI30-Dec-04 22:57
WDI30-Dec-04 22:57 
GeneralRe: Add LinkLabel To Richtextbox ? Pin
Heath Stewart31-Dec-04 5:57
protectorHeath Stewart31-Dec-04 5:57 
GeneralRe: Add LinkLabel To Richtextbox ? Pin
mav.northwind1-Jan-05 1:14
mav.northwind1-Jan-05 1:14 
GeneralLineScroll Pin
Member 109769929-Dec-04 19:25
Member 109769929-Dec-04 19:25 
GeneralRe: LineScroll Pin
Heath Stewart30-Dec-04 5:42
protectorHeath Stewart30-Dec-04 5:42 
Generalextensible fields data schema Pin
ppp00129-Dec-04 19:11
ppp00129-Dec-04 19:11 
GeneralRe: extensible fields data schema Pin
Heath Stewart30-Dec-04 5:45
protectorHeath Stewart30-Dec-04 5:45 
GeneralRe: extensible fields data schema Pin
ppp00130-Dec-04 15:22
ppp00130-Dec-04 15:22 
GeneralRe: extensible fields data schema Pin
Heath Stewart30-Dec-04 19:59
protectorHeath Stewart30-Dec-04 19:59 
GeneralRegional Setting Pin
Kyaw Soe Khaing29-Dec-04 18:48
Kyaw Soe Khaing29-Dec-04 18:48 
GeneralRe: Regional Setting Pin
Paul Watson29-Dec-04 21:42
sitebuilderPaul Watson29-Dec-04 21:42 
Generalsetting a font Pin
Tyrus18229-Dec-04 18:27
Tyrus18229-Dec-04 18:27 
GeneralRe: setting a font Pin
leppie29-Dec-04 23:21
leppie29-Dec-04 23:21 
General.net Remoting Pin
Anil_gupta29-Dec-04 18:21
Anil_gupta29-Dec-04 18:21 
GeneralRe: .net Remoting Pin
leppie29-Dec-04 23:22
leppie29-Dec-04 23:22 
GeneralRe: .net Remoting Pin
Adam Goossens30-Dec-04 1:13
Adam Goossens30-Dec-04 1:13 
System.Windows.Forms.Form inherits indirectly from System.MarshalByRefObject, so there is no reason why it can't be remoted - in fact, I just knocked up a test server/client then and succeeded.

However, as leppie said, you can't pass a window handle across remoting boundaries - they mean nothing on two different systems.

You'll have to expose the object (probably as a client-activated type), but there is a snag: you cannot pass your form as the parameter to Application.Run().

This is because Application.Run(Form) will actually create a new ApplicationContext based around your form and then attempt to attach a delegate to your form's HandleDestroyed event so that it knows when to terminate the message loop. The problem is that ApplicationContext is not remotable (i.e., not derived from MarshalByRefObject nor is it marked as Serializable), so you can't pass the target method information in the delegate across the remoting boundary. This will result in a SerializationException.

Instead, use Form.ShowDialog(). That will work.

Good luck.

This space for rent!
My Blog
GeneralRe: .net Remoting Pin
Adam Goossens30-Dec-04 16:48
Adam Goossens30-Dec-04 16:48 
Generalobject and layers design question Pin
ppp00129-Dec-04 17:50
ppp00129-Dec-04 17:50 
GeneralOverrated Pin
Paul Watson29-Dec-04 21:45
sitebuilderPaul Watson29-Dec-04 21:45 
Generala small doubt ,pls urgent Pin
dhol29-Dec-04 17:12
dhol29-Dec-04 17:12 
GeneralRe: a small doubt ,pls urgent Pin
Paul Watson29-Dec-04 21:52
sitebuilderPaul Watson29-Dec-04 21:52 
GeneralRe: a small doubt ,pls urgent Pin
dhol30-Dec-04 1:42
dhol30-Dec-04 1:42 
GeneralOpening a browser page from C# windows... Pin
new_phoenix29-Dec-04 15:33
new_phoenix29-Dec-04 15:33 
GeneralDiagnostic.Process Pin
Paul Watson29-Dec-04 21:50
sitebuilderPaul Watson29-Dec-04 21:50 
GeneralRe: Diagnostic.Process Pin
new_phoenix31-Dec-04 5:35
new_phoenix31-Dec-04 5:35 

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.