[제품종류] IEC1000
[개발환경] Visual Studio 2008 C#
=============== 질 문 ===============안녕하세요.
화면 전환을하면 애니메이션이 먼저 뜨고 배경 이미지들이 뒤늦게 표시됩니다. (동영상 첨부)
배경 이미지나 애니메이션은 모두 SmartX 를 이용하여 표시중입니다.
가장 좋은것은 동시에 표시되는것이고 그게 불가능하다면 배경 이미지 먼저 표시 후 애니메이션이 나왔으면합니다.
관련 자료나 다른 방법은 없는지 알려주시면 감사하겠습니다.
수고하세요.
=============== 답 변 ===============
안녕하세요.
문의 사항과 첨부해주신 동영상을 통해 문제를 확인하였습니다.
Animation GIF의 경우 GIF가 재생되고 있는 Form에서 다른 Form으로 출력 화면이 변경되었을 때 잔상이 발생되는 이유는 Play
되는 상태에서 CPU 사용량이 증가하여 화면 갱신 시 지연이 발생되는 문제로 이를 해결하기 위해서는 화면 전환 시 Animation을
Stop 처리 후 다시 GIF가 있는 Form으로 출력 화면이 돌아왔을 때 Play해주시기 바랍니다.
아래의 예시 코드를 참고하여 실사용에 적용 해보시기 바랍니다.
[예시 코드]
private Form2 frm2;
private void Form1_Load(object sender, EventArgs e)
{
smartForm1.MainForm = this;
frm2 = new Form2();
smartForm1.AddChildForm(frm2);
smartPictureBox1.AnimationGIF.SetGifFile("Flash Disk\\GIF\\Animation_1.gif");
smartPictureBox2.AnimationGIF.SetGifFile("Flash Disk\\GIF\\Animation_2.gif");
smartForm1.Show(0);
}
private void smartButton1_Click(object sender, EventArgs e)
{
smartForm1.Show(1);
}
private void smartForm1_OnEventFormChanged(int iFormIndex)
{
if (iFormIndex == 0)
{
smartPictureBox1.AnimationGIF.Play();
smartPictureBox2.AnimationGIF.Play();
Application.DoEvents();
}
else
{
smartPictureBox1.AnimationGIF.Stop();
smartPictureBox2.AnimationGIF.Stop();
Application.DoEvents();
}
}
private void Form1_Closing(object sender, CancelEventArgs e)
{
smartPictureBox1.AnimationGIF.Stop();
smartPictureBox2.AnimationGIF.Stop();
}