This is my code:

Private Sub NextForm()
        Form2.Show()
        Me.hide() 
    End Sub

Problem: The first form fades out and the second form fades in. Between the transition of Show() and Hide(), the actual desktop is seen.

The only solutions that I could think of is;
1. Not to hide the first form while showing the second form.
2. Actually not switch forms just switch controls.

Solution: I want it too look like the transition is instantaneous without seeing the desktop, is there any simpler way to do this?.

Recommended Answers

All 4 Replies

its just a guess but it might does the trick
after Form2.Show do a while loop for checking if the Form2.Handle is not intptr.Zero before hiding form1.

or

u set Form2 to topmost

its just a guess but it might does the trick
after Form2.Show do a while loop for checking if the Form2.Handle is not intptr.Zero before hiding form1.

or

u set Form2 to topmost

Tried your first suggestion, my program went haywire.

Anyway, there is a fade in transition of Form2.Show(). Thats why the desktop is in view before the Form2 loads.

I hope my problem can be understood.

The fading is a system option for windows. The user enables/disables that for the entire system. Obviously having the fade decreases performance. Why are you trying to alter the default behavior of a form?

Start -- Settings -- Control Panel -- System
Select "Advanced" tab, then hit the "Settings" button under "Performance"

You will see many UI options there.

The fading is a system option for windows. The user enables/disables that for the entire system. Obviously having the fade decreases performance. Why are you trying to alter the default behavior of a form?

Start -- Settings -- Control Panel -- System
Select "Advanced" tab, then hit the "Settings" button under "Performance"

You will see many UI options there.

The first form fades out and the second form fades in. Between the transition of Show() and Hide(), the actual desktop is seen.

Thanks anyway

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.