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
Nick
NA
9
0
Begginers question - accessing properties of another class
Apr 3 2007 8:23 AM
Hi, I am using visual studio to create a C# application. I have designed a form with buttons, etc. The code that visual studio generates is similar to the following: [code] namespace WindowsApplication1 { partial class Form1 { //lots of stuff here private System.Windows.Forms.Button btnStart; private System.Windows.Forms.TextBox tbURL; } } [/code] In the main application, I have the following [code] namespace WindowsApplication1 { public partial class Form1 : Form { //Here I can access the components directly, etc. tbTextBox.Text = whatever } } class someclass { //Here i cannot access any of the form components } [/code] I want to access the components from "someclass". I have tried making the components public in the code that visual studio generates, I have tried using: WindowsApplication1.Form1.whatever... nothing works. Any ideas?
Reply
Answers (
8
)
How to access a Line in a GraphicsPath??
Storing datasource and its column names in session