473,770 Members | 6,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Large app, many icons how to manage

We are migrating a large app to .net. There are many forms and there will
be many, many icons.

What are some suggested techniques for more or less sharing imagelists (easy
enough), BUT without giving up the design time experience.

jeff
Oct 12 '07 #1
3 1707
On Oct 12, 10:47 pm, "Jeff Jarrell" <jjarrel_NOS... @yahoo.comwrote :
We are migrating a large app to .net. There are many forms and there will
be many, many icons.

What are some suggested techniques for more or less sharing imagelists (easy
enough), BUT without giving up the design time experience.

jeff
I don't know how large is your app, and I don't know how many icons
you are using. But with my current project, I compile more than 1400
jpeg icons at size 32*32 into a dll as resources, and splite them into
two ImageList (identify each by its file name), and the result is
nearly perfect, although it's a little slower (1-3 seconds than not
using icons) at creating the ImageList instance for the first time.
So I guess maybe this works for you.

Oct 12 '07 #2
Sounds interesting. This seems like a fair comparison in terms of size.

Let me get clear on the workflow. Add a resource file the project, then add
images to the resource file. Then how does it get assembled into the
imagelist? And do you still have design time support? You have an article
you could point me to for the technique.

Thanks,

jeff

"deerchao" <de******@gmail .comwrote in message
news:11******** **************@ v23g2000prn.goo glegroups.com.. .
On Oct 12, 10:47 pm, "Jeff Jarrell" <jjarrel_NOS... @yahoo.comwrote :
>We are migrating a large app to .net. There are many forms and there
will
be many, many icons.

What are some suggested techniques for more or less sharing imagelists
(easy
enough), BUT without giving up the design time experience.

jeff

I don't know how large is your app, and I don't know how many icons
you are using. But with my current project, I compile more than 1400
jpeg icons at size 32*32 into a dll as resources, and splite them into
two ImageList (identify each by its file name), and the result is
nearly perfect, although it's a little slower (1-3 seconds than not
using icons) at creating the ImageList instance for the first time.
So I guess maybe this works for you.

Oct 12 '07 #3
On Oct 13, 3:55 am, "Jeff Jarrell" <jjarrel_NOS... @yahoo.comwrote :
Sounds interesting. This seems like a fair comparison in terms of size.

Let me get clear on the workflow. Add a resource file the project, then add
images to the resource file. Then how does it get assembled into the
imagelist? And do you still have design time support? You have an article
you could point me to for the technique.

Thanks,

jeff

"deerchao" <deerc...@gmail .comwrote in message

news:11******** **************@ v23g2000prn.goo glegroups.com.. .
On Oct 12, 10:47 pm, "Jeff Jarrell" <jjarrel_NOS... @yahoo.comwrote :
We are migrating a large app to .net. There are many forms and there
will
be many, many icons.
What are some suggested techniques for more or less sharing imagelists
(easy
enough), BUT without giving up the design time experience.
jeff
I don't know how large is your app, and I don't know how many icons
you are using. But with my current project, I compile more than 1400
jpeg icons at size 32*32 into a dll as resources, and splite them into
two ImageList (identify each by its file name), and the result is
nearly perfect, although it's a little slower (1-3 seconds than not
using icons) at creating the ImageList instance for the first time.
So I guess maybe this works for you.
I don't use resource files, it's a little harder to get along with. I
just create a new library project, and add these 1400+ files into it,
then set their "Build Action" to "Embedded Resource". And I created a
class IconsManager in this project too. Here is some code from this
class:

private static ImageList meleeImageList;
static ImageList MeleeImageList
{
get
{
if (meleeImageList == null)
{
meleeImageList = new ImageList();
Assembly asmb =
Assembly.GetAss embly(typeof(Ic onsManager));
string[] resources =
asmb.GetManifes tResourceNames( );
foreach (string resource in resources)
{
if
(resource.Start sWith("Deerchao .War3Share.Clie nt.Icons.Melee. "))
{
using (Stream stream =
asmb.GetManifes tResourceStream (resource))
{
Bitmap bmp = Bitmap.FromStre am(stream)
as Bitmap;
meleeImageList. Images.Add(reso urce,
bmp);
}
}
}
}
return meleeImageList;
}
}

public static ImageList GetImageList()
{
return MeleeImageList;
}

public static string GetImageKey(str ing itemName)
{
return
string.Format(" Deerchao.War3Sh are.Client.Icon s.Melee.{0}.jpg ",
itemName);
}

As for design time support, sorry, there isn't any. To asign an icon
to a control, I have to use code, so I can see these icons only at run
time. This is what I do:

protected override OnLoad(...)
{
listView1.Small ImageList=Icons Manager.GetImag eList();
}

ListViewItem item=...;
item.ImageKey=I consManager.Get ImageKey("xxxx" );

Hope this helps.

Oct 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
6401
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but something I'll need in this case is some experience-based set of rules about how to use python in this context. For example... is defining readonly attributes in classes worth the hassle ? Does duck-typing scale well in complex
3
2722
by: DOK | last post by:
I'm creating an ad for eBay and want to keep the page condensed. I have 6 images - different views of an antique lap steel guitar - that need to show superb detail. I have cropped the images to take up a full webpage width. However, I don't want to put all six images on the page. I thought I could use icons as the trigger for displaying the images one by one. I cropped the six images down to small (but identifiable) icons. Is there...
4
1174
by: HankD | last post by:
I have been given the task to upgrade the company's website. It is large and unorganized right now. There should be a main common area with subareas for each division (5). My main question is what is the best way to manage this in visual studio? Should I create one solution and then 6 projects under it (1 for the main company content and then 1 for each division content) or should I split it up? If I do split it up how do I reference...
1
1426
by: Richard | last post by:
If I'm to make a Listview with a list of files, then how can i get the associated icon to match the file?? Meaning I need the Windows Explorer icons to be the same as in my listview. I can manage everything except getting the icons need help Richard
0
1293
by: ljlevend | last post by:
I want to set the client size of a ListView control so that it is just wide enough to contain 2 columns of large icons plus enough space for the vertical scrollbar. I know that Windows.Forms.SystemInformation.VerticalScrollBarWidth tells me how much space I need to include for the scrollbar, but is there any way to determine how much space is requried for the two columns of large icons? Thanks, Lance
0
1274
by: uv507 | last post by:
Hello, I have found a way to easily reorder rows of my listview. But it only works in small icons mode. When I do my reordering (drag and drop in my own list) in large icons mode, the item that I wanted reorder is automatically send to the end of the listview... :(( Has someone got the same problem ??? Thanks in advance for your help
3
2187
by: Dan Munk | last post by:
Hello, I am working on a very large multi-tier Web application. The application consists of approximately 100 middle-tier/back-end projects and 200-300 presentation projects. Obviously this is too large to manage in a single solution. The development staff have each developed ways to work within such a behemoth structure, but we have not been able to come up with a standard for project-to-solution organization and how to manage...
20
4285
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site is structured as an upside-down tree, and (if I remember correctly) never more than 4 levels. The site basically grew (like the creeping black blob) ... all the pages were created in Notepad over the last
1
1822
by: Nilam2477 | last post by:
I need to use SHGetFileInfo to display large icons.For small icon display it works fine. If i change the parameter to display large icon it does not display the file with large icon, it always displays small icon. hImgSmall = Win32.SHGetFileInfo(fName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), Win32.SHGFI_ICON | Win32.SHGFI_SMALLICON); hImgLarge = Win32.SHGetFileInfo(fName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), Win32.SHGFI_ICON |...
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10231
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10005
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9871
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8887
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7416
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6679
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.