je suis désolé, mais je n'est pas la propriété fermer (oui/non) dans l'onglet format
-----Message d'origine----- Bonjour.
voir la propriété Bouton fermer (oui/non) , onglet format de la fenêtre
propriétés.
-- @+ Raymond Access MVP http://access.seneque.free.fr/ http://access2003.free.fr/ http://users.skynet.be/mpfa/ pour débuter sur le forum
"NicolasB" a écrit dans le message de
news:2dd801c42881$dcb46a80$ Bonjour à tous,
Dans un état peux t'on enlever la croix de fermeture??
Merci pour votre aide
.
Raymond [mvp]
Autant pour moi. cette propriété n'existe que depuis access 2002. pour les versions antérieures il faut passer par une api, comme celle-ci:
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 GetWindowLong Lib "user32" _ Alias "GetWindowLongA" (ByVal hWnd As Long, _ ByVal nIndex As Long) As Long Private Const Const_nIndex = -16 Private Const Légende = &HC00000
Public Function LégendeVisible(Etat As Report, Afficher As Boolean) As Boolean Dim Rpt As Report On Error GoTo ErreurVisible Set Rpt = Etat Dim StyleActuel As Long Dim NouveauStyle As Long StyleActuel = GetWindowLong(Rpt.hWnd, Const_nIndex) If Afficher Then NouveauStyle = StyleActuel Or Légende Else NouveauStyle = StyleActuel And Not Légende End If StyleActuel = SetWindowLong(Rpt.hWnd, Const_nIndex, NouveauStyle) LégendeVisible = True Exit Function ErreurVisible: LégendeVisible = False End Function
Private Sub Report_Open(Cancel As Integer) LégendeVisible Me, False End Sub
-- @+ Raymond Access MVP http://access.seneque.free.fr/ http://access2003.free.fr/ http://users.skynet.be/mpfa/ pour débuter sur le forum
"NicolasB" a écrit dans le message de news:2e3401c42885$a59d7e20$ Bonjour raymond
je suis désolé, mais je n'est pas la propriété fermer (oui/non) dans l'onglet format
Autant pour moi.
cette propriété n'existe que depuis access 2002.
pour les versions antérieures il faut passer par une api, comme celle-ci:
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 GetWindowLong Lib "user32" _
Alias "GetWindowLongA" (ByVal hWnd As Long, _
ByVal nIndex As Long) As Long
Private Const Const_nIndex = -16
Private Const Légende = &HC00000
Public Function LégendeVisible(Etat As Report, Afficher As Boolean) As
Boolean
Dim Rpt As Report
On Error GoTo ErreurVisible
Set Rpt = Etat
Dim StyleActuel As Long
Dim NouveauStyle As Long
StyleActuel = GetWindowLong(Rpt.hWnd, Const_nIndex)
If Afficher Then
NouveauStyle = StyleActuel Or Légende
Else
NouveauStyle = StyleActuel And Not Légende
End If
StyleActuel = SetWindowLong(Rpt.hWnd, Const_nIndex, NouveauStyle)
LégendeVisible = True
Exit Function
ErreurVisible:
LégendeVisible = False
End Function
Private Sub Report_Open(Cancel As Integer)
LégendeVisible Me, False
End Sub
--
@+
Raymond Access MVP
http://access.seneque.free.fr/
http://access2003.free.fr/
http://users.skynet.be/mpfa/ pour débuter sur le forum
"NicolasB" <anonymous@discussions.microsoft.com> a écrit dans le message de
news:2e3401c42885$a59d7e20$a301280a@phx.gbl...
Bonjour raymond
je suis désolé, mais je n'est pas la propriété fermer
(oui/non) dans l'onglet format
Autant pour moi. cette propriété n'existe que depuis access 2002. pour les versions antérieures il faut passer par une api, comme celle-ci:
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 GetWindowLong Lib "user32" _ Alias "GetWindowLongA" (ByVal hWnd As Long, _ ByVal nIndex As Long) As Long Private Const Const_nIndex = -16 Private Const Légende = &HC00000
Public Function LégendeVisible(Etat As Report, Afficher As Boolean) As Boolean Dim Rpt As Report On Error GoTo ErreurVisible Set Rpt = Etat Dim StyleActuel As Long Dim NouveauStyle As Long StyleActuel = GetWindowLong(Rpt.hWnd, Const_nIndex) If Afficher Then NouveauStyle = StyleActuel Or Légende Else NouveauStyle = StyleActuel And Not Légende End If StyleActuel = SetWindowLong(Rpt.hWnd, Const_nIndex, NouveauStyle) LégendeVisible = True Exit Function ErreurVisible: LégendeVisible = False End Function
Private Sub Report_Open(Cancel As Integer) LégendeVisible Me, False End Sub
-- @+ Raymond Access MVP http://access.seneque.free.fr/ http://access2003.free.fr/ http://users.skynet.be/mpfa/ pour débuter sur le forum
"NicolasB" a écrit dans le message de news:2e3401c42885$a59d7e20$ Bonjour raymond
je suis désolé, mais je n'est pas la propriété fermer (oui/non) dans l'onglet format