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

Load icon from resx

P: n/a
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k
Nov 21 '05 #1
Share this Question
Share on Google+
15 Replies


P: n/a
Dim p As System.Reflection.Assembly
p = System.Reflection.Assembly.GetExecutingAssembly()
Icons(0) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(),
"GreenBulb.ico"))
Icons(1) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(),
"YellowBulb.ico"))
Icons(2) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(),
"RedBulb.ico"))

Hope it helps
Chris

PS. Make sure you make the icons as embedded.

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k

Nov 21 '05 #2

P: n/a
Dim p As System.Reflection.Assembly
p = System.Reflection.Assembly.GetExecutingAssembly()
Icons(0) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(),
"GreenBulb.ico"))
Icons(1) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(),
"YellowBulb.ico"))
Icons(2) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(),
"RedBulb.ico"))

Hope it helps
Chris

PS. Make sure you make the icons as embedded.

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k

Nov 21 '05 #3

P: n/a
See the article at:

http://www.codeproject.com/vb/net/embeddedresources.asp
--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k

Nov 21 '05 #4

P: n/a
See the article at:

http://www.codeproject.com/vb/net/embeddedresources.asp
--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k

Nov 21 '05 #5

P: n/a
Kurt,
In addition to the other comments.

Rather then storing the icon in a .RESX file, I normally just embed the icon
directly, as its easier to maintain.

Shawn's article shows how to embed the icon directly & retrieve it. Plus
explains why its easier to maintain.
http://www.windojitsu.com/blog/resxsucks.html

My Xml Resource Resolver was written with XML in mind, however it can easily
be used with other resources, such as icons.
http://msmvps.com/jayharlow/archive/.../24/33766.aspx

To use my XmlResourceResolver "as is" with an icon, use something like:

Public Module TestModule
Dim name As String
Dim resolver As New XmlResourceResolver(GetType(TestModule))
Dim absoluteUri As Uri = resolver.ResolveUri(Nothing, name)
Dim input As Stream = DirectCast(resolver.GetEntity(absoluteUri,
Nothing, Nothing), Stream)

Dim theIcon As New Icon(input)

End Module

Alternatively you could just extract most of the GetEntity method into its
own class (which gives you a class similar to Shawn's). Something like:

Option Strict On
Option Explicit On

Imports System.IO
Imports System.Globalization
Imports System.Reflection

Public Class ResourceLoader

Private ReadOnly m_assembly As [Assembly]
Private ReadOnly m_type As Type

Public Sub New(ByVal type As Type)
m_assembly = type.Assembly
m_type = type
End Sub

Public ReadOnly Property Location() As String
Get
Return m_assembly.Location
End Get
End Property

Public Function GetStream(ByVal name As String) As Stream
Dim culture As CultureInfo = CultureInfo.CurrentUICulture
Dim stream As Stream

' Try the specific culture
stream = GetManifestResourceStream(culture, name)

' Try the neutral culture
If stream Is Nothing AndAlso Not culture.IsNeutralCulture Then
stream = GetManifestResourceStream(culture.Parent, name)
End If

' Try the default culture
If stream Is Nothing Then
stream = GetManifestResourceStream(name)
End If

If stream Is Nothing Then
Throw New FileNotFoundException(Nothing, name)
End If
Return stream

End Function

Private Function GetManifestResourceStream(ByVal culture As CultureInfo,
ByVal name As String) As Stream
Try
Dim satellite As [Assembly] =
m_assembly.GetSatelliteAssembly(culture)
Return satellite.GetManifestResourceStream(m_type, name)
Catch ex As FileNotFoundException
Return Nothing
End Try
End Function

Private Function GetManifestResourceStream(ByVal name As String) As
Stream
Return m_assembly.GetManifestResourceStream(m_type, name)
End Function

End Class

Hope this helps
Jay

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k

Nov 21 '05 #6

P: n/a
Kurt,
In addition to the other comments.

Rather then storing the icon in a .RESX file, I normally just embed the icon
directly, as its easier to maintain.

Shawn's article shows how to embed the icon directly & retrieve it. Plus
explains why its easier to maintain.
http://www.windojitsu.com/blog/resxsucks.html

My Xml Resource Resolver was written with XML in mind, however it can easily
be used with other resources, such as icons.
http://msmvps.com/jayharlow/archive/.../24/33766.aspx

To use my XmlResourceResolver "as is" with an icon, use something like:

Public Module TestModule
Dim name As String
Dim resolver As New XmlResourceResolver(GetType(TestModule))
Dim absoluteUri As Uri = resolver.ResolveUri(Nothing, name)
Dim input As Stream = DirectCast(resolver.GetEntity(absoluteUri,
Nothing, Nothing), Stream)

Dim theIcon As New Icon(input)

End Module

Alternatively you could just extract most of the GetEntity method into its
own class (which gives you a class similar to Shawn's). Something like:

Option Strict On
Option Explicit On

Imports System.IO
Imports System.Globalization
Imports System.Reflection

Public Class ResourceLoader

Private ReadOnly m_assembly As [Assembly]
Private ReadOnly m_type As Type

Public Sub New(ByVal type As Type)
m_assembly = type.Assembly
m_type = type
End Sub

Public ReadOnly Property Location() As String
Get
Return m_assembly.Location
End Get
End Property

Public Function GetStream(ByVal name As String) As Stream
Dim culture As CultureInfo = CultureInfo.CurrentUICulture
Dim stream As Stream

' Try the specific culture
stream = GetManifestResourceStream(culture, name)

' Try the neutral culture
If stream Is Nothing AndAlso Not culture.IsNeutralCulture Then
stream = GetManifestResourceStream(culture.Parent, name)
End If

' Try the default culture
If stream Is Nothing Then
stream = GetManifestResourceStream(name)
End If

If stream Is Nothing Then
Throw New FileNotFoundException(Nothing, name)
End If
Return stream

End Function

Private Function GetManifestResourceStream(ByVal culture As CultureInfo,
ByVal name As String) As Stream
Try
Dim satellite As [Assembly] =
m_assembly.GetSatelliteAssembly(culture)
Return satellite.GetManifestResourceStream(m_type, name)
Catch ex As FileNotFoundException
Return Nothing
End Try
End Function

Private Function GetManifestResourceStream(ByVal name As String) As
Stream
Return m_assembly.GetManifestResourceStream(m_type, name)
End Function

End Class

Hope this helps
Jay

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k

Nov 21 '05 #7

P: n/a
I get error on Me.GetType:

"'Me' is valid only within an instance method."

It have a console application, thats why?
/k

"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> wrote
in message news:eE**************@TK2MSFTNGP11.phx.gbl...
Dim p As System.Reflection.Assembly
p = System.Reflection.Assembly.GetExecutingAssembly()
Icons(0) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(), "GreenBulb.ico"))
Icons(1) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(), "YellowBulb.ico"))
Icons(2) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(), "RedBulb.ico"))

Hope it helps
Chris

PS. Make sure you make the icons as embedded.

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k


Nov 21 '05 #8

P: n/a
I get error on Me.GetType:

"'Me' is valid only within an instance method."

It have a console application, thats why?
/k

"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> wrote
in message news:eE**************@TK2MSFTNGP11.phx.gbl...
Dim p As System.Reflection.Assembly
p = System.Reflection.Assembly.GetExecutingAssembly()
Icons(0) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(), "GreenBulb.ico"))
Icons(1) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(), "YellowBulb.ico"))
Icons(2) = New System.Drawing.Icon(p.GetManifestResourceStream(Me .GetType(), "RedBulb.ico"))

Hope it helps
Chris

PS. Make sure you make the icons as embedded.

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k


Nov 21 '05 #9

P: n/a
Wow, quite an improvement versus the old LoadResIcon("iconname").

Thanks,
/k
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#C**************@tk2msftngp13.phx.gbl...
Kurt,
In addition to the other comments.

Rather then storing the icon in a .RESX file, I normally just embed the icon directly, as its easier to maintain.

Shawn's article shows how to embed the icon directly & retrieve it. Plus
explains why its easier to maintain.
http://www.windojitsu.com/blog/resxsucks.html

My Xml Resource Resolver was written with XML in mind, however it can easily be used with other resources, such as icons.
http://msmvps.com/jayharlow/archive/.../24/33766.aspx

To use my XmlResourceResolver "as is" with an icon, use something like:

Public Module TestModule
Dim name As String
Dim resolver As New XmlResourceResolver(GetType(TestModule))
Dim absoluteUri As Uri = resolver.ResolveUri(Nothing, name)
Dim input As Stream = DirectCast(resolver.GetEntity(absoluteUri,
Nothing, Nothing), Stream)

Dim theIcon As New Icon(input)

End Module

Alternatively you could just extract most of the GetEntity method into its
own class (which gives you a class similar to Shawn's). Something like:

Option Strict On
Option Explicit On

Imports System.IO
Imports System.Globalization
Imports System.Reflection

Public Class ResourceLoader

Private ReadOnly m_assembly As [Assembly]
Private ReadOnly m_type As Type

Public Sub New(ByVal type As Type)
m_assembly = type.Assembly
m_type = type
End Sub

Public ReadOnly Property Location() As String
Get
Return m_assembly.Location
End Get
End Property

Public Function GetStream(ByVal name As String) As Stream
Dim culture As CultureInfo = CultureInfo.CurrentUICulture
Dim stream As Stream

' Try the specific culture
stream = GetManifestResourceStream(culture, name)

' Try the neutral culture
If stream Is Nothing AndAlso Not culture.IsNeutralCulture Then
stream = GetManifestResourceStream(culture.Parent, name)
End If

' Try the default culture
If stream Is Nothing Then
stream = GetManifestResourceStream(name)
End If

If stream Is Nothing Then
Throw New FileNotFoundException(Nothing, name)
End If
Return stream

End Function

Private Function GetManifestResourceStream(ByVal culture As CultureInfo, ByVal name As String) As Stream
Try
Dim satellite As [Assembly] =
m_assembly.GetSatelliteAssembly(culture)
Return satellite.GetManifestResourceStream(m_type, name)
Catch ex As FileNotFoundException
Return Nothing
End Try
End Function

Private Function GetManifestResourceStream(ByVal name As String) As
Stream
Return m_assembly.GetManifestResourceStream(m_type, name)
End Function

End Class

Hope this helps
Jay

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k


Nov 21 '05 #10

P: n/a
Wow, quite an improvement versus the old LoadResIcon("iconname").

Thanks,
/k
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#C**************@tk2msftngp13.phx.gbl...
Kurt,
In addition to the other comments.

Rather then storing the icon in a .RESX file, I normally just embed the icon directly, as its easier to maintain.

Shawn's article shows how to embed the icon directly & retrieve it. Plus
explains why its easier to maintain.
http://www.windojitsu.com/blog/resxsucks.html

My Xml Resource Resolver was written with XML in mind, however it can easily be used with other resources, such as icons.
http://msmvps.com/jayharlow/archive/.../24/33766.aspx

To use my XmlResourceResolver "as is" with an icon, use something like:

Public Module TestModule
Dim name As String
Dim resolver As New XmlResourceResolver(GetType(TestModule))
Dim absoluteUri As Uri = resolver.ResolveUri(Nothing, name)
Dim input As Stream = DirectCast(resolver.GetEntity(absoluteUri,
Nothing, Nothing), Stream)

Dim theIcon As New Icon(input)

End Module

Alternatively you could just extract most of the GetEntity method into its
own class (which gives you a class similar to Shawn's). Something like:

Option Strict On
Option Explicit On

Imports System.IO
Imports System.Globalization
Imports System.Reflection

Public Class ResourceLoader

Private ReadOnly m_assembly As [Assembly]
Private ReadOnly m_type As Type

Public Sub New(ByVal type As Type)
m_assembly = type.Assembly
m_type = type
End Sub

Public ReadOnly Property Location() As String
Get
Return m_assembly.Location
End Get
End Property

Public Function GetStream(ByVal name As String) As Stream
Dim culture As CultureInfo = CultureInfo.CurrentUICulture
Dim stream As Stream

' Try the specific culture
stream = GetManifestResourceStream(culture, name)

' Try the neutral culture
If stream Is Nothing AndAlso Not culture.IsNeutralCulture Then
stream = GetManifestResourceStream(culture.Parent, name)
End If

' Try the default culture
If stream Is Nothing Then
stream = GetManifestResourceStream(name)
End If

If stream Is Nothing Then
Throw New FileNotFoundException(Nothing, name)
End If
Return stream

End Function

Private Function GetManifestResourceStream(ByVal culture As CultureInfo, ByVal name As String) As Stream
Try
Dim satellite As [Assembly] =
m_assembly.GetSatelliteAssembly(culture)
Return satellite.GetManifestResourceStream(m_type, name)
Catch ex As FileNotFoundException
Return Nothing
End Try
End Function

Private Function GetManifestResourceStream(ByVal name As String) As
Stream
Return m_assembly.GetManifestResourceStream(m_type, name)
End Function

End Class

Hope this helps
Jay

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
Anybody has a tip of where to find info/example how to retrieve an icon
from a .RESX-file?

/k


Nov 21 '05 #11

P: n/a
In your code
"Return MyBase.ResolveUri(baseUri, relativeUri)"

I get errror:
"'MyBase' cannot be used with method 'Public Overridable MustOverride
Overloads Function ResolveUri(baseUri As System.Uri, relativeUri As String)
As System.Uri' because it is declared 'MustOverride'."

Ideas?

/k


"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#C**************@tk2msftngp13.phx.gbl...
Kurt,
In addition to the other comments.

Rather then storing the icon in a .RESX file, I normally just embed the icon directly, as its easier to maintain.
My Xml Resource Resolver was written with XML in mind, however it can easily be used with other resources, such as icons.
http://msmvps.com/jayharlow/archive/.../24/33766.aspx

Nov 21 '05 #12

P: n/a
In your code
"Return MyBase.ResolveUri(baseUri, relativeUri)"

I get errror:
"'MyBase' cannot be used with method 'Public Overridable MustOverride
Overloads Function ResolveUri(baseUri As System.Uri, relativeUri As String)
As System.Uri' because it is declared 'MustOverride'."

Ideas?

/k


"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#C**************@tk2msftngp13.phx.gbl...
Kurt,
In addition to the other comments.

Rather then storing the icon in a .RESX file, I normally just embed the icon directly, as its easier to maintain.
My Xml Resource Resolver was written with XML in mind, however it can easily be used with other resources, such as icons.
http://msmvps.com/jayharlow/archive/.../24/33766.aspx

Nov 21 '05 #13

P: n/a
Kurt,
BTW: If you want to keep the Icon in a .resx file, you can use a
System.Resources.ResourceManager to read it.

There are advantages to both.

Hope this helps
Jay

"kurt sune" <ap*@apa.cx> wrote in message
news:O$**************@TK2MSFTNGP11.phx.gbl...
Wow, quite an improvement versus the old LoadResIcon("iconname").

Thanks,
/k
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#C**************@tk2msftngp13.phx.gbl...
Kurt,
In addition to the other comments.

Rather then storing the icon in a .RESX file, I normally just embed the

icon
directly, as its easier to maintain.

Shawn's article shows how to embed the icon directly & retrieve it. Plus
explains why its easier to maintain.
http://www.windojitsu.com/blog/resxsucks.html

My Xml Resource Resolver was written with XML in mind, however it can

easily
be used with other resources, such as icons.
http://msmvps.com/jayharlow/archive/.../24/33766.aspx

To use my XmlResourceResolver "as is" with an icon, use something like:

Public Module TestModule
Dim name As String
Dim resolver As New XmlResourceResolver(GetType(TestModule))
Dim absoluteUri As Uri = resolver.ResolveUri(Nothing, name)
Dim input As Stream = DirectCast(resolver.GetEntity(absoluteUri,
Nothing, Nothing), Stream)

Dim theIcon As New Icon(input)

End Module

Alternatively you could just extract most of the GetEntity method into
its
own class (which gives you a class similar to Shawn's). Something like:

Option Strict On
Option Explicit On

Imports System.IO
Imports System.Globalization
Imports System.Reflection

Public Class ResourceLoader

Private ReadOnly m_assembly As [Assembly]
Private ReadOnly m_type As Type

Public Sub New(ByVal type As Type)
m_assembly = type.Assembly
m_type = type
End Sub

Public ReadOnly Property Location() As String
Get
Return m_assembly.Location
End Get
End Property

Public Function GetStream(ByVal name As String) As Stream
Dim culture As CultureInfo = CultureInfo.CurrentUICulture
Dim stream As Stream

' Try the specific culture
stream = GetManifestResourceStream(culture, name)

' Try the neutral culture
If stream Is Nothing AndAlso Not culture.IsNeutralCulture Then
stream = GetManifestResourceStream(culture.Parent, name)
End If

' Try the default culture
If stream Is Nothing Then
stream = GetManifestResourceStream(name)
End If

If stream Is Nothing Then
Throw New FileNotFoundException(Nothing, name)
End If
Return stream

End Function

Private Function GetManifestResourceStream(ByVal culture As

CultureInfo,
ByVal name As String) As Stream
Try
Dim satellite As [Assembly] =
m_assembly.GetSatelliteAssembly(culture)
Return satellite.GetManifestResourceStream(m_type, name)
Catch ex As FileNotFoundException
Return Nothing
End Try
End Function

Private Function GetManifestResourceStream(ByVal name As String) As
Stream
Return m_assembly.GetManifestResourceStream(m_type, name)
End Function

End Class

Hope this helps
Jay

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
> Anybody has a tip of where to find info/example how to retrieve an
> icon
> from a .RESX-file?
>
> /k
>
>



Nov 21 '05 #14

P: n/a
Kurt,
BTW: If you want to keep the Icon in a .resx file, you can use a
System.Resources.ResourceManager to read it.

There are advantages to both.

Hope this helps
Jay

"kurt sune" <ap*@apa.cx> wrote in message
news:O$**************@TK2MSFTNGP11.phx.gbl...
Wow, quite an improvement versus the old LoadResIcon("iconname").

Thanks,
/k
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#C**************@tk2msftngp13.phx.gbl...
Kurt,
In addition to the other comments.

Rather then storing the icon in a .RESX file, I normally just embed the

icon
directly, as its easier to maintain.

Shawn's article shows how to embed the icon directly & retrieve it. Plus
explains why its easier to maintain.
http://www.windojitsu.com/blog/resxsucks.html

My Xml Resource Resolver was written with XML in mind, however it can

easily
be used with other resources, such as icons.
http://msmvps.com/jayharlow/archive/.../24/33766.aspx

To use my XmlResourceResolver "as is" with an icon, use something like:

Public Module TestModule
Dim name As String
Dim resolver As New XmlResourceResolver(GetType(TestModule))
Dim absoluteUri As Uri = resolver.ResolveUri(Nothing, name)
Dim input As Stream = DirectCast(resolver.GetEntity(absoluteUri,
Nothing, Nothing), Stream)

Dim theIcon As New Icon(input)

End Module

Alternatively you could just extract most of the GetEntity method into
its
own class (which gives you a class similar to Shawn's). Something like:

Option Strict On
Option Explicit On

Imports System.IO
Imports System.Globalization
Imports System.Reflection

Public Class ResourceLoader

Private ReadOnly m_assembly As [Assembly]
Private ReadOnly m_type As Type

Public Sub New(ByVal type As Type)
m_assembly = type.Assembly
m_type = type
End Sub

Public ReadOnly Property Location() As String
Get
Return m_assembly.Location
End Get
End Property

Public Function GetStream(ByVal name As String) As Stream
Dim culture As CultureInfo = CultureInfo.CurrentUICulture
Dim stream As Stream

' Try the specific culture
stream = GetManifestResourceStream(culture, name)

' Try the neutral culture
If stream Is Nothing AndAlso Not culture.IsNeutralCulture Then
stream = GetManifestResourceStream(culture.Parent, name)
End If

' Try the default culture
If stream Is Nothing Then
stream = GetManifestResourceStream(name)
End If

If stream Is Nothing Then
Throw New FileNotFoundException(Nothing, name)
End If
Return stream

End Function

Private Function GetManifestResourceStream(ByVal culture As

CultureInfo,
ByVal name As String) As Stream
Try
Dim satellite As [Assembly] =
m_assembly.GetSatelliteAssembly(culture)
Return satellite.GetManifestResourceStream(m_type, name)
Catch ex As FileNotFoundException
Return Nothing
End Try
End Function

Private Function GetManifestResourceStream(ByVal name As String) As
Stream
Return m_assembly.GetManifestResourceStream(m_type, name)
End Function

End Class

Hope this helps
Jay

"kurt sune" <ap*@apa.cx> wrote in message
news:uW*************@TK2MSFTNGP12.phx.gbl...
> Anybody has a tip of where to find info/example how to retrieve an
> icon
> from a .RESX-file?
>
> /k
>
>



Nov 21 '05 #15

P: n/a
kurt,
Which version of .NET?

The code posted & on my blog works in VS.NET 2003 (.NET 1.1).

I noticed my blog page, has "cut & paste" issues, are you certain you got
the code to look like my blog page?

Hope this helps
Jay

"kurt sune" <ap*@apa.cx> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
In your code
"Return MyBase.ResolveUri(baseUri, relativeUri)"

I get errror:
"'MyBase' cannot be used with method 'Public Overridable MustOverride
Overloads Function ResolveUri(baseUri As System.Uri, relativeUri As
String)
As System.Uri' because it is declared 'MustOverride'."

Ideas?

/k


"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#C**************@tk2msftngp13.phx.gbl...
Kurt,
In addition to the other comments.

Rather then storing the icon in a .RESX file, I normally just embed the

icon
directly, as its easier to maintain.
My Xml Resource Resolver was written with XML in mind, however it can

easily
be used with other resources, such as icons.
http://msmvps.com/jayharlow/archive/.../24/33766.aspx


Nov 21 '05 #16

This discussion thread is closed

Replies have been disabled for this discussion.