반응형
* VBNET API 를 이용한 Form 생성 시 효과 나타 내기
Public Class Form1
Declare Function AnimateWindow Lib "user32" (ByVal hwnd As Integer, ByVal dwTime As Integer, ByVal dwFlags As Integer) As Boolean
Const AW_HOR_POSITIVE = &H1 'Animates the window from left to right. This flag can be used with roll or slide animation.
Const AW_HOR_NEGATIVE = &H2 'Animates the window from right to left. This flag can be used with roll or slide animation.
Const AW_VER_POSITIVE = &H4 'Animates the window from top to bottom. This flag can be used with roll or slide animation.
Const AW_VER_NEGATIVE = &H8 'Animates the window from bottom to top. This flag can be used with roll or slide animation.
Const AW_CENTER = &H10 'Makes the window appear to collapse inward if AW_HIDE is used or expand outward if the AW_HIDE is not used.
Const AW_HIDE = &H10000 'Hides the window. By default, the window is shown.
Const AW_ACTIVATE = &H20000 'Activates the window.
Const AW_SLIDE = &H40000 'Uses slide animation. By default, roll animation is used.
Const AW_BLEND = &H80000
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Center
Dim frm As Form2 = New Form2()
AnimateWindow(frm.Handle.ToInt32, 1000, AW_CENTER)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'AW_HOR_POSITIVE
Dim frm As Form2 = New Form2()
AnimateWindow(frm.Handle.ToInt32, 1000, AW_HOR_POSITIVE)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'AW_VER_POSITIVE
Dim frm As Form2 = New Form2()
AnimateWindow(frm.Handle.ToInt32, 1000, AW_VER_POSITIVE)
End Sub
End Class
반응형
'VB.NET Programming' 카테고리의 다른 글
[VBNET] String To 이진수, 이진수 To String 으로 변환 (0) | 2020.05.01 |
---|---|
[VBNET] Encoding Class - 유니코드 문자열 존재 여부 (0) | 2020.04.29 |
[VBNET] PC 사용 시간 얻어 오기 (PC Use Time) (0) | 2020.04.23 |
[VBNET] [API] mciSendString - WAV 파일 재생 (0) | 2020.04.21 |
[VBNET] SendKeys - 화면 캡쳐 (Screen Capture) (0) | 2020.04.16 |