Salut,
Je dois me lancer dans la création d'un outil d'audit en utilisant Infopath.
Ne connaissant pas cet outil et n'ayant plus fait de VB depuis VB6, je me suis jeté sur le site de support de Microsoft.
J'ai notamment trouvé ce Hello World:
http://msdn.microsoft.com/fr-fr/library/aa942693.aspx
Hélas trois fois hélas, la première ligne de code fournie renvoie une erreur:
Apparemment, MessageBox n'existe pas...
Code : Sélectionner tout - Visualiser dans une fenêtre à part MessageBox.Show("Hello World");
Voici le code entier du bouton:The name 'MessageBox' does not exist in the current context.
Où est-ce que que je pourrais trouver des tutos fiables svp?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 using Microsoft.Office.InfoPath; using System; using System.Xml; using System.Xml.XPath; namespace HelloWorld { public partial class FormCode { // Member variables are not supported in browser-enabled forms. // Instead, write and read these values from the FormState // dictionary using code such as the following: // // private object _memberVariable // { // get // { // return FormState["_memberVariable"]; // } // set // { // FormState["_memberVariable"] = value; // } // } // NOTE: The following procedure is required by Microsoft InfoPath. // It can be modified using Microsoft InfoPath. public void InternalStartup() { ((ButtonEvent)EventManager.ControlEvents["CTRL1_5"]).Clicked += new ClickedEventHandler(CTRL1_5_Clicked); } public void CTRL1_5_Clicked(object sender, ClickedEventArgs e) { MessageBox.show("Hello World!"); } } }
Merci de votre aide.
*.Har(d)t
Partager