473,381 Members | 1,493 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,381 software developers and data experts.

Control.background image property

Anyone know how to make use of this?
http://msdn.microsoft.com/library/de...ImageTopic.asp

I cant seem to work out what to do.
Thanks Mike.

Nov 21 '05 #1
7 1302
Michael,

The control class is the base class of all controls including forms.

This property you find in all controls.(because the inherit from it)

Therefore you can do not have to cast to individual controls when you have
by instance an event that is for all controls.

Than you can do.
directcast(sender,control).backgroundimage = image.imagefromfile("blabla")

Watch that this is for a windowform control and not a web.ui.control

I hope this helps?

Cor

"Michael Turner" <fi*****@m-turner.co.uk> schreef in bericht
news:Oh**************@TK2MSFTNGP09.phx.gbl...
Anyone know how to make use of this?
http://msdn.microsoft.com/library/de...ImageTopic.asp
I cant seem to work out what to do.
Thanks Mike.

Nov 21 '05 #2
* "Michael Turner" <fi*****@m-turner.co.uk> scripsit:
Anyone know how to make use of this?
http://msdn.microsoft.com/library/de...ImageTopic.asp

I cant seem to work out what to do.


What doesn't work? Are you trying to assign a background image to a
control? Notice that all controls inherit this property, but some
controls do not implement it, so setting the background image doesn't
cause an image to be displayed in the background for all controls.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
Herfried,

I was looking for a text, I think you found the right one. I added an extra
sentence for it.

Notice that all controls inherit this property, but some
controls do not implement it, so setting the background image doesn't
cause an image to be displayed in the background for all controls.

What is for more properties which are inherited, while some properties are
in some controls overidden, by instance Text.

Cor
Nov 21 '05 #4
I am trying to change the gackground image of a DataGrid and was pointed to
this article by MSDN, I have tried what you suggested but the background
image still does not appear.
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Michael,

The control class is the base class of all controls including forms.

This property you find in all controls.(because the inherit from it)

Therefore you can do not have to cast to individual controls when you have
by instance an event that is for all controls.

Than you can do.
directcast(sender,control).backgroundimage = image.imagefromfile("blabla")

Watch that this is for a windowform control and not a web.ui.control

I hope this helps?

Cor

"Michael Turner" <fi*****@m-turner.co.uk> schreef in bericht
news:Oh**************@TK2MSFTNGP09.phx.gbl...
Anyone know how to make use of this?

http://msdn.microsoft.com/library/de...ImageTopic.asp

I cant seem to work out what to do.
Thanks Mike.



Nov 21 '05 #5
Michael,

See the text Herfried, added and to what I again addes something.
What you try to do is nothing the way, when you cannot do it using the
datagrid itself, you cannot do it using the class it derives it from.

It is an overridable property so you can do your own code, however I did not
see a sample on Google for that, what is mostly when it is easy.

Cor
Nov 21 '05 #6
Michael,

I cannot understand my own message, I was in a very hurry when I wrote it.

Here a corrected text.
----------------------------------------
See the text that Herfried has added and to what I again added something.

It is an overridable property so you can do your own code in your own
inherrited datagrid class, however I did not see any sample on Google for
that, what is mostly when it is easy.

Cor
Nov 21 '05 #7
* "Michael Turner" <fi*****@m-turner.co.uk> scripsit:
I am trying to change the gackground image of a DataGrid and was pointed to
this article by MSDN, I have tried what you suggested but the background
image still does not appear.


Do you have the URL of this article at hand?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #8

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

Similar topics

3
by: coolsti | last post by:
I need some help here. I am making an application which allows a user to look at a series of picture files one at a time, and enter the outcome of various visual tests to a database. The...
5
by: proximus | last post by:
Hi, I am trying to change the background of table TD's. The problem is that I have no access to the HTML code. SO I am trying to alter this using Javascript/DOM in an external .js file. I...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
9
by: SStory | last post by:
I have a picturebox in my About form. would like to have a link to my company website. Wanted the links background to be transparent. It seems that no one knows how to do this. Have asked...
2
by: M West | last post by:
hello, currently trying to write a custom control that will display an image in true transparent form, e.g. can actually see the background images placed behind the control rather than the...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
3
by: aledrjones | last post by:
Hi I've got a c# application that will often run in the background as it is used to monitor connections to a host. An activex control displays the communication between the app and the host. ...
3
by: senfo | last post by:
I developed a Windows control in VS 2005 that inherits from the PictureBox Control that adds the ability to select images in a Windows application. It is, however, experiencing a strange issue...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.