vbnino
Messages postés218Date d'inscriptionjeudi 13 juillet 2006StatutMembreDernière intervention11 juillet 2010
-
24 juin 2007 à 20:25
vbnino
Messages postés218Date d'inscriptionjeudi 13 juillet 2006StatutMembreDernière intervention11 juillet 2010
-
25 juin 2007 à 18:08
Salut!
-Comment rendre un form transparente, que la form, les controls reste visible.
jmfmarques
Messages postés7666Date d'inscriptionsamedi 5 novembre 2005StatutMembreDernière intervention22 août 201427 24 juin 2007 à 21:12
"Comment rendre un form transparente, que la form, les controls reste visible."
Précise, s'il te plait, notamment en ce qui concerne ce que tu entends exactement par "Form transprente" !
Transparente ou translucide ? (ce n'est pas la même chose ...)
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal HWND As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function 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) As Long
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1000
Me.BackColor = vbBlue
Me.Move Screen.Width / 3, Screen.Height / 3
End Sub
Private Sub Timer1_Timer()
Static toto As Boolean
If toto Then
SetWindowLong Me.HWND, GWL_EXSTYLE, 0
Me.Hide
Me.Refresh
Me.Show
Else
SetWindowLong Me.HWND, GWL_EXSTYLE, WS_EX_TRANSPARENT
SetWindowPos Me.HWND, HWND_NOTOPMOST, 0&, 0&, 0&, 0&, SWP_SHOWME
End If
toto = Not toto
End Sub
jmfmarques
Messages postés7666Date d'inscriptionsamedi 5 novembre 2005StatutMembreDernière intervention22 août 201427 25 juin 2007 à 14:30
Evidemment que ça clignote (toutes les secondes, même )...
Voilà exactement ce que je voulais savoir... et je le sais maintenant !
Tu ne sais pas analyser... juste copier/coller... mais tu veux approcher l'utlisation de fonctions de l'API !
Je t'ai pourtant tout donné, là ... mais tu ne sais qu'en faire...
Ne compte pas sur moi pour aller plus loin (je ne veux pas être le complice de çà !!!)
vbnino
Messages postés218Date d'inscriptionjeudi 13 juillet 2006StatutMembreDernière intervention11 juillet 2010 25 juin 2007 à 14:41
Excuse moi , ta raison je fais que copie\coller , mais maintenant j'ai bien veu le code et j'ai fais des modification voila:
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_TRANSPARENT = &H20&
Private Const SWP_FRAMECHANGED = &H20
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const SWP_SHOWME = SWP_FRAMECHANGED Or _
SWP_NOMOVE Or SWP_NOSIZE
Private Const HWND_NOTOPMOST = -2
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal HWND As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function 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) As Long
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1000
Static toto As Boolean
If toto Then
SetWindowLong Me.HWND, GWL_EXSTYLE, 0
Me.Hide
Me.Refresh
Me.Show
Else
SetWindowLong Me.HWND, GWL_EXSTYLE, WS_EX_TRANSPARENT
SetWindowPos Me.HWND, HWND_NOTOPMOST, 0&, 0&, 0&, 0&, SWP_SHOWME
End If
jmfmarques
Messages postés7666Date d'inscriptionsamedi 5 novembre 2005StatutMembreDernière intervention22 août 201427 25 juin 2007 à 15:16
Hé bé !!!
Tu vas analyser, oui ?
Et te débarrasser de ce timer, oui ?????
et ne prendre dans le timer que ce qui te convient, oui ???? C'est pas vrai, çà !!!!!!