By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,190 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,190 IT Pros & Developers. It's quick & easy.

How check BackgroundImage property?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.