PC Review


Reply
Thread Tools Rate Thread

Cannot pass 'AviewerV1.Aviewer.H' as ref or out, because 'AviewerV1.Aviewer.H' is a marshal-by-reference class

 
 
Jeroen Ceuppens
Guest
Posts: n/a
 
      11th Mar 2004
What does this mean?

that fault occurs on
this.textBoxH.Text = this.headfrm.H.ToString();

this.textBoxW.Text = this.headfrm.W.ToString();

headfrm is a passed object of a form with public int W,D



some more code

public class ChangeSurface : System.Windows.Forms.Form

{

private System.Windows.Forms.Button buttonUpdate;

private System.Windows.Forms.TextBox textBoxH;

private System.Windows.Forms.Label label1;

private System.Windows.Forms.TextBox textBoxW;

public Aviewer headfrm;


public ChangeSurface(Aviewer headform)

{

//

// Required for Windows Form Designer support

//

this.headfrm=headform;

InitializeComponent();

this.textBoxH.Text = this.headfrm.H.ToString();

this.textBoxW.Text = this.headfrm.W.ToString();

//

// TODO: Add any constructor code after InitializeComponent call

//

}



..........



can anybody help me out?



Thx

JC


 
Reply With Quote
 
 
 
 
Alex Yakhnin [MVP]
Guest
Posts: n/a
 
      11th Mar 2004
Hi Jeroen,

What is Aviewer? Are you sure you're in the right newsgroup?

--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org

"Jeroen Ceuppens" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What does this mean?
>
> that fault occurs on
> this.textBoxH.Text = this.headfrm.H.ToString();
>
> this.textBoxW.Text = this.headfrm.W.ToString();
>
> headfrm is a passed object of a form with public int W,D
>
>
>
> some more code
>
> public class ChangeSurface : System.Windows.Forms.Form
>
> {
>
> private System.Windows.Forms.Button buttonUpdate;
>
> private System.Windows.Forms.TextBox textBoxH;
>
> private System.Windows.Forms.Label label1;
>
> private System.Windows.Forms.TextBox textBoxW;
>
> public Aviewer headfrm;
>
>
> public ChangeSurface(Aviewer headform)
>
> {
>
> //
>
> // Required for Windows Form Designer support
>
> //
>
> this.headfrm=headform;
>
> InitializeComponent();
>
> this.textBoxH.Text = this.headfrm.H.ToString();
>
> this.textBoxW.Text = this.headfrm.W.ToString();
>
> //
>
> // TODO: Add any constructor code after InitializeComponent call
>
> //
>
> }
>
>
>
> .........
>
>
>
> can anybody help me out?
>
>
>
> Thx
>
> JC
>
>



 
Reply With Quote
 
Jeroen Ceuppens
Guest
Posts: n/a
 
      11th Mar 2004
Aviewer is a formclass, headfrm is of that type (Aviewer headfrm)


"Alex Yakhnin [MVP]" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> Hi Jeroen,
>
> What is Aviewer? Are you sure you're in the right newsgroup?
>
> --
> Alex Yakhnin .NET CF MVP
> www.intelliprog.com | www.opennetcf.org
>
> "Jeroen Ceuppens" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > What does this mean?
> >
> > that fault occurs on
> > this.textBoxH.Text = this.headfrm.H.ToString();
> >
> > this.textBoxW.Text = this.headfrm.W.ToString();
> >
> > headfrm is a passed object of a form with public int W,D
> >
> >
> >
> > some more code
> >
> > public class ChangeSurface : System.Windows.Forms.Form
> >
> > {
> >
> > private System.Windows.Forms.Button buttonUpdate;
> >
> > private System.Windows.Forms.TextBox textBoxH;
> >
> > private System.Windows.Forms.Label label1;
> >
> > private System.Windows.Forms.TextBox textBoxW;
> >
> > public Aviewer headfrm;
> >
> >
> > public ChangeSurface(Aviewer headform)
> >
> > {
> >
> > //
> >
> > // Required for Windows Form Designer support
> >
> > //
> >
> > this.headfrm=headform;
> >
> > InitializeComponent();
> >
> > this.textBoxH.Text = this.headfrm.H.ToString();
> >
> > this.textBoxW.Text = this.headfrm.W.ToString();
> >
> > //
> >
> > // TODO: Add any constructor code after InitializeComponent call
> >
> > //
> >
> > }
> >
> >
> >
> > .........
> >
> >
> >
> > can anybody help me out?
> >
> >
> >
> > Thx
> >
> > JC
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing a member on 'OwnerClass.TempPoint' may cause a runtime exception because it is a field of a marshal-by-reference class Mr. X. Microsoft C# .NET 2 16th Jul 2010 08:32 AM
Pass class reference John Microsoft VB .NET 7 29th Dec 2003 11:43 AM
How to overcome the limitation: Cannot pass 'argument' as ref or out, because ' argument ' is a marshal-by-reference class Mountain Bikn' Guy Microsoft C# .NET 2 15th Nov 2003 07:45 PM
How do I pass a web control reference to a class? Sam Microsoft C# .NET 1 10th Nov 2003 07:09 PM
Re: Cannot pass %s as ref or out, because %s is a marshal-by-reference class Max Microsoft C# .NET 1 6th Nov 2003 08:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:39 AM.