Animated GIF

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 1 year and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
CPedigo_RWBaird
Posts: 4
Last visit: Tue Mar 05, 2024 5:03 am

Animated GIF

Post by CPedigo_RWBaird »

PowerShell Studio 2022, version 5.8.202
OS: Windows 10 Pro 21H2, 64-bit

I have a psf file that contains an animated Gif that is used as a splash/loading screen. I copied the file and the Gif file from a project where it works, but in my new project it displays but is not animated. I compared the properties for both and everything is identical.

I am relatively new to PowerShell Studio (but not PowerShell) and am wondering what I am missing. Is there something that needs to be defined at the project level? I realize I have a lot of learning to do but I am in a little bit of a time crunch.
CPedigo_RWBaird
Posts: 4
Last visit: Tue Mar 05, 2024 5:03 am

Re: Animated GIF

Post by CPedigo_RWBaird »

Update: If I click "Preview GUI" it works...
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: Animated GIF

Post by brittneyr »

Without seeing code, I can only make guesses.

Please answer the following:
- Does the form with the splash screen run on its own outside of the project?
- Have you tried resetting the image used for the splash screen if you are using the splash screen form template?
- Are you calling this form differently in your new project vs your old project?
Brittney
SAPIEN Technologies, Inc.
CPedigo_RWBaird
Posts: 4
Last visit: Tue Mar 05, 2024 5:03 am

Re: Animated GIF

Post by CPedigo_RWBaird »

Thank you for your reply!

Within my "Startup.pss" file my form "Loading.psf" (attached) is called with the following code in both projects in "Startup.pss":
if ((Show-Loading_psf) -eq 'OK')
{
}

Followed immediately by:
if((Show-MainForm_psf) -eq 'OK')
{
}

I also confirmed the build order is the same for both projects:
0 - Startup.pss
1 - Loading.psf
2 - Globals.ps1
3 - MainForm.psf
Attachments
Loading.psf
(54.34 KiB) Downloaded 67 times
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: Animated GIF

Post by brittneyr »

From the looks of your form, it appears to be a threading issue. If I comment out your code in your Shown event, the gif works as expected. I suggest moving this code to a background job.
Brittney
SAPIEN Technologies, Inc.
CPedigo_RWBaird
Posts: 4
Last visit: Tue Mar 05, 2024 5:03 am

Re: Animated GIF

Post by CPedigo_RWBaird »

Thank you! In researching further, I discovered other issue3s within this project that will require me to rewrite it altogether (several of the libraries needed for the interface are deprecated, for example, and not functioning as efficiently as they could), so I will start from scratch. That's what I get for trying to "fix" an inherited project. Thanks again for your imput!
This topic is 1 year and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.