473,385 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Passing a Winform to a class

Ok I'm learning C# and GDI+, and I created class that will plot some lines
in the main form using GDI but my problem that I do not know how to pass
the mainFrm to the class where I will do the drawing
lie

public class deltaPlot
{
public void plotBox( "WHAT DO I PASS HERE FOR A FORM?)
{
//here I do the ploting oa box
}
}

Thanks in advance

Nov 17 '05 #1
3 1078
public void plotBox(System.Windows.Form form)
{
// Do things with form here....
}

Nov 17 '05 #2
Hi,
Welcome to MSDN Newsgroup!

I agreed with hiriumi. It's better to pass your project's Winform Class
derived from System.Windows.Form.

If there is any question, please feel free to join the community and we are
here to support you at your convenience. Thanks again and have a nice day.

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 17 '05 #3
Hi ,

I just wanted to check how things are going and whether or not your
problem has been solved.

If there is any question, please feel free to let me know. Thanks for your
understanding!

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: andreas | last post by:
Hi there, I have the following situation: 1. DOT.NET Application is started 2. DOT.NET Application instantiates Access.Application.8 3. Opens a specified database (MDB) 4. DOT.NET...
1
by: i | last post by:
Hi, I'm trying to get a seperate class, initialized by a form class, to manipulate certain objects on the form (ex: add to a listbox). The manipulation will occur via a thread that is not the...
2
by: Bob | last post by:
Hi, Can anyone tell me how to resolve this: I am calling a web service from a WinForm app and passing a typed dataset as a parameter. I have added the dataset to the web service project but I...
2
by: Wayne | last post by:
I have a winform that runs on its own, is it possible to wrap a stand-alone winform in a class? More accurately, is it possible to use a class to call an already established winform?
0
by: Costa Lino | last post by:
Hi all, I have a webservice with 2 method public int AddUpdateTask(eurosmallbiz.FrameWork.Systems.Calendar.Task task,string username,string password,int companyid,string SyncRule)
0
by: ohmp05 | last post by:
Hi all, I am new to deployment of application. If any one please help me on it , that will be great. During the installation of project, Installer will execute an utility( It will display...
7
by: AMP | last post by:
Hello, I have this in form1: namespace Pass { public partial class Form1 : Form { public Form2 form2; public Form1() {
2
by: twahl | last post by:
Hi, My problem is that the consumer of the WebService does not see the class's properties when passed in a web service. I want to pass a class in from a WinForm to a webmethod. I've defined the...
2
by: jyanmin.fang | last post by:
Hi, In my current project, I need to embed an .NET winform usercontrol in the aspx page (via <Objecttag). This winform usercontrol has an event called DoEvent (void DoEvent()). This winform...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.