Icon image contents

2010-06-26 Thread Greg Keogh
Folks, I can't find a managed way of determining what images an Icon contains. An icon can contain one or more images, traditionally 16x16, 32x32 and 48x48, but now of various sizes and colour depths can be within. I can easily load an Icon class from a file, but I just can't see how to find which

FW: Icon image contents (FOUND?)

2010-06-26 Thread Greg Keogh
Sheesh! I found the answer buried in the fine print of the Icon constructor, sort of. If a version cannot be found that exactly matches the size, the closest match is used It's true, for example if I ask for a 48x48 which isn't there I get a 32x32 instead as a fallback when I inspect the

[OT] Loading file into a row

2010-06-26 Thread Greg Keogh
Who's working on Sunday? ... I'm trying some sample code that is supposed to bulk load a file into a varbinary column of a table. My statement is this: UPDATE TestTable set [Icon] = (SELECT * FROM OPENROWSET(BULK 'E:\icons\SM\accicons04.ico', SINGLE_BLOB) AS x ) WHERE [Name]='Foo' But I

RE: [OT] Loading file into a row

2010-06-26 Thread Greg Keogh
If SQL Server then the path is relative to the server and the permissions will depend on who the statement is executing as. OH NO! ... I forgot that I was using the SQL Server instance on my file server, so it was looking for the file on the wrong machine. Now it works! Thanks Greg