Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2006

Tip: Looking for answers? Try searching our database.

Updating progress bar on Form1 FROM Form2

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Svein Erik - 19 Aug 2006 18:52 GMT
C# 2.0

How can i update my progress bar on Form1, from Form2? Form 2 contains a
button that is supposed to update the progressbar on Form1 by 5 in value.
I can't find out how to do this, please help me with some code samples :)

Thanks!
Frans Bouma [C# MVP] - 21 Aug 2006 09:33 GMT
> C# 2.0
>
[quoted text clipped - 4 lines]
>
> Thanks!

    A winforms application is single threaded. So if you want to alter a
control on Form1 from Form2, you should call a method of Form1 from
Form2 (e.g. inside the eventhandler of the button) and that method of
Form1 then alters the progress bar.

        FB

Signature

------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Ryan Ramsey - 25 Aug 2006 05:48 GMT
So calling an event is easy... Put how would you do something like (from
form 1) form2.label.text = "data from form 1"

>> C# 2.0
>>
[quoted text clipped - 11 lines]
>
> FB

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.