|
Hi,
AFAIK there are two different icon issues:
1.
the application itself has an icon; it gets used by Windows Explorer; you set it as a project property.
2.
any form can have an icon; it is a Form property, that you can set through Visual Designer.
It also shows up in the task bar's button (if the Form shows in task bar).
BTW: if your Icon file holds more than one icon image (say at different sizes), which one
gets used depends on circumstances (e.g. small/large/detail view in Windows Explorer).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I still don't get how to show the icon.
|
|
|
|
|
"I want to make it appear in the form's corner"
that would be the Form.Icon property which you can set through Designer; there is no need
to add the icon file to the project explicitly, just open your Form Designer, choose
properties, and now hit the button at the right of the Icon property and choose.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I did it, for the last time. BUT, when the program starts, it's icon is NOT the one I chose.
|
|
|
|
|
Point is, it doesn't work (or I'm being stupid). Will anyone please help?
|
|
|
|
|
what program did you use to create the icon?
Code pre-built is code that you don't have to build later.
|
|
|
|
|
|
I mean, how did you make the icon? The icon may not be the right color bit or might be the wrong size, so therefore when you run your program, it chooses a different icon.
Code pre-built is code that you don't have to build later.
|
|
|
|
|
Oh; I added a new icon file, which is in the solution explorer. Then, I set it as the icon and it doesn't work.
|
|
|
|
|
|
I know. It says next to where you choose the icon, in a little picture, the icon I made, but when I start up, it's totally different.
|
|
|
|
|
What size icon did you create ? There's a number of sizes, it sounds like the app is choosing a different icon size, and thus reverting to the default icon.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Well, I beleive it is 32 X 32...
|
|
|
|
|
No, the icon on your form is 16x16. CTRL-PrtScn will do a screen capture of your app, then you can paste into paint to work out things like that.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Icons on the form (and detail / listview in explorer) are 16*16. Try making it that size and see if you have any luck.
Also incase your interested, windows uses these icon sizes:
16*16
32*32
48*48
Just so you know
|
|
|
|
|
How would I do that? SHouldn't it be simpler than this?
|
|
|
|
|
If anyone would leave a list on how to do it, I'd be greatly appreciative, and I'll check back in a bit, but now, I have a homework spree.
|
|
|
|
|
OK, the others got close but didn't give you the little baby steps.
Open your icon in VS (where you created it)
Use Ctrl-A Ctrl-C to select the image and copy it to the clipboard
Right-click near the image
The context menu has an entry for "Current Icon Image Types", click it
You should see entries for (at least) 16x16 and 32x32, click 16x16
This will show you the 16x16 version of the icon, I suspect you didn't add your image there (it's likely all white)
Ctrl-V to paste your image, it will be too big for the icon
Then drag the lower-right corner of the image up and left to shrink the image to 16x16
Save
That should do it
|
|
|
|
|
Thank you, but I can't tell if that was an insult... If it was, keep it to yourself. No need to be short.
|
|
|
|
|
It kinda was, but mostly not.
|
|
|
|
|
I am writing an installer class for a custom action...there are certain files contained in the same directory as the executable installer(ie the msi) that i need access to, however when you launch an msi it in return launches a program located here C:\WINDOWS\system32\msiexec.exe when you try to user the current directory .\\somefile.extension you end up getting an error saying it couldnt find the file at C:\WINDOWS\system32\somefile.extension...
The question is, does anyone know how to get the directory that the msi was launched from?
Any help at all would be great. Thanks everyone.
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
Normally, you don't. Everything you would normally need should be in the installer. Any custom actions will know the references to files inside the installer, where they are unpacked, and at which time custom actions are OK to run.
|
|
|
|
|
I'm working on a WCF application and I'm not clear on industry standards regarding the namespaces and URLs. I know that there are 4 places in the managed code to set the WSDL namespaces (ServiceBehavior, DataContract, ServiceContract and binding).
So say we have something like this:
namespace Widget.Services.Contracts.Foo
{
[ServiceContract(Namespace = "<servicecontract>", Name="FooInterface")]
public interface IFoo
{
[OperationContract]
List GetByFooId(foo2 foo);
}
[DataContract(Namespace="<datacontract>", Name="Foo")]
public class Foo
{
[DataMember]
int FooId;
[DataMember]
string FooDesc;
//some other fields
}
}
namespace Widget.Services.Foo
{
[ServiceBehavior(Namespace = "<servicebehavior>", Name="FooService")]
public interface FooService
{
List GetByFooId(Foo foo)
{
//do some work and return foo
}
}
}
<service behaviorconfiguration="FooBehavior" name="Widget.Services.Foo">
<endpoint address="" binding="wsHttpBinding" bindingconfiguration="wsHttpServiceBinding" name="FooService" contract="Widget.Services.Contracts.Foo.IFoo" bindingnamespace="<bindingNamespace>">
<host>
<baseaddresses>
<add baseaddress="http://localhost:8010/Widget/FooService">
1) Do all 4 places commonly get the same WSDL namespace? Or is there typically a mapping/translation of CLR namespaces to WSDL namespaces (because of how we have namespaced our classes)?
2) What are the industry standards/common practice for the namespaces? I know that people recommond adding year and month to the namespace for versioning, but does that mean the base address for the endpoint should have that info too? I've read http://www.pluralsight.com/blogs/kirillg/archive/2006/06/18/28380.aspx and while it's very useful, it doesn't describe what the ideal namespaces should be.
3) Would the namespace for the WSDLs (Because svcutil will generate a few WSDLs in this scenario) be the same as the URL for the WSDLs (which depends on the baseAddress)?
I guess, in general, my overall question is:
4) What would the common practice/industry standard dictate as the namespace for <bindingnamespace>, <contractnamespace>, <servicebehavior> and <servicecontract> in my example?
Any information about this would be much appreciated. Thanks!
|
|
|
|
|
Hello,
I was trying to change the registry key name programmatically in .net. How do I go about this?
Thanks
D
-- modified at 17:20 Wednesday 3rd October, 2007
|
|
|
|
|