PDA

Orijinalini görmek için tıklayınız : [VBNET] Topmost Kullanımı



emreonal
21.Temmuz.2015, 00:02
Visual Basic 6 dili için kullanacağınız api,

Kod:
Public Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Birden çok form için kullanacaksan bir fonksiyon,

Kod:
Public Sub onTOP(theForm As Form, State As Integer)
SetWindowPos theForm.hwnd, State - 2, 0, 0, 0, 0, 3
End Sub
Kullanımı,

Kod:
onTOP Form1, Check1.Value
form1'i check1 işaretliyse üstte tutar, değilse tutmaz.