Après windows pour les nuls, voici PB pour les bons (ou presque).

Le forum (ô combien francophone) des utilisateurs de Powerbuilder.

Recherche rapide

Annonce

Certaines rubriques, dont des cours, sont uniquement visibles par les membres du forum ^^.
Dans la rubrique Liens & Références, vous avez accès à un sommaire de téléchargement, profitez-en !
Il existe maintenant un nouveau TOPIC "Votre CV en Ligne" accessible uniquement par demande.

#1 27-12-2007 14:40:06

JCZ  
Builder Power
Award: bf
Lieu: 75019 paris
Date d'inscription: 21-05-2007
Messages: 1724
Pépites: 496,453,703,213
Banque: 9,223,372,036,854,775,808

PB 11 et Code DOTNET

Salut,
Je ne sais pas comment appeler du code DOTNET avec pb11
exemple
code dotnet : Form1.cs

Code: cpp

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace TestPB
{
  /// <summary>
    /// </summary>
  public class Form1 : System.Windows.Forms.Form
  {
    private System.Windows.Forms.Button button1;
    private System.Windows.Forms.TextBox textBox1;
    private System.Windows.Forms.Label label1;
    /// <summary>
        /// </summary>
    private System.ComponentModel.Container components = null;

    public Form1()
    {
      //
      // Requis pour la prise en charge du Concepteur Windows Forms
      //
      InitializeComponent();

      //
            //
    }

    /// <summary>
        /// </summary>
    protected override void Dispose( bool disposing )
    {
      if( disposing )
      {
        if (components != null) 
        {
          components.Dispose();
        }
      }
      base.Dispose( disposing );
    }

    #region Code gnr par le Concepteur Windows Form
    /// <summary>
            /// </summary>
    private void InitializeComponent()
    {
      this.button1 = new System.Windows.Forms.Button();
      this.textBox1 = new System.Windows.Forms.TextBox();
      this.label1 = new System.Windows.Forms.Label();
      this.SuspendLayout();
      // 
      // button1
      // 
      this.button1.Location = new System.Drawing.Point(64, 104);
      this.button1.Name = "button1";
      this.button1.TabIndex = 0;
      this.button1.Text = "Afficher Msg";
      this.button1.Click += new System.EventHandler(this.button1_Click);
      // 
      // textBox1
      // 
      this.textBox1.Location = new System.Drawing.Point(8, 64);
      this.textBox1.Name = "textBox1";
      this.textBox1.Size = new System.Drawing.Size(200, 20);
      this.textBox1.TabIndex = 1;
      this.textBox1.Text = "";
      // 
      // label1
      // 
      this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
      this.label1.Location = new System.Drawing.Point(8, 40);
      this.label1.Name = "label1";
      this.label1.Size = new System.Drawing.Size(192, 23);
      this.label1.TabIndex = 2;
      this.label1.Text = ;
      // 
      // Form1
      // 
      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
      this.ClientSize = new System.Drawing.Size(216, 150);
      this.Controls.Add(this.label1);
      this.Controls.Add(this.textBox1);
      this.Controls.Add(this.button1);
      this.Name = "Form1";
      this.Text = ;
      this.ResumeLayout(false);

    }
    #endregion

    /// <summary>
        /// </summary>
    [STAThread]
    static void Main() 
    {
      Application.Run(new Form1());
    }

    private void button1_Click(object sender, System.EventArgs e)
    {
      if (textBox1.Text == string.Empty)
        textBox1.Text = "Aucun message";

      MessageBox.Show(textBox1.Text);
    }
  }
}

sur le clique d'un bouton j'aimerai faire un truc du style

Code: pb

#if defined PBDOTNET then
    using XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
    Form1.Main();
#end if


qqu'un sait comment faire ?


Face à l'agression, la puissance de l'intelligence

Hors ligne

 

#2 29-01-2008 10:36:34

pick ouic  
La bourse ou la vie ^^
Award: gearotter
Lieu: Massy-Verrières
Date d'inscription: 30-05-2006
Messages: 4685
Pépites: 1,025
Banque: 2,147,483,647
Site web

Re: PB 11 et Code DOTNET

t'en es ou ?


Connaitre son ignorance est une grande part de la connaissance.
http://animegifs.free.fr/anime/mazinger/mazinger.gif

Hors ligne

 

#3 29-01-2008 11:09:15

JCZ  
Builder Power
Award: bf
Lieu: 75019 paris
Date d'inscription: 21-05-2007
Messages: 1724
Pépites: 496,453,703,213
Banque: 9,223,372,036,854,775,808

Re: PB 11 et Code DOTNET

J'ai un probleme pour faire un deploy de l'appli en winform sur des item de menu meme avec le code en commentaire
J'attends une reponse de nos amis de sybase avant de supprimer ces items
De plus il m'a été repondu que "Le code .net doit etre non visuel"


Face à l'agression, la puissance de l'intelligence

Hors ligne

 

Pied de page des forums

Propulsé par FluxBB 1.2.22