-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
Salut bn, Bonsoir tout l'monde ;-))
Bon, pour faire dormir le chat :
S'assurer que dans VBE, Outils, Références, est bien coché
Microsoft Agent Control 2.0
S'assurer que Tifauve soit bien dans le dossier dédié aux agents
C:WINNTmsagentchars (chez moi)
Mettre par ex un bouton sur un userform et voilà le code :
========================================= > Option Explicit
Public WithEvents AgentControl As Agent
Dim Offcat As IAgentCtlCharacter
Private UsedChars As String
Private OffcatID As String
Private OffcatACS As String
Private OffcatLoaded As Boolean
Private HideReq As IAgentCtlRequest
Private Req As IAgentCtlRequest
Public Function AgentMain()
On Error Resume Next
UsedChars = "Offcat"
OffcatID = "Offcat"
OffcatACS = "Offcat.acs"
OffcatLoaded = False
Set AgentControl = New Agent
AgentControl.Connected = True
OffcatLoaded = LoadLocalAgent(OffcatID, OffcatACS)
If OffcatLoaded Then
Call SetCharObj
End If
If OffcatLoaded Then
Call AgentIntro
Else
MsgBox "This Visual Basic program requires the" & vbCrLf &
"Microsoft Agent Characters:" & vbCrLf & UsedChars, vbExclamation
End If
End Function
Private Function LoadLocalAgent(ByVal pstrCharID As String, ByVal
pstrCharACS As String) As Boolean
On Error Resume Next
AgentControl.Characters.Load pstrCharID, pstrCharACS
If Err = 0 Then
LoadLocalAgent = True
Exit Function
End If
LoadLocalAgent = False
End Function
Private Sub SetCharObj()
On Error Resume Next
Set Offcat = AgentControl.Characters(OffcatID)
Offcat.LanguageID = &H40C
End Sub
Private Sub AgentControl_DblClick(ByVal CharacterID As String, ByVal Button
As Integer, ByVal Shift As Integer, ByVal X As Integer, ByVal Y As Integer)
On Error Resume Next
Offcat.StopAll
If Not Offcat.HasOtherClients Then
Set HideReq = Offcat.Hide
End If
End Sub
Private Sub InitAgentCommands()
On Error Resume Next
Offcat.Commands.RemoveAll
Offcat.Commands.Caption = "My Menu Name"
Offcat.Commands.Add "ACO", "Advanced Character Options", "Advanced
Character Options"
End Sub
Private Sub AgentIntro()
On Error Resume Next
InitAgentCommands
Offcat.Show
Offcat.Play "DeepIdleA"
End Sub
Private Sub CommandButton1_Click()
AgentMain
End Sub
=========================================== >
Et bisous au chat !
popi
"bn" a écrit dans le message de news:
0b9801c3449f$8af581a0$
Salut michdenis,
Merci d'avoir répondu, mais ce n'est pas ce que je
voulais...
1-Avec ta manip, le compagnon s'en va...
2-Ce que je veux, c'est le faire dormir avec une macro,
et comme je disais, je n'y arrive pas avec les deux
animations que j'ai essayé...
@+-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
Salut bn, Bonsoir tout l'monde ;-))
Bon, pour faire dormir le chat :
S'assurer que dans VBE, Outils, Références, est bien coché
Microsoft Agent Control 2.0
S'assurer que Tifauve soit bien dans le dossier dédié aux agents
C:WINNTmsagentchars (chez moi)
Mettre par ex un bouton sur un userform et voilà le code :
========================================= > Option Explicit
Public WithEvents AgentControl As Agent
Dim Offcat As IAgentCtlCharacter
Private UsedChars As String
Private OffcatID As String
Private OffcatACS As String
Private OffcatLoaded As Boolean
Private HideReq As IAgentCtlRequest
Private Req As IAgentCtlRequest
Public Function AgentMain()
On Error Resume Next
UsedChars = "Offcat"
OffcatID = "Offcat"
OffcatACS = "Offcat.acs"
OffcatLoaded = False
Set AgentControl = New Agent
AgentControl.Connected = True
OffcatLoaded = LoadLocalAgent(OffcatID, OffcatACS)
If OffcatLoaded Then
Call SetCharObj
End If
If OffcatLoaded Then
Call AgentIntro
Else
MsgBox "This Visual Basic program requires the" & vbCrLf &
"Microsoft Agent Characters:" & vbCrLf & UsedChars, vbExclamation
End If
End Function
Private Function LoadLocalAgent(ByVal pstrCharID As String, ByVal
pstrCharACS As String) As Boolean
On Error Resume Next
AgentControl.Characters.Load pstrCharID, pstrCharACS
If Err = 0 Then
LoadLocalAgent = True
Exit Function
End If
LoadLocalAgent = False
End Function
Private Sub SetCharObj()
On Error Resume Next
Set Offcat = AgentControl.Characters(OffcatID)
Offcat.LanguageID = &H40C
End Sub
Private Sub AgentControl_DblClick(ByVal CharacterID As String, ByVal Button
As Integer, ByVal Shift As Integer, ByVal X As Integer, ByVal Y As Integer)
On Error Resume Next
Offcat.StopAll
If Not Offcat.HasOtherClients Then
Set HideReq = Offcat.Hide
End If
End Sub
Private Sub InitAgentCommands()
On Error Resume Next
Offcat.Commands.RemoveAll
Offcat.Commands.Caption = "My Menu Name"
Offcat.Commands.Add "ACO", "Advanced Character Options", "Advanced
Character Options"
End Sub
Private Sub AgentIntro()
On Error Resume Next
InitAgentCommands
Offcat.Show
Offcat.Play "DeepIdleA"
End Sub
Private Sub CommandButton1_Click()
AgentMain
End Sub
=========================================== >
Et bisous au chat !
popi
"bn" <none@none.com> a écrit dans le message de news:
0b9801c3449f$8af581a0$a501280a@phx.gbl...
Salut michdenis,
Merci d'avoir répondu, mais ce n'est pas ce que je
voulais...
1-Avec ta manip, le compagnon s'en va...
2-Ce que je veux, c'est le faire dormir avec une macro,
et comme je disais, je n'y arrive pas avec les deux
animations que j'ai essayé...
@+
-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
Salut bn, Bonsoir tout l'monde ;-))
Bon, pour faire dormir le chat :
S'assurer que dans VBE, Outils, Références, est bien coché
Microsoft Agent Control 2.0
S'assurer que Tifauve soit bien dans le dossier dédié aux agents
C:WINNTmsagentchars (chez moi)
Mettre par ex un bouton sur un userform et voilà le code :
========================================= > Option Explicit
Public WithEvents AgentControl As Agent
Dim Offcat As IAgentCtlCharacter
Private UsedChars As String
Private OffcatID As String
Private OffcatACS As String
Private OffcatLoaded As Boolean
Private HideReq As IAgentCtlRequest
Private Req As IAgentCtlRequest
Public Function AgentMain()
On Error Resume Next
UsedChars = "Offcat"
OffcatID = "Offcat"
OffcatACS = "Offcat.acs"
OffcatLoaded = False
Set AgentControl = New Agent
AgentControl.Connected = True
OffcatLoaded = LoadLocalAgent(OffcatID, OffcatACS)
If OffcatLoaded Then
Call SetCharObj
End If
If OffcatLoaded Then
Call AgentIntro
Else
MsgBox "This Visual Basic program requires the" & vbCrLf &
"Microsoft Agent Characters:" & vbCrLf & UsedChars, vbExclamation
End If
End Function
Private Function LoadLocalAgent(ByVal pstrCharID As String, ByVal
pstrCharACS As String) As Boolean
On Error Resume Next
AgentControl.Characters.Load pstrCharID, pstrCharACS
If Err = 0 Then
LoadLocalAgent = True
Exit Function
End If
LoadLocalAgent = False
End Function
Private Sub SetCharObj()
On Error Resume Next
Set Offcat = AgentControl.Characters(OffcatID)
Offcat.LanguageID = &H40C
End Sub
Private Sub AgentControl_DblClick(ByVal CharacterID As String, ByVal Button
As Integer, ByVal Shift As Integer, ByVal X As Integer, ByVal Y As Integer)
On Error Resume Next
Offcat.StopAll
If Not Offcat.HasOtherClients Then
Set HideReq = Offcat.Hide
End If
End Sub
Private Sub InitAgentCommands()
On Error Resume Next
Offcat.Commands.RemoveAll
Offcat.Commands.Caption = "My Menu Name"
Offcat.Commands.Add "ACO", "Advanced Character Options", "Advanced
Character Options"
End Sub
Private Sub AgentIntro()
On Error Resume Next
InitAgentCommands
Offcat.Show
Offcat.Play "DeepIdleA"
End Sub
Private Sub CommandButton1_Click()
AgentMain
End Sub
=========================================== >
Et bisous au chat !
popi
"bn" a écrit dans le message de news:
0b9801c3449f$8af581a0$
Salut michdenis,
Merci d'avoir répondu, mais ce n'est pas ce que je
voulais...
1-Avec ta manip, le compagnon s'en va...
2-Ce que je veux, c'est le faire dormir avec une macro,
et comme je disais, je n'y arrive pas avec les deux
animations que j'ai essayé...
@+-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
Bonsoir tout le monde,
On aurait pu croire au HS, sauf dans un forum placé sous la haute protection de Sainte Zaza.
Bonsoir tout le monde,
On aurait pu croire au HS, sauf dans un forum placé sous la haute protection de Sainte Zaza.
Bonsoir tout le monde,
On aurait pu croire au HS, sauf dans un forum placé sous la haute protection de Sainte Zaza.
seuls les scudeurs infâmes ont pu croire au HS...ce ne fut pas mon
cas...tu leur confirmes, pomponette?
jps
Philippe.R a écrit:Bonsoir tout le monde,
On aurait pu croire au HS, sauf dans un forum placé sous la haute
protection de Sainte Zaza.
seuls les scudeurs infâmes ont pu croire au HS...ce ne fut pas mon
cas...tu leur confirmes, pomponette?
jps
Philippe.R a écrit:
Bonsoir tout le monde,
On aurait pu croire au HS, sauf dans un forum placé sous la haute
protection de Sainte Zaza.
seuls les scudeurs infâmes ont pu croire au HS...ce ne fut pas mon
cas...tu leur confirmes, pomponette?
jps
Philippe.R a écrit:Bonsoir tout le monde,
On aurait pu croire au HS, sauf dans un forum placé sous la haute
protection de Sainte Zaza.
-----Message d'origine-----
Salut bn, Bonsoir tout l'monde ;-))
Bon, pour faire dormir le chat :
S'assurer que dans VBE, Outils, Références, est bien coché
Microsoft Agent Control 2.0
S'assurer que Tifauve soit bien dans le dossier dédié aux
agents
C:WINNTmsagentchars (chez moi)
Mettre par ex un bouton sur un userform et voilà le code :
======================== ==================
Option Explicit
Public WithEvents AgentControl As Agent
Dim Offcat As IAgentCtlCharacter
Private UsedChars As String
Private OffcatID As String
Private OffcatACS As String
Private OffcatLoaded As Boolean
Private HideReq As IAgentCtlRequest
Private Req As IAgentCtlRequest
Public Function AgentMain()
On Error Resume Next
UsedChars = "Offcat"
OffcatID = "Offcat"
OffcatACS = "Offcat.acs"
OffcatLoaded = False
Set AgentControl = New Agent
AgentControl.Connected = True
OffcatLoaded = LoadLocalAgent(OffcatID, OffcatACS)
If OffcatLoaded Then
Call SetCharObj
End If
If OffcatLoaded Then
Call AgentIntro
Else
MsgBox "This Visual Basic program requires the" &
vbCrLf &
"Microsoft Agent Characters:" & vbCrLf & UsedChars,
vbExclamation
End If
End Function
Private Function LoadLocalAgent(ByVal pstrCharID As
String, ByVal
pstrCharACS As String) As Boolean
On Error Resume Next
AgentControl.Characters.Load pstrCharID, pstrCharACS
If Err = 0 Then
LoadLocalAgent = True
Exit Function
End If
LoadLocalAgent = False
End Function
Private Sub SetCharObj()
On Error Resume Next
Set Offcat = AgentControl.Characters(OffcatID)
Offcat.LanguageID = &H40C
End Sub
Private Sub AgentControl_DblClick(ByVal CharacterID As
String, ByVal Button
As Integer, ByVal Shift As Integer, ByVal X As Integer,
ByVal Y As Integer)
On Error Resume Next
Offcat.StopAll
If Not Offcat.HasOtherClients Then
Set HideReq = Offcat.Hide
End If
End Sub
Private Sub InitAgentCommands()
On Error Resume Next
Offcat.Commands.RemoveAll
Offcat.Commands.Caption = "My Menu Name"
Offcat.Commands.Add "ACO", "Advanced Character
Options", "Advanced
Character Options"
End Sub
Private Sub AgentIntro()
On Error Resume Next
InitAgentCommands
Offcat.Show
Offcat.Play "DeepIdleA"
End Sub
Private Sub CommandButton1_Click()
AgentMain
End Sub
======================== ====================
Et bisous au chat !
popi
-----Message d'origine-----
Salut bn, Bonsoir tout l'monde ;-))
Bon, pour faire dormir le chat :
S'assurer que dans VBE, Outils, Références, est bien coché
Microsoft Agent Control 2.0
S'assurer que Tifauve soit bien dans le dossier dédié aux
agents
C:WINNTmsagentchars (chez moi)
Mettre par ex un bouton sur un userform et voilà le code :
======================== ==================
Option Explicit
Public WithEvents AgentControl As Agent
Dim Offcat As IAgentCtlCharacter
Private UsedChars As String
Private OffcatID As String
Private OffcatACS As String
Private OffcatLoaded As Boolean
Private HideReq As IAgentCtlRequest
Private Req As IAgentCtlRequest
Public Function AgentMain()
On Error Resume Next
UsedChars = "Offcat"
OffcatID = "Offcat"
OffcatACS = "Offcat.acs"
OffcatLoaded = False
Set AgentControl = New Agent
AgentControl.Connected = True
OffcatLoaded = LoadLocalAgent(OffcatID, OffcatACS)
If OffcatLoaded Then
Call SetCharObj
End If
If OffcatLoaded Then
Call AgentIntro
Else
MsgBox "This Visual Basic program requires the" &
vbCrLf &
"Microsoft Agent Characters:" & vbCrLf & UsedChars,
vbExclamation
End If
End Function
Private Function LoadLocalAgent(ByVal pstrCharID As
String, ByVal
pstrCharACS As String) As Boolean
On Error Resume Next
AgentControl.Characters.Load pstrCharID, pstrCharACS
If Err = 0 Then
LoadLocalAgent = True
Exit Function
End If
LoadLocalAgent = False
End Function
Private Sub SetCharObj()
On Error Resume Next
Set Offcat = AgentControl.Characters(OffcatID)
Offcat.LanguageID = &H40C
End Sub
Private Sub AgentControl_DblClick(ByVal CharacterID As
String, ByVal Button
As Integer, ByVal Shift As Integer, ByVal X As Integer,
ByVal Y As Integer)
On Error Resume Next
Offcat.StopAll
If Not Offcat.HasOtherClients Then
Set HideReq = Offcat.Hide
End If
End Sub
Private Sub InitAgentCommands()
On Error Resume Next
Offcat.Commands.RemoveAll
Offcat.Commands.Caption = "My Menu Name"
Offcat.Commands.Add "ACO", "Advanced Character
Options", "Advanced
Character Options"
End Sub
Private Sub AgentIntro()
On Error Resume Next
InitAgentCommands
Offcat.Show
Offcat.Play "DeepIdleA"
End Sub
Private Sub CommandButton1_Click()
AgentMain
End Sub
======================== ====================
Et bisous au chat !
popi
-----Message d'origine-----
Salut bn, Bonsoir tout l'monde ;-))
Bon, pour faire dormir le chat :
S'assurer que dans VBE, Outils, Références, est bien coché
Microsoft Agent Control 2.0
S'assurer que Tifauve soit bien dans le dossier dédié aux
agents
C:WINNTmsagentchars (chez moi)
Mettre par ex un bouton sur un userform et voilà le code :
======================== ==================
Option Explicit
Public WithEvents AgentControl As Agent
Dim Offcat As IAgentCtlCharacter
Private UsedChars As String
Private OffcatID As String
Private OffcatACS As String
Private OffcatLoaded As Boolean
Private HideReq As IAgentCtlRequest
Private Req As IAgentCtlRequest
Public Function AgentMain()
On Error Resume Next
UsedChars = "Offcat"
OffcatID = "Offcat"
OffcatACS = "Offcat.acs"
OffcatLoaded = False
Set AgentControl = New Agent
AgentControl.Connected = True
OffcatLoaded = LoadLocalAgent(OffcatID, OffcatACS)
If OffcatLoaded Then
Call SetCharObj
End If
If OffcatLoaded Then
Call AgentIntro
Else
MsgBox "This Visual Basic program requires the" &
vbCrLf &
"Microsoft Agent Characters:" & vbCrLf & UsedChars,
vbExclamation
End If
End Function
Private Function LoadLocalAgent(ByVal pstrCharID As
String, ByVal
pstrCharACS As String) As Boolean
On Error Resume Next
AgentControl.Characters.Load pstrCharID, pstrCharACS
If Err = 0 Then
LoadLocalAgent = True
Exit Function
End If
LoadLocalAgent = False
End Function
Private Sub SetCharObj()
On Error Resume Next
Set Offcat = AgentControl.Characters(OffcatID)
Offcat.LanguageID = &H40C
End Sub
Private Sub AgentControl_DblClick(ByVal CharacterID As
String, ByVal Button
As Integer, ByVal Shift As Integer, ByVal X As Integer,
ByVal Y As Integer)
On Error Resume Next
Offcat.StopAll
If Not Offcat.HasOtherClients Then
Set HideReq = Offcat.Hide
End If
End Sub
Private Sub InitAgentCommands()
On Error Resume Next
Offcat.Commands.RemoveAll
Offcat.Commands.Caption = "My Menu Name"
Offcat.Commands.Add "ACO", "Advanced Character
Options", "Advanced
Character Options"
End Sub
Private Sub AgentIntro()
On Error Resume Next
InitAgentCommands
Offcat.Show
Offcat.Play "DeepIdleA"
End Sub
Private Sub CommandButton1_Click()
AgentMain
End Sub
======================== ====================
Et bisous au chat !
popi
-----Message d'origine-----
Salut bn, Bonsoir tout l'monde ;-))
Bon, pour faire dormir le chat :
S'assurer que dans VBE, Outils, Références, est bien coché
Microsoft Agent Control 2.0
S'assurer que Tifauve soit bien dans le dossier dédié aux
agents
C:WINNTmsagentchars (chez moi)
Mettre par ex un bouton sur un userform et voilà le code :
========================================= >Option Explicit
Public WithEvents AgentControl As Agent
Dim Offcat As IAgentCtlCharacter
Private UsedChars As String
Private OffcatID As String
Private OffcatACS As String
Private OffcatLoaded As Boolean
Private HideReq As IAgentCtlRequest
Private Req As IAgentCtlRequest
Public Function AgentMain()
On Error Resume Next
UsedChars = "Offcat"
OffcatID = "Offcat"
OffcatACS = "Offcat.acs"
OffcatLoaded = False
Set AgentControl = New Agent
AgentControl.Connected = True
OffcatLoaded = LoadLocalAgent(OffcatID, OffcatACS)
If OffcatLoaded Then
Call SetCharObj
End If
If OffcatLoaded Then
Call AgentIntro
Else
MsgBox "This Visual Basic program requires the" &
vbCrLf &
"Microsoft Agent Characters:" & vbCrLf & UsedChars,
vbExclamation
End If
End Function
Private Function LoadLocalAgent(ByVal pstrCharID As
String, ByVal
pstrCharACS As String) As Boolean
On Error Resume Next
AgentControl.Characters.Load pstrCharID, pstrCharACS
If Err = 0 Then
LoadLocalAgent = True
Exit Function
End If
LoadLocalAgent = False
End Function
Private Sub SetCharObj()
On Error Resume Next
Set Offcat = AgentControl.Characters(OffcatID)
Offcat.LanguageID = &H40C
End Sub
Private Sub AgentControl_DblClick(ByVal CharacterID As
String, ByVal Button
As Integer, ByVal Shift As Integer, ByVal X As Integer,
ByVal Y As Integer)
On Error Resume Next
Offcat.StopAll
If Not Offcat.HasOtherClients Then
Set HideReq = Offcat.Hide
End If
End Sub
Private Sub InitAgentCommands()
On Error Resume Next
Offcat.Commands.RemoveAll
Offcat.Commands.Caption = "My Menu Name"
Offcat.Commands.Add "ACO", "Advanced Character
Options", "Advanced
Character Options"
End Sub
Private Sub AgentIntro()
On Error Resume Next
InitAgentCommands
Offcat.Show
Offcat.Play "DeepIdleA"
End Sub
Private Sub CommandButton1_Click()
AgentMain
End Sub
=========================================== >
Et bisous au chat !
popi
"bn" a écrit dans le message de news:
0b9801c3449f$8af581a0$
Salut michdenis,
Merci d'avoir répondu, mais ce n'est pas ce que je
voulais...
1-Avec ta manip, le compagnon s'en va...
2-Ce que je veux, c'est le faire dormir avec une macro,
et comme je disais, je n'y arrive pas avec les deux
animations que j'ai essayé...
@+-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
.
-----Message d'origine-----
Salut bn, Bonsoir tout l'monde ;-))
Bon, pour faire dormir le chat :
S'assurer que dans VBE, Outils, Références, est bien coché
Microsoft Agent Control 2.0
S'assurer que Tifauve soit bien dans le dossier dédié aux
agents
C:WINNTmsagentchars (chez moi)
Mettre par ex un bouton sur un userform et voilà le code :
========================================= >Option Explicit
Public WithEvents AgentControl As Agent
Dim Offcat As IAgentCtlCharacter
Private UsedChars As String
Private OffcatID As String
Private OffcatACS As String
Private OffcatLoaded As Boolean
Private HideReq As IAgentCtlRequest
Private Req As IAgentCtlRequest
Public Function AgentMain()
On Error Resume Next
UsedChars = "Offcat"
OffcatID = "Offcat"
OffcatACS = "Offcat.acs"
OffcatLoaded = False
Set AgentControl = New Agent
AgentControl.Connected = True
OffcatLoaded = LoadLocalAgent(OffcatID, OffcatACS)
If OffcatLoaded Then
Call SetCharObj
End If
If OffcatLoaded Then
Call AgentIntro
Else
MsgBox "This Visual Basic program requires the" &
vbCrLf &
"Microsoft Agent Characters:" & vbCrLf & UsedChars,
vbExclamation
End If
End Function
Private Function LoadLocalAgent(ByVal pstrCharID As
String, ByVal
pstrCharACS As String) As Boolean
On Error Resume Next
AgentControl.Characters.Load pstrCharID, pstrCharACS
If Err = 0 Then
LoadLocalAgent = True
Exit Function
End If
LoadLocalAgent = False
End Function
Private Sub SetCharObj()
On Error Resume Next
Set Offcat = AgentControl.Characters(OffcatID)
Offcat.LanguageID = &H40C
End Sub
Private Sub AgentControl_DblClick(ByVal CharacterID As
String, ByVal Button
As Integer, ByVal Shift As Integer, ByVal X As Integer,
ByVal Y As Integer)
On Error Resume Next
Offcat.StopAll
If Not Offcat.HasOtherClients Then
Set HideReq = Offcat.Hide
End If
End Sub
Private Sub InitAgentCommands()
On Error Resume Next
Offcat.Commands.RemoveAll
Offcat.Commands.Caption = "My Menu Name"
Offcat.Commands.Add "ACO", "Advanced Character
Options", "Advanced
Character Options"
End Sub
Private Sub AgentIntro()
On Error Resume Next
InitAgentCommands
Offcat.Show
Offcat.Play "DeepIdleA"
End Sub
Private Sub CommandButton1_Click()
AgentMain
End Sub
=========================================== >
Et bisous au chat !
popi
"bn" <none@none.com> a écrit dans le message de news:
0b9801c3449f$8af581a0$a501280a@phx.gbl...
Salut michdenis,
Merci d'avoir répondu, mais ce n'est pas ce que je
voulais...
1-Avec ta manip, le compagnon s'en va...
2-Ce que je veux, c'est le faire dormir avec une macro,
et comme je disais, je n'y arrive pas avec les deux
animations que j'ai essayé...
@+
-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"
Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
.
-----Message d'origine-----
Salut bn, Bonsoir tout l'monde ;-))
Bon, pour faire dormir le chat :
S'assurer que dans VBE, Outils, Références, est bien coché
Microsoft Agent Control 2.0
S'assurer que Tifauve soit bien dans le dossier dédié aux
agents
C:WINNTmsagentchars (chez moi)
Mettre par ex un bouton sur un userform et voilà le code :
========================================= >Option Explicit
Public WithEvents AgentControl As Agent
Dim Offcat As IAgentCtlCharacter
Private UsedChars As String
Private OffcatID As String
Private OffcatACS As String
Private OffcatLoaded As Boolean
Private HideReq As IAgentCtlRequest
Private Req As IAgentCtlRequest
Public Function AgentMain()
On Error Resume Next
UsedChars = "Offcat"
OffcatID = "Offcat"
OffcatACS = "Offcat.acs"
OffcatLoaded = False
Set AgentControl = New Agent
AgentControl.Connected = True
OffcatLoaded = LoadLocalAgent(OffcatID, OffcatACS)
If OffcatLoaded Then
Call SetCharObj
End If
If OffcatLoaded Then
Call AgentIntro
Else
MsgBox "This Visual Basic program requires the" &
vbCrLf &
"Microsoft Agent Characters:" & vbCrLf & UsedChars,
vbExclamation
End If
End Function
Private Function LoadLocalAgent(ByVal pstrCharID As
String, ByVal
pstrCharACS As String) As Boolean
On Error Resume Next
AgentControl.Characters.Load pstrCharID, pstrCharACS
If Err = 0 Then
LoadLocalAgent = True
Exit Function
End If
LoadLocalAgent = False
End Function
Private Sub SetCharObj()
On Error Resume Next
Set Offcat = AgentControl.Characters(OffcatID)
Offcat.LanguageID = &H40C
End Sub
Private Sub AgentControl_DblClick(ByVal CharacterID As
String, ByVal Button
As Integer, ByVal Shift As Integer, ByVal X As Integer,
ByVal Y As Integer)
On Error Resume Next
Offcat.StopAll
If Not Offcat.HasOtherClients Then
Set HideReq = Offcat.Hide
End If
End Sub
Private Sub InitAgentCommands()
On Error Resume Next
Offcat.Commands.RemoveAll
Offcat.Commands.Caption = "My Menu Name"
Offcat.Commands.Add "ACO", "Advanced Character
Options", "Advanced
Character Options"
End Sub
Private Sub AgentIntro()
On Error Resume Next
InitAgentCommands
Offcat.Show
Offcat.Play "DeepIdleA"
End Sub
Private Sub CommandButton1_Click()
AgentMain
End Sub
=========================================== >
Et bisous au chat !
popi
"bn" a écrit dans le message de news:
0b9801c3449f$8af581a0$
Salut michdenis,
Merci d'avoir répondu, mais ce n'est pas ce que je
voulais...
1-Avec ta manip, le compagnon s'en va...
2-Ce que je veux, c'est le faire dormir avec une macro,
et comme je disais, je n'y arrive pas avec les deux
animations que j'ai essayé...
@+-----Message d'origine-----
Bonjour BN,
Lorsque ton compagnon s'affiche, un clic sur le
bouton "Options"Une fenêtre s'ouvre / onglet option
décoche "Utiliser le compagnon d'office"
Voilà il dort !
Salutations!
.
-----Message d'origine-----
Salut bn, cette adresse est ton amie ;-)
http://www.bellcraft.com/mash/
popi
-----Message d'origine-----
Salut bn, cette adresse est ton amie ;-)
http://www.bellcraft.com/mash/
popi
-----Message d'origine-----
Salut bn, cette adresse est ton amie ;-)
http://www.bellcraft.com/mash/
popi