Windows OnTop (Form Yang Selalu Diatas)

Posted: Desember 5, 2008 in Download, Programming, Source Code, Visual Basic .Net, Visual Basic 6
Tag:, ,

‘// API Code Untuk membuat Form tetap pada posisi teratas
Private Declare Function SetWindowPos Lib “user32” (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, Y, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Const TOPMOST_FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Public sNamaRadiografer, sNamaRadiografer1 As String
Public snourutrad, snourutrad1 As String
Public PrinterName$, PrinterDriver$, PrinterPort$
Public cbolPrint As Boolean

Sub FormNormal(lngHwnd As Long)
SetWindowPos lngHwnd, HWND_NOTOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub

Sub FormTop(lngHwnd As Long)
SetWindowPos lngHwnd, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub

Iklan
Komentar
  1. Tony Agustian berkata:

    Cara pemanggilannya :

    FormNormal(hwnd)

    atau

    FormTop(hwnd)

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s