Ladda gärna ner api-guide också (kan inte adressen, fel dator). Den verkar fungera bättre i det avseendet. Hade problem med just appactivate när jag hade både hwnd samt titel. >appactivate (fönstrets hwnd) Prova API anropet SetForegroundWindow(hwnd) Fungerar inte under nt, win2000 eller XP. Eftersom det är oartigt att popa upp sina fönster framför andra applikationer.Sv: Visa fönster
Sv: Visa fönster
AppActivate tar ingen hWnd parameter. Hur ska man då göra?
/ PeterSv: Visa fönster
Nedanstående är från API-guiden som finns på http://www.allapi.net
The SetForegroundWindow function puts the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, and various visual cues are changed for the user.
<code>
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim lHandle As Long
'First we're going to retrieve the handle of this window
' "ThunderRT5Form" is the classname of a VB-window
lHandle = FindWindow("ThunderRT5Form", Me.Caption)
'Set this window to the foreground
lHandle = SetForegroundWindow(lHandle)
End Sub
</code>
//
JanneSv: Visa fönster