division classique avec le symbole / Ó/C3 division entière avec la fonction ENT =ENT(D3/C3) ;o)))
et si on a perdu le "/" ...... on aurait pu rajouter : =EXP(LN(D3)-LN(C3)) @+
Clément Marcotte
Bonjour,
et si on a perdu le "/" ...... on aurait pu rajouter : =EXP(LN(D3)-LN(C3)) @+
J'y pensais pas à celle-là. En passant, savais-tu que l'on pouvait, du moins selon quelqu'un, mettre une barre de progression dans un MsgBox ? -- On apprend pas à un vieux singe à faire des grimaces
Bonjour,
et si on a perdu le "/" ......
on aurait pu rajouter :
=EXP(LN(D3)-LN(C3))
@+
J'y pensais pas à celle-là. En passant, savais-tu que l'on pouvait,
du moins selon quelqu'un, mettre une barre de progression dans un
MsgBox ?
--
On apprend pas à un vieux singe à faire des grimaces
et si on a perdu le "/" ...... on aurait pu rajouter : =EXP(LN(D3)-LN(C3)) @+
J'y pensais pas à celle-là. En passant, savais-tu que l'on pouvait, du moins selon quelqu'un, mettre une barre de progression dans un MsgBox ? -- On apprend pas à un vieux singe à faire des grimaces
Michel NOLF
Bien vu Clement! Amicalement Michel
"Clément Marcotte" a écrit dans le message de news:
Bonjour,
et si on a perdu le "/" ...... on aurait pu rajouter : =EXP(LN(D3)-LN(C3)) @+
J'y pensais pas à celle-là. En passant, savais-tu que l'on pouvait, du moins selon quelqu'un, mettre une barre de progression dans un MsgBox ? -- On apprend pas à un vieux singe à faire des grimaces
Bien vu Clement!
Amicalement Michel
"Clément Marcotte" <clement.marcotte@sympatico.ca> a écrit dans le message
de news: uIMRih6QFHA.4020@tk2msftngp13.phx.gbl...
Bonjour,
et si on a perdu le "/" ......
on aurait pu rajouter :
=EXP(LN(D3)-LN(C3))
@+
J'y pensais pas à celle-là. En passant, savais-tu que l'on pouvait,
du moins selon quelqu'un, mettre une barre de progression dans un
MsgBox ?
--
On apprend pas à un vieux singe à faire des grimaces
"Clément Marcotte" a écrit dans le message de news:
Bonjour,
et si on a perdu le "/" ...... on aurait pu rajouter : =EXP(LN(D3)-LN(C3)) @+
J'y pensais pas à celle-là. En passant, savais-tu que l'on pouvait, du moins selon quelqu'un, mettre une barre de progression dans un MsgBox ? -- On apprend pas à un vieux singe à faire des grimaces
Alain CROS
Bonjour.
J'y pensais pas à celle-là. En passant, savais-tu que l'on pouvait, du moins selon quelqu'un, mettre une barre de progression dans un MsgBox ?
Il semblerai que ce soit un spécialiste des API ... alors peut être comme ça.
Alain CROS
Cet exemple affiche une boite de message contenant une barre de progression qui, lorsqu'elle est terminée, ferme la boite de message. Le code suivant devra être placé dans un module à cause de l'opérateur AddressOf.
Private Declare Function GetParent& _ Lib "user32" _ (ByVal Hwnd&)
Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type
Private lgHook&, PbHwnd&
Sub ProgressMsgBox() Const WH_CBT& = &H5 lgHook = SetWindowsHookEx(WH_CBT, AddressOf LeHook, 0&, GetCurrentThreadId) MsgBox "Boite de message avec ProgressBar", , "Utilisation de SetTimer" End Sub
Private Function LeHook&(ByVal lMsg&, ByVal wParam&, ByRef lParam&) Const PBM_SETBARCOLOR& = &H409, PBM_SETBKCOLOR& = &H2001, _ HCBT_ACTIVATE& = &H5, WS_CHILD& = &H40000000, _ WS_VISIBLE& = &H10000000, SW_HIDE& = 0& Dim Rtc As RECT If lMsg = HCBT_ACTIVATE Then ShowWindow GetDlgItem(wParam, 1&), SW_HIDE GetClientRect wParam, Rtc With Rtc PbHwnd = CreateWindowEx(0&, "msctls_progress32", "", WS_CHILD Or WS_VISIBLE, _ .Right * 1& / 10&, .Bottom * 7& / 10&, .Right * 8& / 10&, _ .Bottom * 2& / 10&, wParam, 0&, 0&, 0&) End With SendMessage PbHwnd, PBM_SETBARCOLOR, 0&, ByVal &HFF SendMessage PbHwnd, PBM_SETBKCOLOR, 0&, ByVal &HFFFF& SetTimer wParam, 1&, 300&, AddressOf StopMsgBox UnhookWindowsHookEx lgHook End If LeHook = False End Function
Private Sub StopMsgBox() Const WM_SYSCOMMAND& = &H112, SC_CLOSE& = &HF060, _ PBM_GETPOS& = &H408, PBM_STEPIT& = &H405 Dim AppHwnd&, BdHwnd& If SendMessage(PbHwnd, PBM_GETPOS, 0&, 0&) < 100& Then SendMessage PbHwnd, PBM_STEPIT, 0&, 0& Else BdHwnd = GetParent(PbHwnd) AppHwnd = GetParent(BdHwnd) KillTimer BdHwnd, 1& EnableWindow AppHwnd, True SendMessage BdHwnd, WM_SYSCOMMAND, SC_CLOSE, 0& End If End Sub
Bonjour.
J'y pensais pas à celle-là. En passant, savais-tu que l'on pouvait,
du moins selon quelqu'un, mettre une barre de progression dans un
MsgBox ?
Il semblerai que ce soit un spécialiste des API ... alors peut être comme ça.
Alain CROS
Cet exemple affiche une boite de message contenant une barre de progression qui, lorsqu'elle est terminée, ferme la boite de
message.
Le code suivant devra être placé dans un module à cause de l'opérateur AddressOf.
Private Declare Function GetParent& _
Lib "user32" _
(ByVal Hwnd&)
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private lgHook&, PbHwnd&
Sub ProgressMsgBox()
Const WH_CBT& = &H5
lgHook = SetWindowsHookEx(WH_CBT, AddressOf LeHook, 0&, GetCurrentThreadId)
MsgBox "Boite de message avec ProgressBar", , "Utilisation de SetTimer"
End Sub
Private Function LeHook&(ByVal lMsg&, ByVal wParam&, ByRef lParam&)
Const PBM_SETBARCOLOR& = &H409, PBM_SETBKCOLOR& = &H2001, _
HCBT_ACTIVATE& = &H5, WS_CHILD& = &H40000000, _
WS_VISIBLE& = &H10000000, SW_HIDE& = 0&
Dim Rtc As RECT
If lMsg = HCBT_ACTIVATE Then
ShowWindow GetDlgItem(wParam, 1&), SW_HIDE
GetClientRect wParam, Rtc
With Rtc
PbHwnd = CreateWindowEx(0&, "msctls_progress32", "", WS_CHILD Or WS_VISIBLE, _
.Right * 1& / 10&, .Bottom * 7& / 10&, .Right * 8& / 10&, _
.Bottom * 2& / 10&, wParam, 0&, 0&, 0&)
End With
SendMessage PbHwnd, PBM_SETBARCOLOR, 0&, ByVal &HFF
SendMessage PbHwnd, PBM_SETBKCOLOR, 0&, ByVal &HFFFF&
SetTimer wParam, 1&, 300&, AddressOf StopMsgBox
UnhookWindowsHookEx lgHook
End If
LeHook = False
End Function
Private Sub StopMsgBox()
Const WM_SYSCOMMAND& = &H112, SC_CLOSE& = &HF060, _
PBM_GETPOS& = &H408, PBM_STEPIT& = &H405
Dim AppHwnd&, BdHwnd&
If SendMessage(PbHwnd, PBM_GETPOS, 0&, 0&) < 100& Then
SendMessage PbHwnd, PBM_STEPIT, 0&, 0&
Else
BdHwnd = GetParent(PbHwnd)
AppHwnd = GetParent(BdHwnd)
KillTimer BdHwnd, 1&
EnableWindow AppHwnd, True
SendMessage BdHwnd, WM_SYSCOMMAND, SC_CLOSE, 0&
End If
End Sub
J'y pensais pas à celle-là. En passant, savais-tu que l'on pouvait, du moins selon quelqu'un, mettre une barre de progression dans un MsgBox ?
Il semblerai que ce soit un spécialiste des API ... alors peut être comme ça.
Alain CROS
Cet exemple affiche une boite de message contenant une barre de progression qui, lorsqu'elle est terminée, ferme la boite de message. Le code suivant devra être placé dans un module à cause de l'opérateur AddressOf.
Private Declare Function GetParent& _ Lib "user32" _ (ByVal Hwnd&)
Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type
Private lgHook&, PbHwnd&
Sub ProgressMsgBox() Const WH_CBT& = &H5 lgHook = SetWindowsHookEx(WH_CBT, AddressOf LeHook, 0&, GetCurrentThreadId) MsgBox "Boite de message avec ProgressBar", , "Utilisation de SetTimer" End Sub
Private Function LeHook&(ByVal lMsg&, ByVal wParam&, ByRef lParam&) Const PBM_SETBARCOLOR& = &H409, PBM_SETBKCOLOR& = &H2001, _ HCBT_ACTIVATE& = &H5, WS_CHILD& = &H40000000, _ WS_VISIBLE& = &H10000000, SW_HIDE& = 0& Dim Rtc As RECT If lMsg = HCBT_ACTIVATE Then ShowWindow GetDlgItem(wParam, 1&), SW_HIDE GetClientRect wParam, Rtc With Rtc PbHwnd = CreateWindowEx(0&, "msctls_progress32", "", WS_CHILD Or WS_VISIBLE, _ .Right * 1& / 10&, .Bottom * 7& / 10&, .Right * 8& / 10&, _ .Bottom * 2& / 10&, wParam, 0&, 0&, 0&) End With SendMessage PbHwnd, PBM_SETBARCOLOR, 0&, ByVal &HFF SendMessage PbHwnd, PBM_SETBKCOLOR, 0&, ByVal &HFFFF& SetTimer wParam, 1&, 300&, AddressOf StopMsgBox UnhookWindowsHookEx lgHook End If LeHook = False End Function
Private Sub StopMsgBox() Const WM_SYSCOMMAND& = &H112, SC_CLOSE& = &HF060, _ PBM_GETPOS& = &H408, PBM_STEPIT& = &H405 Dim AppHwnd&, BdHwnd& If SendMessage(PbHwnd, PBM_GETPOS, 0&, 0&) < 100& Then SendMessage PbHwnd, PBM_STEPIT, 0&, 0& Else BdHwnd = GetParent(PbHwnd) AppHwnd = GetParent(BdHwnd) KillTimer BdHwnd, 1& EnableWindow AppHwnd, True SendMessage BdHwnd, WM_SYSCOMMAND, SC_CLOSE, 0& End If End Sub