Click here to Skip to main content
16,005,169 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Good Book for .NET and C# Pin
Kevin McFarlane6-Jul-05 9:50
Kevin McFarlane6-Jul-05 9:50 
GeneralRe: Good Book for .NET and C# Pin
dwatkins@dirq.net18-Jul-05 3:56
dwatkins@dirq.net18-Jul-05 3:56 
GeneralRe: Good Book for .NET and C# Pin
Kevin McFarlane18-Jul-05 7:10
Kevin McFarlane18-Jul-05 7:10 
GeneralShare Point Services Pin
vij20053-Jul-05 18:18
vij20053-Jul-05 18:18 
GeneralMono and Unix shell commands Pin
sebasalvo3-Jul-05 16:52
sebasalvo3-Jul-05 16:52 
GeneralRe: Mono and Unix shell commands Pin
S. Senthil Kumar3-Jul-05 19:42
S. Senthil Kumar3-Jul-05 19:42 
GeneralListView / ImageList SmallIcons failing to load properly Pin
CoderCat2-Jul-05 14:47
CoderCat2-Jul-05 14:47 
GeneralRe: ListView / ImageList SmallIcons failing to load properly Pin
CoderCat5-Jul-05 7:24
CoderCat5-Jul-05 7:24 
Ok, I'll answer my own silly question (see below ... and pardon my silly confusion).

The answer is: grab the size you want at the stream input level.

I was thinking (wishfull thinking) that there would be an "implicit" proper conversion to the ImageList.

private void z_LoadFromResources()
{
System.Drawing.Icon xIcon16 = null;
System.Drawing.Icon xIcon32 = null;
zxReader = new System.Resources.ResourceReader(zxAsm.GetManifestResourceStream("ResourceViewer.Any.resources"));
zxEnum = zxReader.GetEnumerator();
z_LisReset();
FileInfo[] xFiles = new DirectoryInfo(Vals.IconsFromPath).GetFiles("*.ico");
while (zxEnum.MoveNext())
{
string sKey = zxEnum.Key.ToString();
xIcon16 = new Icon((System.Drawing.Icon)zxEnum.Value, 16, 16);
xIcon32 = new Icon((System.Drawing.Icon)zxEnum.Value, 32, 32);
z_LisAdd(sKey, xIcon16, xIcon32);
}
zxLis.Refresh();
}
private void z_LoadFromFolder()
{
System.Drawing.Icon xIcon16 = null;
System.Drawing.Icon xIcon32 = null;
z_LisReset();
FileInfo[] xFiles = new DirectoryInfo(Vals.IconsFromPath).GetFiles("*.ico");
foreach (FileInfo xFile in xFiles)
{
xIcon16 = new Icon(xFile.OpenRead(), 16, 16);
xIcon32 = new Icon(xFile.OpenRead(), 32, 32);
string sKey = xFile.Name;
z_LisAdd(sKey, xIcon16, xIcon32);
}
zxLis.Refresh();
}
private void z_LisAdd(string theText, Icon theIcon16, Icon theIcon32)
{
zxPics2.Images.Add(theIcon32);
zxPics1.Images.Add(theIcon16);
zxLis.Items.Add(theText, zxPics1.Images.Count - 1);
}
public static void MakeResources()
{
FileInfo[] xFiles = new DirectoryInfo(Vals.IconsFromPath).GetFiles("*.ico");
ResourceWriter xOut = new ResourceWriter(Vals.MakeToPath);
foreach (FileInfo xFile in xFiles)
{
xOut.AddResource(xFile.Name, new Icon(xFile.FullName));
}
xOut.Close();
}



General.NET remoting Pin
Jefy Dominic2-Jul-05 6:17
Jefy Dominic2-Jul-05 6:17 
GeneralPlease explain .net compiling Pin
MALDATA1-Jul-05 13:09
MALDATA1-Jul-05 13:09 
GeneralRe: Please explain .net compiling Pin
toxcct1-Jul-05 22:27
toxcct1-Jul-05 22:27 
GeneralRe: Please explain .net compiling Pin
Robert Rohde2-Jul-05 7:51
Robert Rohde2-Jul-05 7:51 
GeneralRe: Please explain .net compiling Pin
MALDATA2-Jul-05 9:20
MALDATA2-Jul-05 9:20 
GeneralRe: Please explain .net compiling Pin
Colin Angus Mackay3-Jul-05 21:09
Colin Angus Mackay3-Jul-05 21:09 
GeneralRe: Please explain .net compiling Pin
MALDATA5-Jul-05 6:36
MALDATA5-Jul-05 6:36 
GeneralHelp to parse SOAP Pin
satishrg1-Jul-05 6:04
satishrg1-Jul-05 6:04 
GeneralRe: Help to parse SOAP Pin
Steve Maier1-Jul-05 8:46
professionalSteve Maier1-Jul-05 8:46 
GeneralEvent fired on killing an application fromTaskManager Pin
manivannan.p1-Jul-05 1:44
manivannan.p1-Jul-05 1:44 
GeneralAdding an ASP.NET client to an application using .net remoting on TCP. Pin
basbous30-Jun-05 3:08
basbous30-Jun-05 3:08 
GeneralConfiguring the remoting server from code instead of from a config file Pin
bobishkindaguy29-Jun-05 10:52
bobishkindaguy29-Jun-05 10:52 
QuestionModifying the "Local security settings" programmatically? Pin
François Gasnier29-Jun-05 9:00
François Gasnier29-Jun-05 9:00 
AnswerRe: Modifying the "Local security settings" programmatically? Pin
François Gasnier30-Jun-05 1:17
François Gasnier30-Jun-05 1:17 
QuestionError - proxy name could not be resolved? Pin
Anonymous29-Jun-05 2:03
Anonymous29-Jun-05 2:03 
Generalnamespace help Pin
arun_appu28-Jun-05 19:49
arun_appu28-Jun-05 19:49 
GeneralRe: namespace help Pin
Christian Graus28-Jun-05 20:02
protectorChristian Graus28-Jun-05 20:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.