.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 12th, 2009, 02:24 PM
achilleas11 achilleas11 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 1 achilleas11 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 38 sec
Reputation Power: 0
Changing object in a Form through a Class

Hello, I want to state a problem for which wherever I have searched for help, I cannot get an answer.

In C# 2008, I have the main form called Form1 and a class called Class1 containing a function which is summoned from the main Form.
In the last lines of the function I have put those lines

Form1 lab = new Form1();
lab.pictureBox1.Refresh();
lab.btn2.Text = "grayscale";
lab.button1.Text = "Restore to Grayscale";
lab.button1.Width = 120;


The "button1", "btn2", and "pictureBox1" are all "Modifiers=public" in Form1. The problem isn't there.
When I am running the code, C# decides to ignore those 5 lines for a reason I cannot understand

As I get it, the problem must be in the first line, but cannot fix it. Help me please.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Changing object in a Form through a Class


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap