LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

set Picture

Solved!
Go to solution

Hello ! 

I want to set a picture on my uir but I don't know how to do it.. I have a button, when you click on it , a FileSelectPopup is appearing , we select an image and then i want the image to appear on my uir.

I wanted to do a SetCtrlAttribute with a Control Value but I don't see it ...

 

I also searched on the community but the web links just put me in the main page of the Manuel of Labwindows...

0 Kudos
Message 1 of 8
(1,811 Views)

Use a picture control where to load your image.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 8
(1,803 Views)

But how can I load the Picture ?

 

Kind regards

0 Kudos
Message 3 of 8
(1,800 Views)
Solution
Accepted by topic author estelle27

This is a very general question that refers to CVI as a whole rather than the picture control.

When you have a controlon a panel you can right-click on it to display a context menu that in case of the picture control contains the elements included in this page: Picture Control Overview

 

From this meu you can navigate into CVI help to locate the informations you need: in this case open Programming with Picture Controls and you will see how to load an image into the control.

 

This applies to every object you can put on a panel and is a very useful feature that I myself continue to use after many years working with CVI.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 8
(1,785 Views)

Okay I see, I tried to do it with the DisplayImageFile but the program break and it says that the function return -95, it's "file access permission denied" I don't really know what that means.. my image is a .png file, i saw on an other question in this forum that the DisplayImageFunction can have a .png image 

0 Kudos
Message 5 of 8
(1,781 Views)

File access permission denied error has nothing to do with the picture control: it rather refers to the program being unable to access the file, either because it is locked by another program or because there is a problem in permissions to the file. Are you able to open the file e.g. in Paint when the program fails to do so?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 6 of 8
(1,772 Views)

Okay  and yes I'm able to open the image with Paint

0 Kudos
Message 7 of 8
(1,769 Views)

I found the problem ! I had a Openfile that was opening the image , that's why I had the error !

Thanks a lot !

0 Kudos
Message 8 of 8
(1,768 Views)