-----Message d'origine-----
Voici l'exemple
il faut enregistrer la dll. puor y parvenir tu ouvre la
tapes :
regsvr32 "mon_répertoireInputBox.dll"
--
Cordialement
Yanick Lefebvre - MVP pour Visual Basic
http://faq.vb.free.fr/?rubrique=0 -
http://www.mentalis.org/agnet/apiguide.shtml -
"Zoury" wrote in message
news:
: Salut Nick!
:
: pas directement... tu peux cependant te compiler une
formulaire
: et une classe d'accès et y accéder à partir du script
:
: Exemple :
:
: Dans un project de type ActiveX DLL :
:
: - Ajoute un formulaire au projet
: - Ouvre le menu [Project/Project1 Properties] et
: InputBox
: - Colle les parties de suivantes au endroit prévues :
: '***
: ' Form1
: ' 2 CommandButtons
: ' 1 TextBox
: ' 1 Label
: Option Explicit
:
: Private m_sTitle As String
: Private m_sPrompt As String
: Private m_sDefault As String
: Private m_sValue As String
: Private m_rm As eReturnMode
:
: Public Enum eReturnMode
: rmCancel = 0
: rmOk = 1
: End Enum
:
: Private Sub Command1_Click()
: m_sValue = Text1.Text
: m_rm = rmOk
: Me.Hide
: End Sub
:
: Private Sub Command2_Click()
: m_rm = rmCancel
: Me.Hide
: End Sub
:
: Private Sub Form_Load()
:
: Me.Move Me.Left, Me.Top, 4800, 1875
: Command2.Move 2280, 960, 1095, 375
: Text1.Move 120, 600, 4455, 285
: Command1.Move 3480, 960, 1095, 375
: Label1.Move 120, 240, 4455, 255
:
: Me.Caption = m_sTitle
: Label1.Caption = m_sPrompt
: Command1.Caption = "&Ok"
: Command2.Caption = "&Cancel"
: Text1.Text = m_sDefault
:
: Command1.TabIndex = 0
: Command2.TabIndex = 0
: Text1.TabIndex = 0
:
: End Sub
:
: Property Get Value() As String
: Value = m_sValue
: End Property
:
: Property Let Title(ByRef sTitle As String)
: m_sTitle = sTitle
: End Property
:
: Property Let Prompt(ByRef sPrompt As String)
: m_sPrompt = sPrompt
: End Property
:
: Property Let Default(ByRef sDefault As String)
: m_sDefault = sDefault
: End Property
:
: Property Get ReturnMode() As eReturnMode
: ReturnMode = m_rm
: End Property
:
: Private Sub Text1_GotFocus()
: Text1.SelStart = 0
: Text1.SelLength = Len(Text1.Text)
: End Sub
:
: '---
:
: ' CInputBox
: Option Explicit
:
: Public Function GetInput _
: ( _
: ByRef sTitle As String, _
: ByRef sPrompt As String, _
: ByRef sDefault As String, _
: Optional ByRef bModal As Boolean = True _
: ) As String
:
: Form1.Title = sTitle
: Form1.Prompt = sPrompt
: Form1.Default = sDefault
: If bModal Then
: Form1.Show vbModal
: Else
: Form1.Show
: End If
: GetInput = Form1.Value
:
: End Function
: '***
: - Compile le projet.
:
: Dans un fichier htm :
:
: - Ajoute le code suivant
: '***
: <html>
: <body>
: <script type="text/vbscript">
: Option Explicit
:
: dim ib
: Set ib = CreateObject("InputBox.CInputBox")
:
: Call MsgBox(ib.GetInput("Mon InputBox", "Entrez du
: ici", True))
:
: </script>
: </body>
: </html>
: '***
: - Sauvegarde et "démarre" le .htm
:
:
: ps : je vais te joindre le projet dans le message
:
: --
: Cordialement
: Yanick Lefebvre - MVP pour Visual Basic
: http://faq.vb.free.fr/?rubrique=0 -
: http://www.mentalis.org/agnet/apiguide.shtml -
: "nick" wrote in message
: news:086a01c33fc7$e1c12840$
: : Bonjour,
: :
: : Est-il possible de charger un formulaire VB (.frm) en
: : VBScript ?
: : Si oui, j'aurais besoin de l'instruction permettant
: : faire.
: :
: : PAr avance, Merci
:
-----Message d'origine-----
Voici l'exemple
il faut enregistrer la dll. puor y parvenir tu ouvre la
tapes :
regsvr32 "mon_répertoireInputBox.dll"
--
Cordialement
Yanick Lefebvre - MVP pour Visual Basic
http://faq.vb.free.fr/?rubrique=0 -
http://www.mentalis.org/agnet/apiguide.shtml -
"Zoury" <yanick_lefebvre@hotmail.com> wrote in message
news:eyPLZGLQDHA.3192@tk2msftngp13.phx.gbl...
: Salut Nick!
:
: pas directement... tu peux cependant te compiler une
formulaire
: et une classe d'accès et y accéder à partir du script
:
: Exemple :
:
: Dans un project de type ActiveX DLL :
:
: - Ajoute un formulaire au projet
: - Ouvre le menu [Project/Project1 Properties] et
: InputBox
: - Colle les parties de suivantes au endroit prévues :
: '***
: ' Form1
: ' 2 CommandButtons
: ' 1 TextBox
: ' 1 Label
: Option Explicit
:
: Private m_sTitle As String
: Private m_sPrompt As String
: Private m_sDefault As String
: Private m_sValue As String
: Private m_rm As eReturnMode
:
: Public Enum eReturnMode
: rmCancel = 0
: rmOk = 1
: End Enum
:
: Private Sub Command1_Click()
: m_sValue = Text1.Text
: m_rm = rmOk
: Me.Hide
: End Sub
:
: Private Sub Command2_Click()
: m_rm = rmCancel
: Me.Hide
: End Sub
:
: Private Sub Form_Load()
:
: Me.Move Me.Left, Me.Top, 4800, 1875
: Command2.Move 2280, 960, 1095, 375
: Text1.Move 120, 600, 4455, 285
: Command1.Move 3480, 960, 1095, 375
: Label1.Move 120, 240, 4455, 255
:
: Me.Caption = m_sTitle
: Label1.Caption = m_sPrompt
: Command1.Caption = "&Ok"
: Command2.Caption = "&Cancel"
: Text1.Text = m_sDefault
:
: Command1.TabIndex = 0
: Command2.TabIndex = 0
: Text1.TabIndex = 0
:
: End Sub
:
: Property Get Value() As String
: Value = m_sValue
: End Property
:
: Property Let Title(ByRef sTitle As String)
: m_sTitle = sTitle
: End Property
:
: Property Let Prompt(ByRef sPrompt As String)
: m_sPrompt = sPrompt
: End Property
:
: Property Let Default(ByRef sDefault As String)
: m_sDefault = sDefault
: End Property
:
: Property Get ReturnMode() As eReturnMode
: ReturnMode = m_rm
: End Property
:
: Private Sub Text1_GotFocus()
: Text1.SelStart = 0
: Text1.SelLength = Len(Text1.Text)
: End Sub
:
: '---
:
: ' CInputBox
: Option Explicit
:
: Public Function GetInput _
: ( _
: ByRef sTitle As String, _
: ByRef sPrompt As String, _
: ByRef sDefault As String, _
: Optional ByRef bModal As Boolean = True _
: ) As String
:
: Form1.Title = sTitle
: Form1.Prompt = sPrompt
: Form1.Default = sDefault
: If bModal Then
: Form1.Show vbModal
: Else
: Form1.Show
: End If
: GetInput = Form1.Value
:
: End Function
: '***
: - Compile le projet.
:
: Dans un fichier htm :
:
: - Ajoute le code suivant
: '***
: <html>
: <body>
: <script type="text/vbscript">
: Option Explicit
:
: dim ib
: Set ib = CreateObject("InputBox.CInputBox")
:
: Call MsgBox(ib.GetInput("Mon InputBox", "Entrez du
: ici", True))
:
: </script>
: </body>
: </html>
: '***
: - Sauvegarde et "démarre" le .htm
:
:
: ps : je vais te joindre le projet dans le message
:
: --
: Cordialement
: Yanick Lefebvre - MVP pour Visual Basic
: http://faq.vb.free.fr/?rubrique=0 -
: http://www.mentalis.org/agnet/apiguide.shtml -
: "nick" <vb@gin.freesurf.fr> wrote in message
: news:086a01c33fc7$e1c12840$a501280a@phx.gbl...
: : Bonjour,
: :
: : Est-il possible de charger un formulaire VB (.frm) en
: : VBScript ?
: : Si oui, j'aurais besoin de l'instruction permettant
: : faire.
: :
: : PAr avance, Merci
:
-----Message d'origine-----
Voici l'exemple
il faut enregistrer la dll. puor y parvenir tu ouvre la
tapes :
regsvr32 "mon_répertoireInputBox.dll"
--
Cordialement
Yanick Lefebvre - MVP pour Visual Basic
http://faq.vb.free.fr/?rubrique=0 -
http://www.mentalis.org/agnet/apiguide.shtml -
"Zoury" wrote in message
news:
: Salut Nick!
:
: pas directement... tu peux cependant te compiler une
formulaire
: et une classe d'accès et y accéder à partir du script
:
: Exemple :
:
: Dans un project de type ActiveX DLL :
:
: - Ajoute un formulaire au projet
: - Ouvre le menu [Project/Project1 Properties] et
: InputBox
: - Colle les parties de suivantes au endroit prévues :
: '***
: ' Form1
: ' 2 CommandButtons
: ' 1 TextBox
: ' 1 Label
: Option Explicit
:
: Private m_sTitle As String
: Private m_sPrompt As String
: Private m_sDefault As String
: Private m_sValue As String
: Private m_rm As eReturnMode
:
: Public Enum eReturnMode
: rmCancel = 0
: rmOk = 1
: End Enum
:
: Private Sub Command1_Click()
: m_sValue = Text1.Text
: m_rm = rmOk
: Me.Hide
: End Sub
:
: Private Sub Command2_Click()
: m_rm = rmCancel
: Me.Hide
: End Sub
:
: Private Sub Form_Load()
:
: Me.Move Me.Left, Me.Top, 4800, 1875
: Command2.Move 2280, 960, 1095, 375
: Text1.Move 120, 600, 4455, 285
: Command1.Move 3480, 960, 1095, 375
: Label1.Move 120, 240, 4455, 255
:
: Me.Caption = m_sTitle
: Label1.Caption = m_sPrompt
: Command1.Caption = "&Ok"
: Command2.Caption = "&Cancel"
: Text1.Text = m_sDefault
:
: Command1.TabIndex = 0
: Command2.TabIndex = 0
: Text1.TabIndex = 0
:
: End Sub
:
: Property Get Value() As String
: Value = m_sValue
: End Property
:
: Property Let Title(ByRef sTitle As String)
: m_sTitle = sTitle
: End Property
:
: Property Let Prompt(ByRef sPrompt As String)
: m_sPrompt = sPrompt
: End Property
:
: Property Let Default(ByRef sDefault As String)
: m_sDefault = sDefault
: End Property
:
: Property Get ReturnMode() As eReturnMode
: ReturnMode = m_rm
: End Property
:
: Private Sub Text1_GotFocus()
: Text1.SelStart = 0
: Text1.SelLength = Len(Text1.Text)
: End Sub
:
: '---
:
: ' CInputBox
: Option Explicit
:
: Public Function GetInput _
: ( _
: ByRef sTitle As String, _
: ByRef sPrompt As String, _
: ByRef sDefault As String, _
: Optional ByRef bModal As Boolean = True _
: ) As String
:
: Form1.Title = sTitle
: Form1.Prompt = sPrompt
: Form1.Default = sDefault
: If bModal Then
: Form1.Show vbModal
: Else
: Form1.Show
: End If
: GetInput = Form1.Value
:
: End Function
: '***
: - Compile le projet.
:
: Dans un fichier htm :
:
: - Ajoute le code suivant
: '***
: <html>
: <body>
: <script type="text/vbscript">
: Option Explicit
:
: dim ib
: Set ib = CreateObject("InputBox.CInputBox")
:
: Call MsgBox(ib.GetInput("Mon InputBox", "Entrez du
: ici", True))
:
: </script>
: </body>
: </html>
: '***
: - Sauvegarde et "démarre" le .htm
:
:
: ps : je vais te joindre le projet dans le message
:
: --
: Cordialement
: Yanick Lefebvre - MVP pour Visual Basic
: http://faq.vb.free.fr/?rubrique=0 -
: http://www.mentalis.org/agnet/apiguide.shtml -
: "nick" wrote in message
: news:086a01c33fc7$e1c12840$
: : Bonjour,
: :
: : Est-il possible de charger un formulaire VB (.frm) en
: : VBScript ?
: : Si oui, j'aurais besoin de l'instruction permettant
: : faire.
: :
: : PAr avance, Merci
: