01-11-2016 11:02 PM - edited 01-11-2016 11:10 PM
I want to create a custom shaped popup window (other than rectangular shape). For this I have created a front panel with green (0x00FF00) background color, placed the shape I want as background image. Now the un-necessary part is in green color. I have then used a windows function (USER32.DLL: SetLayeredWindowAttributs) to make the green color transparent. It works for me, but the issue here is it takes some time to become transparent.For a fraction of a second,the green color is visible to the user. Is there any other method to make some part of the window transparent ?
Solved! Go to Solution.
01-11-2016 11:40 PM
Make your front panel hidden when open, use property node to make it visible after you called the SetLayeredWindowAttributs.
01-12-2016 12:44 AM
Thanks for your reply. I had already tried this method, but un-necessary parts (green colored part) not becomes transparent. I think SetLayeredWindowAttributs works only when the front panel is visible.
01-12-2016 03:58 AM - edited 01-12-2016 04:00 AM
You probably need to get it to keep the VIs front panel closed/hidden until after you have made the call to USER32.dll (and make that one of the first calls you make). It is probably opening your front panel when loading the VI so it shows the panel before it has started executing - or you might not be calling it right at the start of your VI so there is some delay.
Oh - setting the panel to hidden should work - there is a difference between closed (no front panel) and hidden (open but not visible) - usually properties which can't be performed on close front panels work on hidden ones. If that still doesn't work - you could try to move the window position offscreen (e.g. -5000, -5000), show it, apply the property and then move it back.