Click here to Skip to main content
15,879,326 members
Home / Discussions / C#
   

C#

 
GeneralRe: Stuck on delegates / events Pin
jxfdasilva17-Dec-13 7:42
jxfdasilva17-Dec-13 7:42 
GeneralRe: Stuck on delegates / events Pin
Pete O'Hanlon17-Dec-13 7:50
mvePete O'Hanlon17-Dec-13 7:50 
GeneralRe: Stuck on delegates / events Pin
Pete O'Hanlon17-Dec-13 7:54
mvePete O'Hanlon17-Dec-13 7:54 
GeneralRe: Stuck on delegates / events Pin
Richard Deeming17-Dec-13 8:28
mveRichard Deeming17-Dec-13 8:28 
GeneralRe: Stuck on delegates / events Pin
jxfdasilva17-Dec-13 8:28
jxfdasilva17-Dec-13 8:28 
AnswerRe: Stuck on delegates / events Pin
BillWoodruff17-Dec-13 9:52
professionalBillWoodruff17-Dec-13 9:52 
GeneralRe: Stuck on delegates / events Pin
jxfdasilva17-Dec-13 10:53
jxfdasilva17-Dec-13 10:53 
GeneralRe: Stuck on delegates / events Pin
BillWoodruff17-Dec-13 11:23
professionalBillWoodruff17-Dec-13 11:23 
If you want a Form you create to have access to, and be able to use, an instance of a Class created outside the Form, you must take action to give the created Form a valid reference to the instance of the Class.

There are several ways to do that; here's an example of one way:

In the Form(s) you create define a Public Property that will hold a valid reference to the NMEA Class:

// in created Forms

// enable access
using NmeaInterpreter;

// to hold reference to instance of NmeaInterpreter
Public NmeaInterpreter theNMEAInterpreter { get; set; }

In the Form that creates the instance of the NmeaInterpreter, at the point where you have a valid reference to an instance of the NmeaInterpreter called 'myInterpreter, and you create the new Form:

// rough sketch of code

NMEAUsingForm newNMEAUsingForm = new NMEAUsingForm();

// insert the reference to the instance of NmeaInterpreter

newNMEAUsingForm.theNMEAInterpreter = myInterpreter;

At this point any method in the created Form(s) can access, and use, the instance of the NmeaInterpreter.
If you seek to aid everyone that suffers in the galaxy, you will only weaken yourself … and weaken them. It is the internal struggles, when fought and won on their own, that yield the strongest rewards… If you care for others, then dispense with pity and sacrifice and recognize the value in letting them fight their own battles." Darth Traya

GeneralRe: Stuck on delegates / events Pin
jxfdasilva17-Dec-13 13:21
jxfdasilva17-Dec-13 13:21 
GeneralRe: Stuck on delegates / events Pin
Freak3017-Dec-13 23:17
Freak3017-Dec-13 23:17 
AnswerRe: Stuck on delegates / events Pin
BillWoodruff17-Dec-13 11:40
professionalBillWoodruff17-Dec-13 11:40 
GeneralRe: Stuck on delegates / events Pin
jxfdasilva17-Dec-13 12:23
jxfdasilva17-Dec-13 12:23 
GeneralRe: Stuck on delegates / events Pin
BillWoodruff17-Dec-13 13:10
professionalBillWoodruff17-Dec-13 13:10 
AnswerRe: Stuck on delegates / events Pin
V.17-Dec-13 22:37
professionalV.17-Dec-13 22:37 
GeneralRe: Stuck on delegates / events Pin
jxfdasilva17-Dec-13 22:53
jxfdasilva17-Dec-13 22:53 
GeneralRe: Stuck on delegates / events Pin
V.17-Dec-13 23:09
professionalV.17-Dec-13 23:09 
GeneralRe: Stuck on delegates / events Pin
jxfdasilva18-Dec-13 0:51
jxfdasilva18-Dec-13 0:51 
AnswerRe: Stuck on delegates / events Pin
jxfdasilva18-Dec-13 9:10
jxfdasilva18-Dec-13 9:10 
Questionmenu strip in right side Pin
An@nd Rajan1016-Dec-13 20:14
professionalAn@nd Rajan1016-Dec-13 20:14 
AnswerRe: menu strip in right side Pin
Mycroft Holmes16-Dec-13 20:56
professionalMycroft Holmes16-Dec-13 20:56 
GeneralRe: menu strip in right side Pin
An@nd Rajan1016-Dec-13 21:01
professionalAn@nd Rajan1016-Dec-13 21:01 
AnswerRe: menu strip in right side Pin
lukeer16-Dec-13 21:19
lukeer16-Dec-13 21:19 
AnswerRe: menu strip in right side Pin
HobbyProggy17-Dec-13 4:59
professionalHobbyProggy17-Dec-13 4:59 
QuestionDesign pattern Pin
jeenamary16-Dec-13 19:33
jeenamary16-Dec-13 19:33 
JokeRe: Design pattern Pin
Mycroft Holmes16-Dec-13 20:54
professionalMycroft Holmes16-Dec-13 20:54 

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.