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
ntahip
NA
3
0
cannot set button properties from a different class.
Jan 4 2011 1:20 AM
What am I doing wrong. Trying to make a button disappear from my player class hide method. code to follow:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Player p1 = new Player();
p1.Hide();
}
private void button1_Click(object sender, EventArgs e)
{
}
public Boolean button1Visible
{
get { return this.button1.Visible; }
set { this.button1.Visible = value; }
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication4
{
class Player
{
public void Hide()
{
Form1 frm1 = new Form1();
frm1.button1Visible = true;
}
}
}
Reply
Answers (
3
)
Need help in parsing a huge XML file in windows application
ShowDialog not behaving like a modal dialog in IE 7