Jump to content

quiz em visual basic 2010


luisleao
 Share

Recommended Posts

Bom dia

Tens aqui exemplo de duas forms e o quiz

Tens aqui um exemplo de fazer slide as forms estilo um efeito.

Quando passas de uma para a outra.

Module Module1

Public Enum AnimateWindowFlags
	AW_HOR_POSITIVE = &H1
	AW_HOR_NEGATIVE = &H2
	AW_VER_POSITIVE = &H4
	AW_VER_NEGATIVE = &H8
	AW_CENTER = &H10
	AW_HIDE = &H10000
	AW_ACTIVATE = &H20000
	AW_SLIDE = &H40000
	AW_BLEND = &H80000
End Enum

Dim f1 As Form1

Public Declare Auto Function AnimateWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As AnimateWindowFlags) As Boolean

Sub Main()
	f1 = New Form1
	Dim xx As Integer = Screen.PrimaryScreen.Bounds.Width - f1.Size.Width
	Dim yy As Integer = Screen.PrimaryScreen.Bounds.Height / 2 - (f1.Size.Height / 2)
	f1.Location = New Point(xx, yy)
	Application.Run(f1)
End Sub

Sub animateWin(ByVal frmToAnimate As Form, ByVal showForm As Boolean)
	If showForm Then
		AnimateWindow(frmToAnimate.Handle, 1000, AnimateWindowFlags.AW_HOR_NEGATIVE Or AnimateWindowFlags.AW_SLIDE)
	Else
		AnimateWindow(frmToAnimate.Handle, 1000, AnimateWindowFlags.AW_HOR_POSITIVE Or AnimateWindowFlags.AW_HIDE)
	End If

End Sub


End Module

Nuno Revez

@informaster

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.