Witam, jestem nowy na forum. Chcę zrobić coś takiego:
Kod Form1.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WindowsFormsApplication5;
namespace WindowsFormsApplication5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void button1_Click(object sender, EventArgs e)
{
my_class t = new my_class();
t.testt();
}
}
}
Kod mojej klasy:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication5
{
public class my_class : Form1
{
public void testt()
{
progressBar1.Visible = true;
progressBar1.Maximum = 1000;
for (int i = 0; i < 1000; i++)
{
progressBar1.Value++;
}
progressBar1.Value = 0;
}
}
}
Mój problem polega na tym że po kliknięciu przycisku nic się nie dzieje (progressbar jest ustawiony na publiczny). Proszę o napisanie co robię źle.