Click here to Skip to main content
15,918,706 members
Home / Discussions / C#
   

C#

 
GeneralRe: Display popup through window service Pin
Eddy Vluggen4-Dec-12 2:57
professionalEddy Vluggen4-Dec-12 2:57 
GeneralRe: Display popup through window service Pin
PankajKSood4-Dec-12 3:02
PankajKSood4-Dec-12 3:02 
GeneralRe: Display popup through window service Pin
Eddy Vluggen4-Dec-12 3:04
professionalEddy Vluggen4-Dec-12 3:04 
GeneralRe: Display popup through window service Pin
Dave Kreskowiak4-Dec-12 3:59
mveDave Kreskowiak4-Dec-12 3:59 
AnswerRe: Display popup through window service Pin
V.4-Dec-12 2:35
professionalV.4-Dec-12 2:35 
GeneralRe: Display popup through window service Pin
PankajKSood4-Dec-12 2:58
PankajKSood4-Dec-12 2:58 
GeneralRe: Display popup through window service Pin
Dave Kreskowiak4-Dec-12 4:03
mveDave Kreskowiak4-Dec-12 4:03 
QuestionMVC 3 Development guidelines Pin
VishwaKL3-Dec-12 22:11
VishwaKL3-Dec-12 22:11 
AnswerRe: MVC 3 Development guidelines Pin
DaveAuld3-Dec-12 22:31
professionalDaveAuld3-Dec-12 22:31 
GeneralRe: MVC 3 Development guidelines Pin
VishwaKL3-Dec-12 22:39
VishwaKL3-Dec-12 22:39 
GeneralRe: MVC 3 Development guidelines Pin
DaveAuld3-Dec-12 22:41
professionalDaveAuld3-Dec-12 22:41 
GeneralRe: MVC 3 Development guidelines Pin
VishwaKL3-Dec-12 22:51
VishwaKL3-Dec-12 22:51 
QuestionSet Focus on win application Pin
Prasanna ragav3-Dec-12 22:03
Prasanna ragav3-Dec-12 22:03 
Questionquestions about SerialPort in VS2010 ? Pin
nqchanh3-Dec-12 21:13
nqchanh3-Dec-12 21:13 
AnswerRe: questions about SerialPort in VS2010 ? Pin
Richard MacCutchan3-Dec-12 21:45
mveRichard MacCutchan3-Dec-12 21:45 
GeneralRe: questions about SerialPort in VS2010 ? Pin
nqchanh3-Dec-12 21:55
nqchanh3-Dec-12 21:55 
GeneralRe: questions about SerialPort in VS2010 ? Pin
Richard MacCutchan3-Dec-12 22:55
mveRichard MacCutchan3-Dec-12 22:55 
QuestionHelp,How to Convert the Array,Collection,DataTable Or DataSet to Xml File? Pin
Jandren3-Dec-12 18:56
Jandren3-Dec-12 18:56 
AnswerRe: Help,How to Convert the Array,Collection,DataTable Or DataSet to Xml File? Pin
Richard MacCutchan3-Dec-12 21:41
mveRichard MacCutchan3-Dec-12 21:41 
QuestionAccessing Form Elements From Different Files Pin
C-P-User-33-Dec-12 14:54
C-P-User-33-Dec-12 14:54 
Item 1: I do not want large source files.

Item 2: I have some rectangles on my Form.

Item 3: I want to access the rectangles, for graphing, from other files.

Can someone direct me to some sort of explanation me how that's done ?

Certainly this is common practice; but I can't find it clearly documented in websites, videos, whatever.

------
Details
------

If I have a file called GraphClassesAndMethods.cs, and I want to, say, put a dot or a line on a rectangle which I designed with the C# toolbox, then how do I get C# to let my class and method in this file see the rectangle ?

C# knows that they are there when I'm typing in the Form1.cs file, and I wrongly inferred/guessed that the reason that it couldn't see the same rectangle in the graphClassesAndMethods files was because the class had a different name.

To test this, I put a class and method outside the Form1 class (in the Form1.cs file) and Ta-Da, the rectangles were not visible to code in that class. So I thought (wrongly) that if I put the same class name in the other file, then they would be visible.

No.


One "solution" to this problem is to create a ridiculously large amount of source in the file Form1.cs, in which case we will have a blob that works once, version 1.0, and will require three years to implement the simplest little change.

Request: Someone please explain to me how to let my code (i.e., in the other file) see the rectangles which are perfectly visible to code that I type in the Form1 class in the Form1.cs file.

Of particular interest to me is that I would like to also have an InitEverything.cs file where I can put all the "ooops, that should have been done first" routines and so on which tend to crop up during the last 10% of the coding.
AnswerRe: Accessing Form Elements From Different Files Pin
Mycroft Holmes3-Dec-12 16:14
professionalMycroft Holmes3-Dec-12 16:14 
AnswerRe: Accessing Form Elements From Different Files Pin
PIEBALDconsult3-Dec-12 16:16
mvePIEBALDconsult3-Dec-12 16:16 
AnswerRe: Accessing Form Elements From Different Files Pin
Gerry Schmitz3-Dec-12 21:02
mveGerry Schmitz3-Dec-12 21:02 
GeneralRe: Accessing Form Elements From Different Files Pin
C-P-User-34-Dec-12 3:24
C-P-User-34-Dec-12 3:24 
GeneralRe: Accessing Form Elements From Different Files Pin
Gerry Schmitz4-Dec-12 10:35
mveGerry Schmitz4-Dec-12 10: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.