Hi,
at the very beginning of my app I do a if app.previnstance then
unload me. It work if the exe stays in the same path, but I can start
an instance, then copy the exe and start another instance from the
other path. Is there a way to prevent this? I mean, is there
something more efficient than app.previnstance?
thanks
ThunderMusic
Hi,
at the very beginning of my app I do a if app.previnstance then
unload me. It work if the exe stays in the same path, but I can start
an instance, then copy the exe and start another instance from the
other path. Is there a way to prevent this? I mean, is there
something more efficient than app.previnstance?
thanks
ThunderMusic
Hi,
at the very beginning of my app I do a if app.previnstance then
unload me. It work if the exe stays in the same path, but I can start
an instance, then copy the exe and start another instance from the
other path. Is there a way to prevent this? I mean, is there
something more efficient than app.previnstance?
thanks
ThunderMusic
Bonjour/soir,
Tu peux essayer FindWindow pour identifier ton application par le titre..
tu trouves une fenêtre portant le titre, c'est que ton appli est déjà
chargé. Il faut alors que le titre ne change pas.
Sinon, les deux applications sont bien différentes puisqu'elles n'ont pas
même path/même nom... il est donc normal que PrevInstance renvoie faux.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message de
news:%
> Hi,
> at the very beginning of my app I do a if app.previnstance then
> unload me. It work if the exe stays in the same path, but I can start
> an instance, then copy the exe and start another instance from the
> other path. Is there a way to prevent this? I mean, is there
> something more efficient than app.previnstance?
>
> thanks
>
> ThunderMusic
Bonjour/soir,
Tu peux essayer FindWindow pour identifier ton application par le titre..
tu trouves une fenêtre portant le titre, c'est que ton appli est déjà
chargé. Il faut alors que le titre ne change pas.
Sinon, les deux applications sont bien différentes puisqu'elles n'ont pas
même path/même nom... il est donc normal que PrevInstance renvoie faux.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le message de
news:%23DSXAocYDHA.2632@TK2MSFTNGP09.phx.gbl
> Hi,
> at the very beginning of my app I do a if app.previnstance then
> unload me. It work if the exe stays in the same path, but I can start
> an instance, then copy the exe and start another instance from the
> other path. Is there a way to prevent this? I mean, is there
> something more efficient than app.previnstance?
>
> thanks
>
> ThunderMusic
Bonjour/soir,
Tu peux essayer FindWindow pour identifier ton application par le titre..
tu trouves une fenêtre portant le titre, c'est que ton appli est déjà
chargé. Il faut alors que le titre ne change pas.
Sinon, les deux applications sont bien différentes puisqu'elles n'ont pas
même path/même nom... il est donc normal que PrevInstance renvoie faux.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message de
news:%
> Hi,
> at the very beginning of my app I do a if app.previnstance then
> unload me. It work if the exe stays in the same path, but I can start
> an instance, then copy the exe and start another instance from the
> other path. Is there a way to prevent this? I mean, is there
> something more efficient than app.previnstance?
>
> thanks
>
> ThunderMusic
ok, but how do I use it in VB? because I always return 0
I use it like this :
hResult = FindWindow(0, FormTitle)
is it correct? is there something better?
thanks
ThunderMusic
"François Picalausa" wrote in message
news:Bonjour/soir,
Tu peux essayer FindWindow pour identifier ton application par le
titre.. si tu trouves une fenêtre portant le titre, c'est que ton
appli est déjà chargé. Il faut alors que le titre ne change pas.
Sinon, les deux applications sont bien différentes puisqu'elles
n'ont pas le même path/même nom... il est donc normal que
PrevInstance renvoie faux.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message
de news:%Hi,
at the very beginning of my app I do a if app.previnstance then
unload me. It work if the exe stays in the same path, but I can
start an instance, then copy the exe and start another instance
from the other path. Is there a way to prevent this? I mean, is
there
something more efficient than app.previnstance?
thanks
ThunderMusic
ok, but how do I use it in VB? because I always return 0
I use it like this :
hResult = FindWindow(0, FormTitle)
is it correct? is there something better?
thanks
ThunderMusic
"François Picalausa" <fpicalausa@chez.com> wrote in message
news:ONVoFwcYDHA.1204@TK2MSFTNGP12.phx.gbl...
Bonjour/soir,
Tu peux essayer FindWindow pour identifier ton application par le
titre.. si tu trouves une fenêtre portant le titre, c'est que ton
appli est déjà chargé. Il faut alors que le titre ne change pas.
Sinon, les deux applications sont bien différentes puisqu'elles
n'ont pas le même path/même nom... il est donc normal que
PrevInstance renvoie faux.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le message
de news:%23DSXAocYDHA.2632@TK2MSFTNGP09.phx.gbl
Hi,
at the very beginning of my app I do a if app.previnstance then
unload me. It work if the exe stays in the same path, but I can
start an instance, then copy the exe and start another instance
from the other path. Is there a way to prevent this? I mean, is
there
something more efficient than app.previnstance?
thanks
ThunderMusic
ok, but how do I use it in VB? because I always return 0
I use it like this :
hResult = FindWindow(0, FormTitle)
is it correct? is there something better?
thanks
ThunderMusic
"François Picalausa" wrote in message
news:Bonjour/soir,
Tu peux essayer FindWindow pour identifier ton application par le
titre.. si tu trouves une fenêtre portant le titre, c'est que ton
appli est déjà chargé. Il faut alors que le titre ne change pas.
Sinon, les deux applications sont bien différentes puisqu'elles
n'ont pas le même path/même nom... il est donc normal que
PrevInstance renvoie faux.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message
de news:%Hi,
at the very beginning of my app I do a if app.previnstance then
unload me. It work if the exe stays in the same path, but I can
start an instance, then copy the exe and start another instance
from the other path. Is there a way to prevent this? I mean, is
there
something more efficient than app.previnstance?
thanks
ThunderMusic
Bonjour/soir,
Il faut passer en premier argument un vbNullString (sauf si l'argument a
déclaré en tant que byval Long auquel cas, 0 est adapté):
'If the function fails, the return value is NULL
If FindWindow(vbNullString, Text1.Text) = 0 Then
MsgBox "Pas de fenêtre correspondante"
Else
MsgBox "La fenêtre a été trouvée"
End If
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message de
news:e7kGB$
> ok, but how do I use it in VB? because I always return 0
> I use it like this :
> hResult = FindWindow(0, FormTitle)
>
> is it correct? is there something better?
>
> thanks
>
> ThunderMusic
>
> "François Picalausa" wrote in message
> news:
>> Bonjour/soir,
>>
>>
>> Tu peux essayer FindWindow pour identifier ton application par le
>> titre.. si tu trouves une fenêtre portant le titre, c'est que ton
>> appli est déjà chargé. Il faut alors que le titre ne change pas.
>>
>> Sinon, les deux applications sont bien différentes puisqu'elles
>> n'ont pas le même path/même nom... il est donc normal que
>> PrevInstance renvoie faux.
>>
>> --
>> François Picalausa (MVP VB)
>> FAQ VB : http://faq.vb.free.fr
>> MSDN : http://msdn.microsoft.com
>>
>>
>> "ThunderMusic" a écrit dans le message
>> de news:%
>>> Hi,
>>> at the very beginning of my app I do a if app.previnstance then
>>> unload me. It work if the exe stays in the same path, but I can
>>> start an instance, then copy the exe and start another instance
>>> from the other path. Is there a way to prevent this? I mean, is
>>> there
>>> something more efficient than app.previnstance?
>>>
>>> thanks
>>>
>>> ThunderMusic
Bonjour/soir,
Il faut passer en premier argument un vbNullString (sauf si l'argument a
déclaré en tant que byval Long auquel cas, 0 est adapté):
'If the function fails, the return value is NULL
If FindWindow(vbNullString, Text1.Text) = 0 Then
MsgBox "Pas de fenêtre correspondante"
Else
MsgBox "La fenêtre a été trouvée"
End If
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le message de
news:e7kGB$cYDHA.2476@tk2msftngp13.phx.gbl
> ok, but how do I use it in VB? because I always return 0
> I use it like this :
> hResult = FindWindow(0, FormTitle)
>
> is it correct? is there something better?
>
> thanks
>
> ThunderMusic
>
> "François Picalausa" <fpicalausa@chez.com> wrote in message
> news:ONVoFwcYDHA.1204@TK2MSFTNGP12.phx.gbl...
>> Bonjour/soir,
>>
>>
>> Tu peux essayer FindWindow pour identifier ton application par le
>> titre.. si tu trouves une fenêtre portant le titre, c'est que ton
>> appli est déjà chargé. Il faut alors que le titre ne change pas.
>>
>> Sinon, les deux applications sont bien différentes puisqu'elles
>> n'ont pas le même path/même nom... il est donc normal que
>> PrevInstance renvoie faux.
>>
>> --
>> François Picalausa (MVP VB)
>> FAQ VB : http://faq.vb.free.fr
>> MSDN : http://msdn.microsoft.com
>>
>>
>> "ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le message
>> de news:%23DSXAocYDHA.2632@TK2MSFTNGP09.phx.gbl
>>> Hi,
>>> at the very beginning of my app I do a if app.previnstance then
>>> unload me. It work if the exe stays in the same path, but I can
>>> start an instance, then copy the exe and start another instance
>>> from the other path. Is there a way to prevent this? I mean, is
>>> there
>>> something more efficient than app.previnstance?
>>>
>>> thanks
>>>
>>> ThunderMusic
Bonjour/soir,
Il faut passer en premier argument un vbNullString (sauf si l'argument a
déclaré en tant que byval Long auquel cas, 0 est adapté):
'If the function fails, the return value is NULL
If FindWindow(vbNullString, Text1.Text) = 0 Then
MsgBox "Pas de fenêtre correspondante"
Else
MsgBox "La fenêtre a été trouvée"
End If
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message de
news:e7kGB$
> ok, but how do I use it in VB? because I always return 0
> I use it like this :
> hResult = FindWindow(0, FormTitle)
>
> is it correct? is there something better?
>
> thanks
>
> ThunderMusic
>
> "François Picalausa" wrote in message
> news:
>> Bonjour/soir,
>>
>>
>> Tu peux essayer FindWindow pour identifier ton application par le
>> titre.. si tu trouves une fenêtre portant le titre, c'est que ton
>> appli est déjà chargé. Il faut alors que le titre ne change pas.
>>
>> Sinon, les deux applications sont bien différentes puisqu'elles
>> n'ont pas le même path/même nom... il est donc normal que
>> PrevInstance renvoie faux.
>>
>> --
>> François Picalausa (MVP VB)
>> FAQ VB : http://faq.vb.free.fr
>> MSDN : http://msdn.microsoft.com
>>
>>
>> "ThunderMusic" a écrit dans le message
>> de news:%
>>> Hi,
>>> at the very beginning of my app I do a if app.previnstance then
>>> unload me. It work if the exe stays in the same path, but I can
>>> start an instance, then copy the exe and start another instance
>>> from the other path. Is there a way to prevent this? I mean, is
>>> there
>>> something more efficient than app.previnstance?
>>>
>>> thanks
>>>
>>> ThunderMusic
finalement, ca ne fonctionne pas. la fonction ne retourne jamais 0.
Est-ce normal?
j'y vais de cette facon :
hResult = FindWindow(vbNullString, FormTitle)
et le hResult est toujours <> 0, résultat, je ne peux jamais entrer
dans mon application
Est-ce que je fais quelque chose incorrectement?
merci
ThunderMusic
"François Picalausa" wrote in message
news:%Bonjour/soir,
Il faut passer en premier argument un vbNullString (sauf si
l'argument a été déclaré en tant que byval Long auquel cas, 0 est
adapté):
'If the function fails, the return value is NULL
If FindWindow(vbNullString, Text1.Text) = 0 Then
MsgBox "Pas de fenêtre correspondante"
Else
MsgBox "La fenêtre a été trouvée"
End If
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message
de news:e7kGB$ok, but how do I use it in VB? because I always return 0
I use it like this :
hResult = FindWindow(0, FormTitle)
is it correct? is there something better?
thanks
ThunderMusic
"François Picalausa" wrote in message
news:Bonjour/soir,
Tu peux essayer FindWindow pour identifier ton application par le
titre.. si tu trouves une fenêtre portant le titre, c'est que ton
appli est déjà chargé. Il faut alors que le titre ne change pas.
Sinon, les deux applications sont bien différentes puisqu'elles
n'ont pas le même path/même nom... il est donc normal que
PrevInstance renvoie faux.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le
message de news:%Hi,
at the very beginning of my app I do a if app.previnstance
then unload me. It work if the exe stays in the same path, but I
can
start an instance, then copy the exe and start another instance
from the other path. Is there a way to prevent this? I mean, is
there
something more efficient than app.previnstance?
thanks
ThunderMusic
finalement, ca ne fonctionne pas. la fonction ne retourne jamais 0.
Est-ce normal?
j'y vais de cette facon :
hResult = FindWindow(vbNullString, FormTitle)
et le hResult est toujours <> 0, résultat, je ne peux jamais entrer
dans mon application
Est-ce que je fais quelque chose incorrectement?
merci
ThunderMusic
"François Picalausa" <fpicalausa@chez.com> wrote in message
news:%23unjCEdYDHA.2136@TK2MSFTNGP10.phx.gbl...
Bonjour/soir,
Il faut passer en premier argument un vbNullString (sauf si
l'argument a été déclaré en tant que byval Long auquel cas, 0 est
adapté):
'If the function fails, the return value is NULL
If FindWindow(vbNullString, Text1.Text) = 0 Then
MsgBox "Pas de fenêtre correspondante"
Else
MsgBox "La fenêtre a été trouvée"
End If
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le message
de news:e7kGB$cYDHA.2476@tk2msftngp13.phx.gbl
ok, but how do I use it in VB? because I always return 0
I use it like this :
hResult = FindWindow(0, FormTitle)
is it correct? is there something better?
thanks
ThunderMusic
"François Picalausa" <fpicalausa@chez.com> wrote in message
news:ONVoFwcYDHA.1204@TK2MSFTNGP12.phx.gbl...
Bonjour/soir,
Tu peux essayer FindWindow pour identifier ton application par le
titre.. si tu trouves une fenêtre portant le titre, c'est que ton
appli est déjà chargé. Il faut alors que le titre ne change pas.
Sinon, les deux applications sont bien différentes puisqu'elles
n'ont pas le même path/même nom... il est donc normal que
PrevInstance renvoie faux.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le
message de news:%23DSXAocYDHA.2632@TK2MSFTNGP09.phx.gbl
Hi,
at the very beginning of my app I do a if app.previnstance
then unload me. It work if the exe stays in the same path, but I
can
start an instance, then copy the exe and start another instance
from the other path. Is there a way to prevent this? I mean, is
there
something more efficient than app.previnstance?
thanks
ThunderMusic
finalement, ca ne fonctionne pas. la fonction ne retourne jamais 0.
Est-ce normal?
j'y vais de cette facon :
hResult = FindWindow(vbNullString, FormTitle)
et le hResult est toujours <> 0, résultat, je ne peux jamais entrer
dans mon application
Est-ce que je fais quelque chose incorrectement?
merci
ThunderMusic
"François Picalausa" wrote in message
news:%Bonjour/soir,
Il faut passer en premier argument un vbNullString (sauf si
l'argument a été déclaré en tant que byval Long auquel cas, 0 est
adapté):
'If the function fails, the return value is NULL
If FindWindow(vbNullString, Text1.Text) = 0 Then
MsgBox "Pas de fenêtre correspondante"
Else
MsgBox "La fenêtre a été trouvée"
End If
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message
de news:e7kGB$ok, but how do I use it in VB? because I always return 0
I use it like this :
hResult = FindWindow(0, FormTitle)
is it correct? is there something better?
thanks
ThunderMusic
"François Picalausa" wrote in message
news:Bonjour/soir,
Tu peux essayer FindWindow pour identifier ton application par le
titre.. si tu trouves une fenêtre portant le titre, c'est que ton
appli est déjà chargé. Il faut alors que le titre ne change pas.
Sinon, les deux applications sont bien différentes puisqu'elles
n'ont pas le même path/même nom... il est donc normal que
PrevInstance renvoie faux.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le
message de news:%Hi,
at the very beginning of my app I do a if app.previnstance
then unload me. It work if the exe stays in the same path, but I
can
start an instance, then copy the exe and start another instance
from the other path. Is there a way to prevent this? I mean, is
there
something more efficient than app.previnstance?
thanks
ThunderMusic
Bonjour/soir,
Vérifie que la feuille de l'instance courrante ne doit pas être chargée
de l'appel à FindWindow.
Le mieux est de mpasser par un sub main de démarrage où tu fais
Sub Main()
If FindWindow(vbNullString, frmMaFeuillePrincipale.Caption) = 0 Then
frmMaFeuillePrincipale.Show
End If
End Sub
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message de
news:
> finalement, ca ne fonctionne pas. la fonction ne retourne jamais 0.
> Est-ce normal?
> j'y vais de cette facon :
> hResult = FindWindow(vbNullString, FormTitle)
>
> et le hResult est toujours <> 0, résultat, je ne peux jamais entrer
> dans mon application
>
> Est-ce que je fais quelque chose incorrectement?
>
> merci
>
> ThunderMusic
>
>
> "François Picalausa" wrote in message
> news:%
>> Bonjour/soir,
>>
>> Il faut passer en premier argument un vbNullString (sauf si
>> l'argument a été déclaré en tant que byval Long auquel cas, 0 est
>> adapté):
>>
>> 'If the function fails, the return value is NULL
>> If FindWindow(vbNullString, Text1.Text) = 0 Then
>> MsgBox "Pas de fenêtre correspondante"
>> Else
>> MsgBox "La fenêtre a été trouvée"
>> End If
>>
>> --
>> François Picalausa (MVP VB)
>> FAQ VB : http://faq.vb.free.fr
>> MSDN : http://msdn.microsoft.com
>>
>>
>> "ThunderMusic" a écrit dans le message
>> de news:e7kGB$
>>> ok, but how do I use it in VB? because I always return 0
>>> I use it like this :
>>> hResult = FindWindow(0, FormTitle)
>>>
>>> is it correct? is there something better?
>>>
>>> thanks
>>>
>>> ThunderMusic
>>>
>>> "François Picalausa" wrote in message
>>> news:
>>>> Bonjour/soir,
>>>>
>>>>
>>>> Tu peux essayer FindWindow pour identifier ton application par le
>>>> titre.. si tu trouves une fenêtre portant le titre, c'est que ton
>>>> appli est déjà chargé. Il faut alors que le titre ne change pas.
>>>>
>>>> Sinon, les deux applications sont bien différentes puisqu'elles
>>>> n'ont pas le même path/même nom... il est donc normal que
>>>> PrevInstance renvoie faux.
>>>>
>>>> --
>>>> François Picalausa (MVP VB)
>>>> FAQ VB : http://faq.vb.free.fr
>>>> MSDN : http://msdn.microsoft.com
>>>>
>>>>
>>>> "ThunderMusic" a écrit dans le
>>>> message de news:%
>>>>> Hi,
>>>>> at the very beginning of my app I do a if app.previnstance
>>>>> then unload me. It work if the exe stays in the same path, but I
>>>>> can
>>>>> start an instance, then copy the exe and start another instance
>>>>> from the other path. Is there a way to prevent this? I mean, is
>>>>> there
>>>>> something more efficient than app.previnstance?
>>>>>
>>>>> thanks
>>>>>
>>>>> ThunderMusic
Bonjour/soir,
Vérifie que la feuille de l'instance courrante ne doit pas être chargée
de l'appel à FindWindow.
Le mieux est de mpasser par un sub main de démarrage où tu fais
Sub Main()
If FindWindow(vbNullString, frmMaFeuillePrincipale.Caption) = 0 Then
frmMaFeuillePrincipale.Show
End If
End Sub
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le message de
news:uugpammYDHA.2524@TK2MSFTNGP09.phx.gbl
> finalement, ca ne fonctionne pas. la fonction ne retourne jamais 0.
> Est-ce normal?
> j'y vais de cette facon :
> hResult = FindWindow(vbNullString, FormTitle)
>
> et le hResult est toujours <> 0, résultat, je ne peux jamais entrer
> dans mon application
>
> Est-ce que je fais quelque chose incorrectement?
>
> merci
>
> ThunderMusic
>
>
> "François Picalausa" <fpicalausa@chez.com> wrote in message
> news:%23unjCEdYDHA.2136@TK2MSFTNGP10.phx.gbl...
>> Bonjour/soir,
>>
>> Il faut passer en premier argument un vbNullString (sauf si
>> l'argument a été déclaré en tant que byval Long auquel cas, 0 est
>> adapté):
>>
>> 'If the function fails, the return value is NULL
>> If FindWindow(vbNullString, Text1.Text) = 0 Then
>> MsgBox "Pas de fenêtre correspondante"
>> Else
>> MsgBox "La fenêtre a été trouvée"
>> End If
>>
>> --
>> François Picalausa (MVP VB)
>> FAQ VB : http://faq.vb.free.fr
>> MSDN : http://msdn.microsoft.com
>>
>>
>> "ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le message
>> de news:e7kGB$cYDHA.2476@tk2msftngp13.phx.gbl
>>> ok, but how do I use it in VB? because I always return 0
>>> I use it like this :
>>> hResult = FindWindow(0, FormTitle)
>>>
>>> is it correct? is there something better?
>>>
>>> thanks
>>>
>>> ThunderMusic
>>>
>>> "François Picalausa" <fpicalausa@chez.com> wrote in message
>>> news:ONVoFwcYDHA.1204@TK2MSFTNGP12.phx.gbl...
>>>> Bonjour/soir,
>>>>
>>>>
>>>> Tu peux essayer FindWindow pour identifier ton application par le
>>>> titre.. si tu trouves une fenêtre portant le titre, c'est que ton
>>>> appli est déjà chargé. Il faut alors que le titre ne change pas.
>>>>
>>>> Sinon, les deux applications sont bien différentes puisqu'elles
>>>> n'ont pas le même path/même nom... il est donc normal que
>>>> PrevInstance renvoie faux.
>>>>
>>>> --
>>>> François Picalausa (MVP VB)
>>>> FAQ VB : http://faq.vb.free.fr
>>>> MSDN : http://msdn.microsoft.com
>>>>
>>>>
>>>> "ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le
>>>> message de news:%23DSXAocYDHA.2632@TK2MSFTNGP09.phx.gbl
>>>>> Hi,
>>>>> at the very beginning of my app I do a if app.previnstance
>>>>> then unload me. It work if the exe stays in the same path, but I
>>>>> can
>>>>> start an instance, then copy the exe and start another instance
>>>>> from the other path. Is there a way to prevent this? I mean, is
>>>>> there
>>>>> something more efficient than app.previnstance?
>>>>>
>>>>> thanks
>>>>>
>>>>> ThunderMusic
Bonjour/soir,
Vérifie que la feuille de l'instance courrante ne doit pas être chargée
de l'appel à FindWindow.
Le mieux est de mpasser par un sub main de démarrage où tu fais
Sub Main()
If FindWindow(vbNullString, frmMaFeuillePrincipale.Caption) = 0 Then
frmMaFeuillePrincipale.Show
End If
End Sub
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message de
news:
> finalement, ca ne fonctionne pas. la fonction ne retourne jamais 0.
> Est-ce normal?
> j'y vais de cette facon :
> hResult = FindWindow(vbNullString, FormTitle)
>
> et le hResult est toujours <> 0, résultat, je ne peux jamais entrer
> dans mon application
>
> Est-ce que je fais quelque chose incorrectement?
>
> merci
>
> ThunderMusic
>
>
> "François Picalausa" wrote in message
> news:%
>> Bonjour/soir,
>>
>> Il faut passer en premier argument un vbNullString (sauf si
>> l'argument a été déclaré en tant que byval Long auquel cas, 0 est
>> adapté):
>>
>> 'If the function fails, the return value is NULL
>> If FindWindow(vbNullString, Text1.Text) = 0 Then
>> MsgBox "Pas de fenêtre correspondante"
>> Else
>> MsgBox "La fenêtre a été trouvée"
>> End If
>>
>> --
>> François Picalausa (MVP VB)
>> FAQ VB : http://faq.vb.free.fr
>> MSDN : http://msdn.microsoft.com
>>
>>
>> "ThunderMusic" a écrit dans le message
>> de news:e7kGB$
>>> ok, but how do I use it in VB? because I always return 0
>>> I use it like this :
>>> hResult = FindWindow(0, FormTitle)
>>>
>>> is it correct? is there something better?
>>>
>>> thanks
>>>
>>> ThunderMusic
>>>
>>> "François Picalausa" wrote in message
>>> news:
>>>> Bonjour/soir,
>>>>
>>>>
>>>> Tu peux essayer FindWindow pour identifier ton application par le
>>>> titre.. si tu trouves une fenêtre portant le titre, c'est que ton
>>>> appli est déjà chargé. Il faut alors que le titre ne change pas.
>>>>
>>>> Sinon, les deux applications sont bien différentes puisqu'elles
>>>> n'ont pas le même path/même nom... il est donc normal que
>>>> PrevInstance renvoie faux.
>>>>
>>>> --
>>>> François Picalausa (MVP VB)
>>>> FAQ VB : http://faq.vb.free.fr
>>>> MSDN : http://msdn.microsoft.com
>>>>
>>>>
>>>> "ThunderMusic" a écrit dans le
>>>> message de news:%
>>>>> Hi,
>>>>> at the very beginning of my app I do a if app.previnstance
>>>>> then unload me. It work if the exe stays in the same path, but I
>>>>> can
>>>>> start an instance, then copy the exe and start another instance
>>>>> from the other path. Is there a way to prevent this? I mean, is
>>>>> there
>>>>> something more efficient than app.previnstance?
>>>>>
>>>>> thanks
>>>>>
>>>>> ThunderMusic
Autre solution?
Autre solution?
Autre solution?
Bonjour/soir,
Cette valeur est un hwnd correspondant à la feuille (fenêtre) trouvée.
Pour voir exactement quelle feuille est retrouvée, tu peux faire ceci:
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long,
nCmdShow As Long) As Long
Private Const SW_SHOWMAXIMIZED = 3
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA"
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long,
bInvert As Long) As Long
Private Sub Command1_Click()
Dim lnghWnd As Long
lnghWnd = FindWindow(vbNullString, Text1.Text)
Text2.Text = lnghWnd
If lnghWnd Then
ShowWindow lnghWnd, SW_SHOWMAXIMIZED
FlashWindow lnghWnd, 1
End If
End Sub
FindWindow ne renvoie une valeur que lorsque la feuille est trouvée.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message de
news:%
> c'est en plein ca que je fais. Je ne peux pas le faire exactement
> parce que le caption de ma feuille est chargé dynamiquement à partir
> d'une string table, mais en gros, c'est pas mal ca. et je recois
> toujours la même valeur et je ne sais pas c'est quoi cette valeur. Si
> je redemarre mon ordinateur, la valeur change. Et j'avais pensé à
> l'éventualité du sub main, mais ca ne change rien (dans ce cas-ci, ca
> n'a rien changé) le problème persiste.
>
> autre solution?
>
> merci
>
> ThunderMusic
>
> "François Picalausa" wrote in message
> news:%
>> Bonjour/soir,
>>
>> Vérifie que la feuille de l'instance courrante ne doit pas être
>> chargée lors de l'appel à FindWindow.
>> Le mieux est de mpasser par un sub main de démarrage où tu fais
>>
>> Sub Main()
>> If FindWindow(vbNullString, frmMaFeuillePrincipale.Caption) = 0
>> Then frmMaFeuillePrincipale.Show
>> End If
>> End Sub
>>
>> --
>> François Picalausa (MVP VB)
>> FAQ VB : http://faq.vb.free.fr
>> MSDN : http://msdn.microsoft.com
>>
>>
>> "ThunderMusic" a écrit dans le message
>> de news:
>>> finalement, ca ne fonctionne pas. la fonction ne retourne jamais 0.
>>> Est-ce normal?
>>> j'y vais de cette facon :
>>> hResult = FindWindow(vbNullString, FormTitle)
>>>
>>> et le hResult est toujours <> 0, résultat, je ne peux jamais entrer
>>> dans mon application
>>>
>>> Est-ce que je fais quelque chose incorrectement?
>>>
>>> merci
>>>
>>> ThunderMusic
>>>
>>>
>>> "François Picalausa" wrote in message
>>> news:%
>>>> Bonjour/soir,
>>>>
>>>> Il faut passer en premier argument un vbNullString (sauf si
>>>> l'argument a été déclaré en tant que byval Long auquel cas, 0 est
>>>> adapté):
>>>>
>>>> 'If the function fails, the return value is NULL
>>>> If FindWindow(vbNullString, Text1.Text) = 0 Then
>>>> MsgBox "Pas de fenêtre correspondante"
>>>> Else
>>>> MsgBox "La fenêtre a été trouvée"
>>>> End If
>>>>
>>>> --
>>>> François Picalausa (MVP VB)
>>>> FAQ VB : http://faq.vb.free.fr
>>>> MSDN : http://msdn.microsoft.com
>>>>
>>>>
>>>> "ThunderMusic" a écrit dans le
>>>> message de news:e7kGB$
>>>>> ok, but how do I use it in VB? because I always return 0
>>>>> I use it like this :
>>>>> hResult = FindWindow(0, FormTitle)
>>>>>
>>>>> is it correct? is there something better?
>>>>>
>>>>> thanks
>>>>>
>>>>> ThunderMusic
>>>>>
>>>>> "François Picalausa" wrote in message
>>>>> news:
>>>>>> Bonjour/soir,
>>>>>>
>>>>>>
>>>>>> Tu peux essayer FindWindow pour identifier ton application par le
>>>>>> titre.. si tu trouves une fenêtre portant le titre, c'est que ton
>>>>>> appli est déjà chargé. Il faut alors que le titre ne change pas.
>>>>>>
>>>>>> Sinon, les deux applications sont bien différentes puisqu'elles
>>>>>> n'ont pas le même path/même nom... il est donc normal que
>>>>>> PrevInstance renvoie faux.
>>>>>>
>>>>>> --
>>>>>> François Picalausa (MVP VB)
>>>>>> FAQ VB : http://faq.vb.free.fr
>>>>>> MSDN : http://msdn.microsoft.com
>>>>>>
>>>>>>
>>>>>> "ThunderMusic" a écrit dans le
>>>>>> message de news:%
>>>>>>> Hi,
>>>>>>> at the very beginning of my app I do a if app.previnstance
>>>>>>> then unload me. It work if the exe stays in the same path, but I
>>>>>>> can
>>>>>>> start an instance, then copy the exe and start another instance
>>>>>>> from the other path. Is there a way to prevent this? I mean, is
>>>>>>> there
>>>>>>> something more efficient than app.previnstance?
>>>>>>>
>>>>>>> thanks
>>>>>>>
>>>>>>> ThunderMusic
Bonjour/soir,
Cette valeur est un hwnd correspondant à la feuille (fenêtre) trouvée.
Pour voir exactement quelle feuille est retrouvée, tu peux faire ceci:
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long,
nCmdShow As Long) As Long
Private Const SW_SHOWMAXIMIZED = 3
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA"
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long,
bInvert As Long) As Long
Private Sub Command1_Click()
Dim lnghWnd As Long
lnghWnd = FindWindow(vbNullString, Text1.Text)
Text2.Text = lnghWnd
If lnghWnd Then
ShowWindow lnghWnd, SW_SHOWMAXIMIZED
FlashWindow lnghWnd, 1
End If
End Sub
FindWindow ne renvoie une valeur que lorsque la feuille est trouvée.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le message de
news:%23IByJtmYDHA.2548@TK2MSFTNGP09.phx.gbl
> c'est en plein ca que je fais. Je ne peux pas le faire exactement
> parce que le caption de ma feuille est chargé dynamiquement à partir
> d'une string table, mais en gros, c'est pas mal ca. et je recois
> toujours la même valeur et je ne sais pas c'est quoi cette valeur. Si
> je redemarre mon ordinateur, la valeur change. Et j'avais pensé à
> l'éventualité du sub main, mais ca ne change rien (dans ce cas-ci, ca
> n'a rien changé) le problème persiste.
>
> autre solution?
>
> merci
>
> ThunderMusic
>
> "François Picalausa" <fpicalausa@chez.com> wrote in message
> news:%23VN78pmYDHA.736@TK2MSFTNGP09.phx.gbl...
>> Bonjour/soir,
>>
>> Vérifie que la feuille de l'instance courrante ne doit pas être
>> chargée lors de l'appel à FindWindow.
>> Le mieux est de mpasser par un sub main de démarrage où tu fais
>>
>> Sub Main()
>> If FindWindow(vbNullString, frmMaFeuillePrincipale.Caption) = 0
>> Then frmMaFeuillePrincipale.Show
>> End If
>> End Sub
>>
>> --
>> François Picalausa (MVP VB)
>> FAQ VB : http://faq.vb.free.fr
>> MSDN : http://msdn.microsoft.com
>>
>>
>> "ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le message
>> de news:uugpammYDHA.2524@TK2MSFTNGP09.phx.gbl
>>> finalement, ca ne fonctionne pas. la fonction ne retourne jamais 0.
>>> Est-ce normal?
>>> j'y vais de cette facon :
>>> hResult = FindWindow(vbNullString, FormTitle)
>>>
>>> et le hResult est toujours <> 0, résultat, je ne peux jamais entrer
>>> dans mon application
>>>
>>> Est-ce que je fais quelque chose incorrectement?
>>>
>>> merci
>>>
>>> ThunderMusic
>>>
>>>
>>> "François Picalausa" <fpicalausa@chez.com> wrote in message
>>> news:%23unjCEdYDHA.2136@TK2MSFTNGP10.phx.gbl...
>>>> Bonjour/soir,
>>>>
>>>> Il faut passer en premier argument un vbNullString (sauf si
>>>> l'argument a été déclaré en tant que byval Long auquel cas, 0 est
>>>> adapté):
>>>>
>>>> 'If the function fails, the return value is NULL
>>>> If FindWindow(vbNullString, Text1.Text) = 0 Then
>>>> MsgBox "Pas de fenêtre correspondante"
>>>> Else
>>>> MsgBox "La fenêtre a été trouvée"
>>>> End If
>>>>
>>>> --
>>>> François Picalausa (MVP VB)
>>>> FAQ VB : http://faq.vb.free.fr
>>>> MSDN : http://msdn.microsoft.com
>>>>
>>>>
>>>> "ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le
>>>> message de news:e7kGB$cYDHA.2476@tk2msftngp13.phx.gbl
>>>>> ok, but how do I use it in VB? because I always return 0
>>>>> I use it like this :
>>>>> hResult = FindWindow(0, FormTitle)
>>>>>
>>>>> is it correct? is there something better?
>>>>>
>>>>> thanks
>>>>>
>>>>> ThunderMusic
>>>>>
>>>>> "François Picalausa" <fpicalausa@chez.com> wrote in message
>>>>> news:ONVoFwcYDHA.1204@TK2MSFTNGP12.phx.gbl...
>>>>>> Bonjour/soir,
>>>>>>
>>>>>>
>>>>>> Tu peux essayer FindWindow pour identifier ton application par le
>>>>>> titre.. si tu trouves une fenêtre portant le titre, c'est que ton
>>>>>> appli est déjà chargé. Il faut alors que le titre ne change pas.
>>>>>>
>>>>>> Sinon, les deux applications sont bien différentes puisqu'elles
>>>>>> n'ont pas le même path/même nom... il est donc normal que
>>>>>> PrevInstance renvoie faux.
>>>>>>
>>>>>> --
>>>>>> François Picalausa (MVP VB)
>>>>>> FAQ VB : http://faq.vb.free.fr
>>>>>> MSDN : http://msdn.microsoft.com
>>>>>>
>>>>>>
>>>>>> "ThunderMusic" <NOdlatulippe@teldig.comSPAM> a écrit dans le
>>>>>> message de news:%23DSXAocYDHA.2632@TK2MSFTNGP09.phx.gbl
>>>>>>> Hi,
>>>>>>> at the very beginning of my app I do a if app.previnstance
>>>>>>> then unload me. It work if the exe stays in the same path, but I
>>>>>>> can
>>>>>>> start an instance, then copy the exe and start another instance
>>>>>>> from the other path. Is there a way to prevent this? I mean, is
>>>>>>> there
>>>>>>> something more efficient than app.previnstance?
>>>>>>>
>>>>>>> thanks
>>>>>>>
>>>>>>> ThunderMusic
Bonjour/soir,
Cette valeur est un hwnd correspondant à la feuille (fenêtre) trouvée.
Pour voir exactement quelle feuille est retrouvée, tu peux faire ceci:
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long,
nCmdShow As Long) As Long
Private Const SW_SHOWMAXIMIZED = 3
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA"
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long,
bInvert As Long) As Long
Private Sub Command1_Click()
Dim lnghWnd As Long
lnghWnd = FindWindow(vbNullString, Text1.Text)
Text2.Text = lnghWnd
If lnghWnd Then
ShowWindow lnghWnd, SW_SHOWMAXIMIZED
FlashWindow lnghWnd, 1
End If
End Sub
FindWindow ne renvoie une valeur que lorsque la feuille est trouvée.
--
François Picalausa (MVP VB)
FAQ VB : http://faq.vb.free.fr
MSDN : http://msdn.microsoft.com
"ThunderMusic" a écrit dans le message de
news:%
> c'est en plein ca que je fais. Je ne peux pas le faire exactement
> parce que le caption de ma feuille est chargé dynamiquement à partir
> d'une string table, mais en gros, c'est pas mal ca. et je recois
> toujours la même valeur et je ne sais pas c'est quoi cette valeur. Si
> je redemarre mon ordinateur, la valeur change. Et j'avais pensé à
> l'éventualité du sub main, mais ca ne change rien (dans ce cas-ci, ca
> n'a rien changé) le problème persiste.
>
> autre solution?
>
> merci
>
> ThunderMusic
>
> "François Picalausa" wrote in message
> news:%
>> Bonjour/soir,
>>
>> Vérifie que la feuille de l'instance courrante ne doit pas être
>> chargée lors de l'appel à FindWindow.
>> Le mieux est de mpasser par un sub main de démarrage où tu fais
>>
>> Sub Main()
>> If FindWindow(vbNullString, frmMaFeuillePrincipale.Caption) = 0
>> Then frmMaFeuillePrincipale.Show
>> End If
>> End Sub
>>
>> --
>> François Picalausa (MVP VB)
>> FAQ VB : http://faq.vb.free.fr
>> MSDN : http://msdn.microsoft.com
>>
>>
>> "ThunderMusic" a écrit dans le message
>> de news:
>>> finalement, ca ne fonctionne pas. la fonction ne retourne jamais 0.
>>> Est-ce normal?
>>> j'y vais de cette facon :
>>> hResult = FindWindow(vbNullString, FormTitle)
>>>
>>> et le hResult est toujours <> 0, résultat, je ne peux jamais entrer
>>> dans mon application
>>>
>>> Est-ce que je fais quelque chose incorrectement?
>>>
>>> merci
>>>
>>> ThunderMusic
>>>
>>>
>>> "François Picalausa" wrote in message
>>> news:%
>>>> Bonjour/soir,
>>>>
>>>> Il faut passer en premier argument un vbNullString (sauf si
>>>> l'argument a été déclaré en tant que byval Long auquel cas, 0 est
>>>> adapté):
>>>>
>>>> 'If the function fails, the return value is NULL
>>>> If FindWindow(vbNullString, Text1.Text) = 0 Then
>>>> MsgBox "Pas de fenêtre correspondante"
>>>> Else
>>>> MsgBox "La fenêtre a été trouvée"
>>>> End If
>>>>
>>>> --
>>>> François Picalausa (MVP VB)
>>>> FAQ VB : http://faq.vb.free.fr
>>>> MSDN : http://msdn.microsoft.com
>>>>
>>>>
>>>> "ThunderMusic" a écrit dans le
>>>> message de news:e7kGB$
>>>>> ok, but how do I use it in VB? because I always return 0
>>>>> I use it like this :
>>>>> hResult = FindWindow(0, FormTitle)
>>>>>
>>>>> is it correct? is there something better?
>>>>>
>>>>> thanks
>>>>>
>>>>> ThunderMusic
>>>>>
>>>>> "François Picalausa" wrote in message
>>>>> news:
>>>>>> Bonjour/soir,
>>>>>>
>>>>>>
>>>>>> Tu peux essayer FindWindow pour identifier ton application par le
>>>>>> titre.. si tu trouves une fenêtre portant le titre, c'est que ton
>>>>>> appli est déjà chargé. Il faut alors que le titre ne change pas.
>>>>>>
>>>>>> Sinon, les deux applications sont bien différentes puisqu'elles
>>>>>> n'ont pas le même path/même nom... il est donc normal que
>>>>>> PrevInstance renvoie faux.
>>>>>>
>>>>>> --
>>>>>> François Picalausa (MVP VB)
>>>>>> FAQ VB : http://faq.vb.free.fr
>>>>>> MSDN : http://msdn.microsoft.com
>>>>>>
>>>>>>
>>>>>> "ThunderMusic" a écrit dans le
>>>>>> message de news:%
>>>>>>> Hi,
>>>>>>> at the very beginning of my app I do a if app.previnstance
>>>>>>> then unload me. It work if the exe stays in the same path, but I
>>>>>>> can
>>>>>>> start an instance, then copy the exe and start another instance
>>>>>>> from the other path. Is there a way to prevent this? I mean, is
>>>>>>> there
>>>>>>> something more efficient than app.previnstance?
>>>>>>>
>>>>>>> thanks
>>>>>>>
>>>>>>> ThunderMusic
> j'y avais pensé, mais ca existe un mutex en vb?
> j'y avais pensé, mais ca existe un mutex en vb?
> j'y avais pensé, mais ca existe un mutex en vb?
> j'y avais pensé, mais ca existe un mutex en vb?
Pas directement, mais grâce au mot magique "declare", tout est possible
Tu devrais pouvoir t'en sortir grâce aux déclarations suivantes :
Public Declare Function CreateMutex Lib "kernel32" Alias "CreateMutexA"
(lpMutexAttributes As SECURITY_ATTRIBUTES, ByVal bInitialOwner As Long,
ByVal lpName As String) As Long
Public Declare Function OpenMutex Lib "kernel32" Alias "OpenMutexA" (ByVal
dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As
String) As Long
Public Declare Function ReleaseMutex Lib "kernel32" Alias "ReleaseMutex"
(ByVal hMutex As Long) As Long
Public Declare Function WaitForSingleObject Lib "kernel32" Alias
"WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As
As Long
Cordialement
____________________________
Fabrice MALAINGRE
Architecte Logiciel - Chef de Projet
THEORIS - www.theoris.fr
> j'y avais pensé, mais ca existe un mutex en vb?
Pas directement, mais grâce au mot magique "declare", tout est possible
Tu devrais pouvoir t'en sortir grâce aux déclarations suivantes :
Public Declare Function CreateMutex Lib "kernel32" Alias "CreateMutexA"
(lpMutexAttributes As SECURITY_ATTRIBUTES, ByVal bInitialOwner As Long,
ByVal lpName As String) As Long
Public Declare Function OpenMutex Lib "kernel32" Alias "OpenMutexA" (ByVal
dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As
String) As Long
Public Declare Function ReleaseMutex Lib "kernel32" Alias "ReleaseMutex"
(ByVal hMutex As Long) As Long
Public Declare Function WaitForSingleObject Lib "kernel32" Alias
"WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As
As Long
Cordialement
____________________________
Fabrice MALAINGRE
Architecte Logiciel - Chef de Projet
THEORIS - www.theoris.fr
> j'y avais pensé, mais ca existe un mutex en vb?
Pas directement, mais grâce au mot magique "declare", tout est possible
Tu devrais pouvoir t'en sortir grâce aux déclarations suivantes :
Public Declare Function CreateMutex Lib "kernel32" Alias "CreateMutexA"
(lpMutexAttributes As SECURITY_ATTRIBUTES, ByVal bInitialOwner As Long,
ByVal lpName As String) As Long
Public Declare Function OpenMutex Lib "kernel32" Alias "OpenMutexA" (ByVal
dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As
String) As Long
Public Declare Function ReleaseMutex Lib "kernel32" Alias "ReleaseMutex"
(ByVal hMutex As Long) As Long
Public Declare Function WaitForSingleObject Lib "kernel32" Alias
"WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As
As Long
Cordialement
____________________________
Fabrice MALAINGRE
Architecte Logiciel - Chef de Projet
THEORIS - www.theoris.fr