R
Rich P
In VB.Net I do this from Form2:
...Form1_Load(...)
...
Dim pt As Point
pt.X = Form1.Location.X + 500
pt.Y = Form1.Location.Y + 100
Me.Location = pt
I am currently translating an old app to C# from VB.Net. I tried this
in C#:
...Form1_Load(...)
...
Point pt;
pt.X = Form1.Location.X + 500; <-- error here
pt.Y = Form1.Location.Y + 100; <-- error here
this.Location = pt;
But I get an error message saying that an object reference is required
for a nonstatic field/method/property. Could someone tell me what I
need to do here?
Thanks
Rich
...Form1_Load(...)
...
Dim pt As Point
pt.X = Form1.Location.X + 500
pt.Y = Form1.Location.Y + 100
Me.Location = pt
I am currently translating an old app to C# from VB.Net. I tried this
in C#:
...Form1_Load(...)
...
Point pt;
pt.X = Form1.Location.X + 500; <-- error here
pt.Y = Form1.Location.Y + 100; <-- error here
this.Location = pt;
But I get an error message saying that an object reference is required
for a nonstatic field/method/property. Could someone tell me what I
need to do here?
Thanks
Rich