Mise au premier plan d'une fenetre MDI Child par API et pas par Zorder

cs_azerty25 Messages postés 1114 Date d'inscription jeudi 19 décembre 2002 Statut Membre Dernière intervention 6 mai 2007 - 7 mai 2004 à 20:15
surfzoid Messages postés 463 Date d'inscription vendredi 15 août 2003 Statut Membre Dernière intervention 21 avril 2010 - 16 avril 2005 à 19:10
Lu all

LA quesrion et donc dans le titre, et je veux faire par API afin d'utiliser son handle et pas son nom dans mon code, mais aucune API n'a l'air de fonctionner ou je n'ai pas trouvé la bonne. J'ai déja fouillé le forum mais j'ai pas trouvé de réponse. Merci d'avance à ceux qui savent de me donner un chti coup de main ;)

@Z3RtY25 ==

4 réponses

cs_jonathan2002 Messages postés 28 Date d'inscription dimanche 22 décembre 2002 Statut Membre Dernière intervention 15 mai 2004
15 mai 2004 à 00:44
Public Declare Sub SetWindowPos Lib "user32" (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)
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_SHOWWINDOW = &H40

Select Case Tick1.checked
Case False
SetWindowPos Me.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
Case True
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Select

Jonathan
0
cs_azerty25 Messages postés 1114 Date d'inscription jeudi 19 décembre 2002 Statut Membre Dernière intervention 6 mai 2007
15 mai 2004 à 19:36
Désolé, ce code sert à mettre une fenetre en topmost, pas au premier plan, et elle ne fonctionne dans un environnement MDI

@Z3RtY25 ==
0
cs_jonathan2002 Messages postés 28 Date d'inscription dimanche 22 décembre 2002 Statut Membre Dernière intervention 15 mai 2004
16 mai 2004 à 16:21
frm.setfocus ? alors
0
surfzoid Messages postés 463 Date d'inscription vendredi 15 août 2003 Statut Membre Dernière intervention 21 avril 2010
16 avril 2005 à 19:10
slut azerty25

si ca peut t aider regarde a lafin de ce post :



sinon http://www.vbfrance.com/forum.v2.aspx?ID=37193&post=ok
0
Rejoignez-nous