|
Different softwares have different icons for their executables. Like Windows Media Player, Zoom Player, Winamp, Comodo Firewall. I also want to give my project exes a unique icon. So what is the best size of the image/icon to be used for this purpose.
I think it is 128x128.
What do you say?
Thanks
Sukhjinder
Looking for help on my OpenSource Media Player LetsYo
|
|
|
|
|
Actually I would have several sizes. You can only have one icon file (.ico) but that file can have images of different sizes. At least I would have:
16x16 - for Explorer list or Start Menu)
32x32 - regular icon
48x48 - big Vista icons (default size for desktop)
64x64 is used also sometimes in Vista, but I am not sure it is as common.
|
|
|
|
|
Microsoft recommend (and i agree):
Icons in the size of 16, 32, and 48. Each with 16 and 32 bit versions, that way in almost any situation people will see the icon as its meant to be, rather than squashed or stretched, or perhaps with the wrong palette. You could also have 64*64, but i don't think you'd need to go so large as 128*128
My current favourite word is: Nipple!
-SK Genius
|
|
|
|
|
Thanks for the help guys...
Looking for help on my OpenSource Media Player LetsYo
|
|
|
|
|
You must have seen the executables of some popular programs, like Winamp and Windows Media Player, having different Icons for them. Some of them have multiple Icons. So you can have 16x16 for in the start menu, 24x24 for small icons and 128x128 for people with big icons.
Check wmplayer.exe of WMP11 with IrfanView, it has 18 icons of sizes 16x16, 32x32 and 48x48.
My question is how to assign these multiple icons to a single executable
Thanks
Sukhjinder
|
|
|
|
|
As I said in my post above, you must use an icon editor to add all images to the same .ico file. With .NET, you can only assign one .ico file to your executable.
|
|
|
|
|
Thanks for the info...
Looking for help on my OpenSource Media Player LetsYo
|
|
|
|
|
You're welcome, I am glad I could help
|
|
|
|
|
Nice Car, Nice Color and Great Wheels.
All The Best...
Looking for help on my OpenSource Media Player LetsYo
|
|
|
|
|
I'm making a Mdi application, but got some problems.
One of them is to catch mouse events like "MouseClick" or "MouseMove" on Mdi parent form.
I made event handlers for those events of Mdi parent form, but they didn't work!
Is it because Mdi parent form is a container?
How can I solve this problem?
|
|
|
|
|
DoubleB,
Show some code.
Regards,
Gareth.
|
|
|
|
|
There's no special code.
I set the event handler for Mdi parent form. The event handler just shows a message box.
I just wanted to know that the mouse events can be caught on Mdi parent form, but it couldn't.
In contrast, the same thing I did to the Mdi parent form worked on child forms.
Thanks.
|
|
|
|
|
Your MDI parent form has a special window (called MDI client) that occupies all its client area, and MDI children are created inside this MDI client window. So, probably the MDI client window is getting the events and not your MDI parent.
You can get access to the MDI client window. See this article[^] for some help.
I hope this helps!
|
|
|
|
|
Hi,
I've got a web service written in C# and I'd like to provide a server-side GUI (for example: dynamic log etc.). Since Visual Studio doesn't allow (does it?) adding Windows Form to a web service application (which even makes some sense to me ) and I don't want to use ASP.NET nor AJAX... I've created a standalone windows forms application (as separate project) and added its reference to my web service.
To simplify: I've got
[WebMethod]<br />
void connect()
, which connects to my web service and... runs
<br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
Application.Run(new myForm());<br /> in a separate thread.
Now calling web methods also updates my form (using Invoke() to avoid cross-thread updates)...
What is interesting... this approach really works - that is: calling connect() shows my GUI and so on. Well... it works, but only when if I'm using ASP.NET Development Server (that is - while debugging the whole thing in Visual Studio '08). Running the same project on IIS server does not show the form (the form itself is created, because I can access controls on it). Is there a way to make this form visible also on IIS? (form.Show() does not seem to work, I've also tried numerous IIS server configurations with no luck).
Second thing - now the form is launched by calling specific web service... Is it possible to attach to an already running (started by user) form in a simple way? (without providing a COM interface to my form... or sth more "managed" - how to create such iface automatically in VStudio). A separate GUI application with interface allowing updating its controls will automatically solve above problem, since I will no longer need IIS to start the form for me.
Regards,
MB
|
|
|
|
|
I don't recommend what you are trying to do because it won't scale when you have many connections from different clients at the same time. The web is supposed to be stateless, so one call is processed, returns and that's it. In this case you are keeping resources on hold.
About why it works with VS Development Server and not with IIS, is that VS web server runs on the same Windows user. IIS runs as a service with a different user, and has no desktop (or a hidden one). So the form is created, but on a different desktop than the one you are seeing as a logged user.
The idea you state in the last paragraph is much better. I have never done it, but I am sure it isn't hard. Google or search CP for interprocess communication and you should get something.
|
|
|
|
|
Thank you for your reply,
Luis Alonso Ramos wrote: it won't scale when you have many connections from different clients at the same time
Hmm... I don't see why wouldn't this be scalable. The only resource that I hold is 1 Form per 1 endpoint (which can serve multiple clients)... Although clients trying to update the same form may degrade performance somehow (mutexes etc.), I don't think that this will be noticeable. Why do you think, that my WS with GUI will be much slower/less scalable than a WS without it?
Despite all this... in my scenario there'll be multiple ExternalEngines and one MainEngine. My GUI is attached to ExternalEngine, so it'll only have to serve 1 connection at a time - scalability is not an issue.
Luis Alonso Ramos wrote: The idea you state in the last paragraph is much better.
What I didn't mention is: this GUI is for debugging purposes only. That's why I don't look forward to writing something complex (I thought that adding a Windows Form will simplify the whole thing).
If, based on what you said about IIS, there's no way to display my form... so be it, I'll try to stick with VS Dev Server for now. Or is there a 'magic' IIS configuration, that allows interacting with host display?
Regards,
MB
|
|
|
|
|
If your form is created when each client calls connect, and stays there while your client makes more calls, potentially you can have many open forms from different clients at the same time. Also if somehow you lose the form reference (because it is stored in session state and the session times out), you might end up with several forms for one client.
What I would do is write another program that creates a form and stays there listening for all client connections. You can use remoting in your webservice (it's simple), so if the listener program is running, it will display all debugging info, but otherwise the webservice just ignores the call. This way you can even use the listener app from a different computer than the server itself.
matmus wrote: Or is there a 'magic' IIS configuration, that allows interacting with host display?
Not that I know of. IIS runs as a Windows service, and services are designed to run unattended.
|
|
|
|
|
Hi,
The thing is that the DataGridView is Bound to a DataTable in a DataSet and
in the DataTable i can use the Select Method with params
But How Can I Reflect The Select in The DataGridView
The Select Method Returns DataRow [].
THANKS IN ADVANCE
Have Fun
Never forget it
|
|
|
|
|
Are you trying to filter records ?
kss
|
|
|
|
|
Yeh,
I Figured It Out
But THANKS for Responding
Have Fun
Never forget it
|
|
|
|
|
|
Is it homework?
What are you asking for exactly?
|
|
|
|
|
this is not a homework else i would not be posted here
i know the fourms rules and regulations
i want a form which has the uttons and when a user clicks on those buttons the events are triggered
|
|
|
|
|
Have a read of this thread.
|
|
|
|
|
I'm trying to capture the event where the user selects, say, Shift + 8 (hence * should be captured as a key).
The problem seems to be that the value for the '8' key ("D8") is retained whilst the value for the Shift keys ("LShiftKey" and "RShiftKey") are overwritten with the value "D8".
Would it be possible to use NativeMethods or System.Windows.Forms.Keys within this context?
E.g.
<pre>
if ((NativeMethods.GetKeyState(VK_SHIFT) & 0x8000) != 0)
{
//SHIFT is pressed
sb.AppendLine("Shift is pressed.");
}
</pre>
I'm currently assuming a UK keyboard.
Any more ideas on how to go about it please?
<pre>
private void keyPressed_KeyIntercepted(ref KeyboardHook.KeyboardHookEventArgs e)
{
keyAndModifier[0] = e.KeyName; // D8
if (keyAndModifier[0] == null) // null value
{
keyAndModifier[1] = e.KeyName; //somehow needs to be set to "LShiftKey" or "RShiftKey", so that the code works
}
else
{
// do nothing
}
switch (e.KeyName)
{ //...
case "D8":
{
if (keyAndModifier[1] == "LShiftKey" || keyAndModifier[1]== "RShiftKey")
//does NOT work because code never reads the Shift keys
{
btnMultiply.PerformClick();
break;
}
else
{
btnEight.PerformClick();
break;
}
}
//...
}
</pre>
Jon
|
|
|
|