Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Windows.Forms;
- namespace textbox
- {
- public partial class wynik_wyjscie : Form
- {
- private TextBox pole;
- public void tekst(string txt)
- {
- pole = new TextBox();
- pole.Parent = this;
- pole.Dock = DockStyle.Fill;
- pole.Text = txt;
- }
- public wynik_wyjscie(string txt) //to jest konstruktor więc nazwa musi być taka sama jak nazwa klasy i nic nie zwraca
- {
- this.Text="Wynik";
- this.AutoSize = true;
- tekst(txt);
- }
- }
- class Program
- {
- public static void Main(string[] args)
- {
- Application.Run(new wynik_wyjscie("Jakiś niezbyt długi tekst"));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment