Skip to Content
0

Splash Screen: How to create one in SDK?

Jul 17, 2017 at 10:32 AM

48

avatar image

Hi, everybody

We have created a small add-on using SDK and VB.NET, but without any visual tool like screen painter or SAP B1 Studio.

We now wish to add a splash screen (a screen which starts first when the add-on is run. It displays a logo with some information and then closes automatically after say 2 seconds, making way for the next screen).

We can add the splash screen using a windows form in VB.NET. However, with this method, the splash screen will not have exactly the same look as the subsequent screens in the add-on.

My question is:

Can we instead create the splash screen in SDK? How can we make the screen disappear after say 2 seconds?

Any suggestions are most welcome.

Thanks

Leon

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
DIEGO LOTHER Jul 17, 2017 at 11:40 AM
0

Hi Leon,

As I know, unfornately, there is no resource on sdk with this purpose. You need to implement by yourself.

Kind Regards,

Diego Lother

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hi Diego

Thanks for your reply.

My question is precisely how to implement it by myself.

Suppose I create a form (splash form) using UI API, and make it my startup form.

How can I make the form disappear after say 2 seconds and make another form (Form1) appear?

Surely this can be done? But how?

Best Regards,

Leon

0

Hi Leon,

A simple way to implement can be something like this:

Create a timer on your form that you want use as splash:

System.Timers.Timer _tmr = null;

When you initialize your form that you want use as splash, add this code:

_tmr = new System.Timers.Timer();
_tmr.Interval = 2000; //miliseconds
_tmr.Elapsed += _tmr_Elapsed;

On Elapsed event (This event will be fired after the interval was achieved)

private void _tmr_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
     _tmr.Stop();
     //open your new form
     //Close your current splash form
}

P.S: Just a suggestion, I didn't test the code.

Hope it helps.

Kind Regards,

Diego Lother

0

Hi, Diego

I guessed we had to use the timer (VB Function), but was not sure.

I'll test your code later, but I think it's good.

I'll let you know if it does not work.

Best Regards,

Leon

0

Hi Leon,

I believe that is the same Timer class for VB or C#.

Kind Regards,

Diego Lother

0