TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
701
1.3k
217.3k
How can pass Progressbar with percentage to another Form
Feb 23 2019 5:54 PM
Hi,
I wrote these codeforactivate my Progressbar. Its works but itsdoesnt pass to another form (form2). How can do?
Thank you,
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
WindowsFormsApplication1
{
public
partial
class
Form1 : Form
{
int
progress = 0;
public
Form1()
{
InitializeComponent();
}
private
void
timer1_Tick(
object
sender, EventArgs e)
{
this
.progressBar1.Increment(1);
if
(progressBar1.Value == progressBar1.Maximum)
{
this
.timer1.Stop();
}
progress += 1;
if
(progress >= 100)
{
timer1.Enabled =
false
;
timer1.Stop();
}
progressBar1.Value = progress;
percentTxt.Text = progress.ToString()+
".00 %"
;
}
private
void
button1_Click(
object
sender, EventArgs e)
{
timer1.Enabled =
true
;
timer1.Interval = 50;
Form2 frm2 =
new
Form2();
frm2.ShowDialog();
}
}
}
Reply
Answers (
2
)
Google Drive folder delete in name textbox13.text
What is cross page-posting?