Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

ImageViewer BackColor property at runtime

Solved!
Go to solution

Hi,

I use IMAQ Vision Development Moule 2010 with VS 2010.  I observed that the backcolor property is not active at runtime although it can be changed at design time.

Is it a bug? I also observed that palette type is not changed  at r untime.

 

24270i080A69E48951848B

 

All help is appreciated.

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 1 of 5
(3,803 Views)

Are you using the correct property node?  I've used the following at it seems to work. 

 

Let me know if you have any additional information.

 

24338i76B8557B77B7EF02

Tejinder Gill
National Instruments
Applications Engineer
Visit ni.com/gettingstarted for step-by-step help in setting up your system.
0 Kudos
Message 2 of 5
(3,781 Views)

Thanks for your response,

I changed the BackColor property in design time which implies that it is the correct property. It is not changed at runtime. The case is reversed for Palette Type property as the property can be effectively changed only at runtime.

 

P.S: I use Visual Studio 2010, not LABVIEW

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 3 of 5
(3,756 Views)
Solution
Accepted by topic author wbadry

There is a property called Image Area Fill Style which you need to set to Solid rather than Default.  Then you should be able to change the color during runtime.  If you have it set to Default, it will not allow you to change colors.  Sorry I forgot you were using Visual Studio.  Even though I'm using LabVIEW, you should be able to do the same thing in Visual Studio, just set both these properties.

 

*Edit: Just a small note, there is no need for me to use an explicitly linked property node here.

 

Hope this helps!

 

 

24524i78E4AE22EDC8B7D7

 

Tejinder Gill
National Instruments
Applications Engineer
Visit ni.com/gettingstarted for step-by-step help in setting up your system.
Message 4 of 5
(3,739 Views)

Hi,

I searched for the property you mentioned and finally found it. Here is the code for future reference (In VB.NET):

 

 

imgPreview.BackgroundOptions.FillStyle = NationalInstruments.Vision.WindowsForms.BackgroundFillStyle.Solid
imgPreview.BackColor = Color.Black

 

 

By the way, I got a weired suggesstion from NI Arabia to compile your labview code and use it as a Dll in my project !!!.

 

Thanks Tejinder for your help

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 5 of 5
(3,669 Views)