943,902 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 643
  • C# RSS
Dec 3rd, 2008
0

How to access elements and objects from a form class to another form class?

Expand Post »
Hello, I've been working with threading these days. I want to put a progress bar which is in a separate form but in the same namespace. My form1 class has all the controls for my drag and drop functionality while in my form2 class will be my progress form in which it will pop up when I will drag and drop multiple files which will make the user wait for it as it progress or press the cancel button to cancel the transferring. My problem is I'm having a hard time accessing the variables to be the basis of my progress bar in class form1. I would really appreciate if you will give me insights and tutorials to guide me with my problem. Thank you
Similar Threads
Reputation Points: 7
Solved Threads: 2
Junior Poster
murderotica is offline Offline
171 posts
since Aug 2008
Dec 3rd, 2008
0

Re: How to access elements and objects from a form class to another form class?

well as long as you made an instance of your form it would go something like

C# Syntax (Toggle Plain Text)
  1. frmProgress.Progressbar.Value=0;
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008
Dec 3rd, 2008
0

Re: How to access elements and objects from a form class to another form class?

How can I access Outlook variables? Because I'm basing my progress form to the values taken from Outlook, like Outlook.Selection.
Reputation Points: 7
Solved Threads: 2
Junior Poster
murderotica is offline Offline
171 posts
since Aug 2008
Dec 3rd, 2008
0

Re: How to access elements and objects from a form class to another form class?

That last post has little to do with the first - its really a new question and should have a new thread.

What have you googled about outlook - or searched even in this forum
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008
Dec 3rd, 2008
0

Re: How to access elements and objects from a form class to another form class?

I'm sorry for the confusion. I consider the Outlook variables as part of my form1 member so I think it is considered as part. I googled but found some and it is a little confusing.
Reputation Points: 7
Solved Threads: 2
Junior Poster
murderotica is offline Offline
171 posts
since Aug 2008
Dec 3rd, 2008
0

Re: How to access elements and objects from a form class to another form class?

the problem is, for someone browsing through the forum, reads your last post and wonders how that has something to do with referencing another form - while for you its related in by project, for the rest of us, its not related at all. Its just another problem

As for doing it - if you found some stuff, thats good, have you tried it, what errors did you get?
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008
Dec 3rd, 2008
0

Re: How to access elements and objects from a form class to another form class?

I tried declaring the variable public but it gave me an error.
Reputation Points: 7
Solved Threads: 2
Junior Poster
murderotica is offline Offline
171 posts
since Aug 2008
Dec 3rd, 2008
0

Re: How to access elements and objects from a form class to another form class?

And the error was? did you add the reference? the using statements?
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: exception pleasehelp
Next Thread in C# Forum Timeline: Communication between 2 forms





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC