Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace WindowsFormsApplication1
  11. {
  12.     public partial class Form2 : Form
  13.     {
  14.         int numpro = Form1.numpro;
  15.         public Form2()
  16.         {
  17.             InitializeComponent();
  18.            
  19.         }
  20.  
  21.         private void Form2_Load(object sender, EventArgs e)
  22.         {
  23.             for (int x = 0; x < numpro; x++)
  24.             {
  25.                 listBox1.Items.Add(Form1.codpro[x]);
  26.                 listBox2.Items.Add(Form1.nomepro[x]);
  27.             }
  28.         }
  29.  
  30.         private void button1_Click(object sender, EventArgs e)
  31.         {
  32.             this.Close();
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement