473,323 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Image Property in the designer

I am trying to create image property that will work in the designer. I want
the image to be written to the resource file for the class.

Here is what I have so far, but I am running into a wall here. The property
comes up okay in the designer with the drill button and the file selector.
But after I choose an Image file, nothing happens. The property remains
(none).

If you have any info on how to achieve this it would be greatly appreciated.

Code snippit:

[Category("Behavior"),
Browsable(true),
TypeConverter(typeof(ImageConverter)),
EditorAttribute(typeof(ImageEditor),typeof(UITypeE ditor))]
public System.Drawing.Image Image{
get { return mImage; }
set { mImage = null; }
}
Nov 16 '05 #1
1 1603
Take a look at your set{} code.
You need to say set { mImage = value; }

"Adam Dockter" <ad**@cu.net> wrote in message
news:O1**************@tk2msftngp13.phx.gbl...
I am trying to create image property that will work in the designer. I
want
the image to be written to the resource file for the class.

Here is what I have so far, but I am running into a wall here. The
property
comes up okay in the designer with the drill button and the file selector.
But after I choose an Image file, nothing happens. The property remains
(none).

If you have any info on how to achieve this it would be greatly
appreciated.

Code snippit:

[Category("Behavior"),
Browsable(true),
TypeConverter(typeof(ImageConverter)),
EditorAttribute(typeof(ImageEditor),typeof(UITypeE ditor))]
public System.Drawing.Image Image{
get { return mImage; }
set { mImage = null; }
}

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Daniel | last post by:
when i set the BackgroundImage property in the designer the image still doesnt show in the background of the textbox any other property must be set?
10
by: newbie_csharp | last post by:
Hi, I need to load a picture on a button but I'd like to set white color tranansparency (not to show white color). How can I do it? I tried to load a masked color GIF file but VS 2002 could not...
2
by: Don Tucker | last post by:
Hello, I have a Windows Application that needs to load multiple image files in response to users clicking buttons. Currently, I just have these images as .jpg files on disk, but I don't want to...
3
by: euan | last post by:
Hey guys, I am just playing around with asp.net 2.0 and I was reading about the image control (for mobile designer) and thought that would be handy. So I have created: Do While...
0
by: Jordan Bowness | last post by:
I make a similar post in another newsgroup, but this example is simplified somewhat. I have a component (cmpMyComponent) with 2 properties. The 1st property is a string value (Description) and...
0
by: Claudio Di Flumeri | last post by:
I created a simple usercontrol with a designer class derived from ControlDesigner. The designer class implements a designer verb "TestVerb". when i add this usercontrol to a form in the vs-net...
2
by: sklett | last post by:
I'm getting an error when I try to load a form in the designer: <rest of namespace>.Properties.Resources' has no property named 'SearchGo_icon'. When I look at the list of image resources I see...
3
by: | last post by:
I've got a winForm that has a good number of custom controls with custom graphics that are stored as resources in the project. Recently, I updated all of the graphics with a new look. Added all the...
3
by: bbrewder | last post by:
I am interested in hearing how other people have handled sharing resources in multiple projects (for example, a save icon). We have a product that has many forms within many projects. Many of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.