Advertisement
RuQian

Winform ( form2.cs )

Jul 9th, 2025 (edited)
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | Source Code | 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.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace calculator
  12. {
  13.     public partial class Form2 : Form
  14.     {
  15.         public Form2()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         string log;
  21.  
  22.         public void writeLog(string words)
  23.         {
  24.             log += words + "\r\n" ;
  25.             textBox1.Text = log;
  26.         }
  27.  
  28.         private void Form2_FormClosing(object sender, FormClosingEventArgs e)
  29.         {
  30.             e.Cancel = true;
  31.             this.Hide();
  32.         }
  33.     }
  34. }
  35.  
Tags: ui winform
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement