LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Show a picture

Solved!
Go to solution

Hello everybody,

 

I have a question. I think it is an easy one but I am not sure if it is the correct way. What I want to do, is to show a picture of a pin configuration. The picture is a .jpg data. So when the user presses a button a new window should pop up and show the picture of the pin configuration.

 

Now I have in my mind that when I press the button a new panel gets loaded. I found a module with the name "Picture". So I would use this module in the new panel and display the .jpg with it. Is this a good way or is there a better way. If yes, can someone explane the steps what I have to do?

 

Best regards

0 Kudos
Message 1 of 7
(4,329 Views)

Using the Picture Control, if that one is what you call "module" is the correct way to display images. DisplayImageFile is the easiest way to display a picture in a picture control.

Looking in the help and in the example finder will give you additional functions for this task.



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 7
(4,319 Views)

Thank you for your fast answer.

But I must also create a new panel? In the panel where I have the button there are also other things. My plan is to show the picture seperate.

0 Kudos
Message 3 of 7
(4,317 Views)

The DisplayImageFile can load images in various formats, not only bitmap files:

Displays the contents of an image file on a picture control.

This function supports the following image types: .tif, .pcx, .bmp, .dib, .rle, .ico, .jpg, .png, .wmf, and .emf.

 

Once loaded in memory the image becomes a bitmap object, but this does not imply you are limited to .bmp files. You actually may even not know anything of the bitmap object in memory if you only need to display the image file on the panel.

 

 



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 7
(4,307 Views)

Yeah I understand that. But what I mean is that I have some configuration on my panel. Now the user changed something on the panel and would like to get the old options. These old options are saved in the .png. When I press the button for the old options the pictures can be seen. The problem is, that I see the picture in the same panel as my options. Under the picture my options to change are hidden. So I would like to have the picture in a saperate window that I can shift on my computer where I want. So I can look on the picture an set the options on the panel. 🙂

 

0 Kudos
Message 5 of 7
(4,301 Views)
Solution
Accepted by topic author Fasching_K

You modified your post while I was answering! Smiley Wink

 

It's up to you where to put the picture control: you can either display it on a separate panel or have it hided and show it only at operator's request. It depends on how you develop the user interface. If not displayed on the main UI, you must create a panel for the picture control: controls must be placed on a panel.



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 7
(4,298 Views)

Ah sorry 🙂

 

Than you have answered my question. Thank you very much.

0 Kudos
Message 7 of 7
(4,295 Views)