Click here to Skip to main content
15,886,799 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionHow to scroll text in dev c++ in c++ code? Pin
zeyan10-Feb-06 14:21
zeyan10-Feb-06 14:21 
AnswerRe: How to scroll text in dev c++ in c++ code? Pin
Cedric Moonen12-Feb-06 20:55
Cedric Moonen12-Feb-06 20:55 
GeneralRe: How to scroll text in dev c++ in c++ code? Pin
zeyan13-Feb-06 13:19
zeyan13-Feb-06 13:19 
AnswerRe: How to scroll text in dev c++ in c++ code? Pin
Ed K14-Feb-06 12:05
Ed K14-Feb-06 12:05 
QuestionWindows threads Pin
hyyppa10-Feb-06 1:51
hyyppa10-Feb-06 1:51 
AnswerRe: Windows threads Pin
toxcct10-Feb-06 2:06
toxcct10-Feb-06 2:06 
AnswerRe: Windows threads Pin
Eytukan16-Feb-06 4:54
Eytukan16-Feb-06 4:54 
QuestionLamp Control Pin
felixix9-Feb-06 10:48
felixix9-Feb-06 10:48 
I'm trying to make a lamp control with a 'LampOn' property. If the LampOn property is true, the control shows an image of a green lamp. If it's false, the control shows a red lamp. The two lamps are resources and the image is displayed as the background image of the control. Nothing else is displayed in the control.

I use this code for the LampOn property:
property bool LampOn {<br />
			bool get() {<br />
				return (BackgroundImage == (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"on"))));<br />
			}<br />
			void set(bool val) {<br />
				if (val) <br />
					BackgroundImage = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"on")));<br />
				else <br />
					BackgroundImage = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"off")));<br />
			}<br />
		}


However, if I want to use the control in a windows form, the lamp won't be usable. The property appers but I can't switch it to true. I'm pretty sure this has to do with the get code in the property. Any ideas what I did wrong?

Here the whole project (VC 2005): Click
AnswerRe: Lamp Control Pin
George L. Jackson9-Feb-06 12:14
George L. Jackson9-Feb-06 12:14 
QuestionWebBrowser Control Event problem on CE.Net Device Pin
daniel_godshall9-Feb-06 10:44
daniel_godshall9-Feb-06 10:44 
Questionoutputting text on-screen Pin
Peter Charlesworth9-Feb-06 7:32
Peter Charlesworth9-Feb-06 7:32 
AnswerRe: outputting text on-screen Pin
George L. Jackson9-Feb-06 12:29
George L. Jackson9-Feb-06 12:29 
QuestionMulti threaded programming Pin
RanjanShrestha9-Feb-06 7:23
RanjanShrestha9-Feb-06 7:23 
QuestionFind a string Pin
picasso29-Feb-06 7:20
picasso29-Feb-06 7:20 
AnswerRe: Find a string Pin
RanjanShrestha9-Feb-06 7:27
RanjanShrestha9-Feb-06 7:27 
GeneralRe: Find a string Pin
picasso29-Feb-06 7:49
picasso29-Feb-06 7:49 
GeneralRe: Find a string Pin
RanjanShrestha9-Feb-06 8:04
RanjanShrestha9-Feb-06 8:04 
GeneralRe: Find a string Pin
picasso29-Feb-06 8:37
picasso29-Feb-06 8:37 
GeneralRe: Find a string Pin
perlmunger10-Feb-06 11:15
perlmunger10-Feb-06 11:15 
QuestionBoost threading. Pin
hyyppa9-Feb-06 1:19
hyyppa9-Feb-06 1:19 
AnswerRe: Boost threading. Pin
Nemanja Trifunovic9-Feb-06 1:45
Nemanja Trifunovic9-Feb-06 1:45 
Questionusing VB classes in C++ code Pin
schrilax8-Feb-06 18:46
schrilax8-Feb-06 18:46 
AnswerRe: using VB classes in C++ code Pin
George L. Jackson9-Feb-06 13:02
George L. Jackson9-Feb-06 13:02 
QuestionMC++ Graphics HELP !!! Pin
hbjs8-Feb-06 17:03
hbjs8-Feb-06 17:03 
AnswerRe: MC++ Graphics HELP !!! Pin
George L. Jackson9-Feb-06 8:24
George L. Jackson9-Feb-06 8:24 

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.