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
majd kazaz
NA
3
6.8k
System Drowing.Bitmap is a "type" but is used as a variable.. Please Help
Feb 23 2011 5:22 AM
hello there.
i am making a statement to display an image when a button is clicked, i am having an error when doning this, the error i am getting is the following:
System Drowing.Bitmap is a "type" but is used as a variable.. Please Help
System Drowing.Image is a "type" but is used as a variable.. Please Help
the code that i am using is the following:
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 Group_Project_final
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
panel2.Visible = true;
panel1.Visible = false;
panel3.Visible = false;
}
private void button1_Click(object sender, EventArgs e)
{
panel1.Visible = true;
panel2.Visible = false;
panel3.Visible = false;
}
private void button3_Click(object sender, EventArgs e)
{
panel3.Visible = true;
panel1.Visible = false;
panel2.Visible = false;
}
private void button4_Click(object sender, EventArgs e )
{
if (button4.Text == "off")
button4.Text = "on";
//Bitmap image = new Bitmap("C:\\Users\\LionHeart\\Desktop\\PDI_individual_Project\\C#Practice\\WindowsFormsApplication2\\WindowsFormsApplication2\\Resources\\bedroom light on2.jpg");
//pictureBox1.Image = image;
else
button4.Text = "off";
if (button4.Text == "on")
Bitmap = new Bitmap("C:\\Users\\LionHeart\\Desktop\\PDI_individual_Project\\C#Practice\\WindowsFormsApplication2\\WindowsFormsApplication2\\Resources\\bedroom light on2.jpg");
pictureBox1.Image = Image;
}
}
}
if any one can help me sort that issue i will be very greatfull, thanks.
Reply
Answers (
3
)
System Drowing.Bitmap is a "type" but is used as a variable.. Please Help
using c#.net how to create a calculator in web applications