G
Guest
Hi,
I kind of got thrown into C# without any real programming experience, so I
know this is probably an easy question, but it's driving me crazy. In my
Tabs class, as I'm leaving a tabpage, I'm trying to capture the screen as a
bitmap. I'm trying to tell it to call the CaptureTab method from a class
called Print.
private void tabLeave(object sender, System.EventArgs e)
{
...
Print.CaptureTab(System.Windows.Forms.Form frm);
}
but I get an error inside the parentheses - it's unhappy with frm and says )
expected. Then I erase the frm to get the 'System.Windows.Forms.Form'
denotes a 'class' where a 'variable' was expected error. Then I try just
(frm) and get The name 'frm' does not exist in the class or namespace
'HCAUT.Tabs'. Then when I use (this) I get An object reference is required
for the nonstatic field, method, or property
HCAUT.Print.CaptureTab(System.Windows.Forms.Form)'. I try (e) and get The
best overloaded method match for
'HCAUT.Print.CaptureTab(System.Windows.Forms.Form)' has some invalid
arguments. And finally I just leave it empty and get No overload for
method 'CaptureTab' takes '0' arguments.
(My CaptureTab method looks like this:
CaptureTab(System.Windows.Forms.Form frm))
Anybody know what I can do to get this to work?
Thanks for any help!!!!
Melanie
I kind of got thrown into C# without any real programming experience, so I
know this is probably an easy question, but it's driving me crazy. In my
Tabs class, as I'm leaving a tabpage, I'm trying to capture the screen as a
bitmap. I'm trying to tell it to call the CaptureTab method from a class
called Print.
private void tabLeave(object sender, System.EventArgs e)
{
...
Print.CaptureTab(System.Windows.Forms.Form frm);
}
but I get an error inside the parentheses - it's unhappy with frm and says )
expected. Then I erase the frm to get the 'System.Windows.Forms.Form'
denotes a 'class' where a 'variable' was expected error. Then I try just
(frm) and get The name 'frm' does not exist in the class or namespace
'HCAUT.Tabs'. Then when I use (this) I get An object reference is required
for the nonstatic field, method, or property
HCAUT.Print.CaptureTab(System.Windows.Forms.Form)'. I try (e) and get The
best overloaded method match for
'HCAUT.Print.CaptureTab(System.Windows.Forms.Form)' has some invalid
arguments. And finally I just leave it empty and get No overload for
method 'CaptureTab' takes '0' arguments.
(My CaptureTab method looks like this:
CaptureTab(System.Windows.Forms.Form frm))
Anybody know what I can do to get this to work?
Thanks for any help!!!!
Melanie