473,418 Members | 3,431 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,418 software developers and data experts.

How check BackgroundImage property?

I am trying to check which image is currently the BackgroundImage (VB.NET
2005). Can you help me out?

Me.BackgroundImage.ToString doesn't work.

Here's the sample code...

Select Case Me.BackgroundImage.ToString
Case "MyApp.My.Resources.Resources.BaseCurrencyControlN oChange"
Me.BackgroundImage =
MyApp.My.Resources.Resources.BaseCurrencyControlRe d
Case "MyApp.My.Resources.Resources.BaseCurrencyControlR ed"
Me.BackgroundImage =
MyApp.My.Resources.Resources.BaseCurrencyControlGr een
Case "MyApp.My.Resources.Resources.BaseCurrencyControlG reen"
Me.BackgroundImage =
MyApp.My.Resources.Resources.BaseCurrencyControlNo Change
Case Else
End Select

Thanks!
Nov 21 '05 #1
1 4668
"VB Programmer" <do**@emailme.com> schrieb:
I am trying to check which image is currently the BackgroundImage (VB.NET
2005). Can you help me out?

Me.BackgroundImage.ToString doesn't work.

Here's the sample code...

Select Case Me.BackgroundImage.ToString
Case "MyApp.My.Resources.Resources.BaseCurrencyControlN oChange"
Me.BackgroundImage =
MyApp.My.Resources.Resources.BaseCurrencyControlRe d
Case "MyApp.My.Resources.Resources.BaseCurrencyControlR ed"
Me.BackgroundImage =
MyApp.My.Resources.Resources.BaseCurrencyControlGr een
Case "MyApp.My.Resources.Resources.BaseCurrencyControlG reen"
Me.BackgroundImage =
MyApp.My.Resources.Resources.BaseCurrencyControlNo Change
Case Else
End Select

Untested:

\\\
Select Case True
Case Me.BackgroundImage Is My.Resources.BaseCurrencyControlNoChange
...
Case...
...
...
End Select
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '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?
14
by: Dino M. Buljubasic | last post by:
I would like to be able to compare BackgroundImage Property of two picture boxes on my form. How can I do that? I am using : if (pctOne.BackgroundImage Is pctTwo.BackgroundImage) then //...
1
by: kjon | last post by:
Hi, I'm trying to get the BackgroundImage of a form/control and draw it again in runtime. But if the Backgroundimage is "None", the DrawImage command will give an error. Is it possible to...
1
by: John | last post by:
Hello all, I was wondering, does this property really exist in VB.NET 2003? Because it's listed in Intellisense, but setting it doesn't seem to have the slightest effect on the visual look of...
3
by: Sakharam Phapale | last post by:
Hi All, How to set the background image for TrackBar control. Since BackgroundImage property doesn't visible in design mode, I tried doing it in run time as follows, ...
12
by: Sharon | last post by:
I’m using a Panel control in my form to display a background image. So in the Form OnPaint() I wrote: myPanel.BackgroundImage = m_bmp; While the m_bmp is the Form Bitmap member. The problem...
1
by: moi.romanowsky | last post by:
Does anyone know why the backgroundImage does not display in VB? I have tried setting it in the properties window (where the thumbnail shows) and explicitly in my code like so: ...
7
by: rodchar | last post by:
hey all, how do i change the BackgroundImage property of my form in code? thanks, rodchar
4
by: =?Utf-8?B?cmF5IG4=?= | last post by:
I have a need to put an image on the background of a SplitterPanel. However, I need it to appear in the bottom right corner of the panel instead of the standard Centered/Tiled/Stretched found in...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.