|
Ok, I have to admit that I am stuck here.
My apps form has an icon set for it but I am tired of the compiled exe file not showing that Icon when I view the file in Windows explorer.
The problem is I can't seem to find anything that is really cut and dry on this. I see some stuff that seems to say you can't do it with the IDE and need to use the command line compiler but I have a hard time believe that...
Any takers out there?
I can't believe I am stuck on something so trivial...
|
|
|
|
|
Open the properties pages for the project and take a look under the Application tab (assuming you're using 2005), there should be an Application Icon property.
If you're using 2003 it's a similar thing in the Properties pages for the project.
|
|
|
|
|
Oh man I can't believe I looked right at that and missed it.
Thanks.
|
|
|
|
|
|
I have a program which run fine on my computer and on some client computer.
However, recently, it started to crash at launch time with a mysterious error as in the title.
After a bit of investigation it is probably a missing native DLL dependency in a Managed C++ library.
Investigating a bit more with depends I think the culprit is the following:
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.163_x-ww_681e29fb\msvcm80.dll
On my computer I have 2 versions of it:
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.163_x-ww_681e29fb\msvcm80.dll
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd\msvcm80.dll
But on the target computer I have only one version:
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd\msvcm80.dll
And "depends.exe" tells me that my ManagedC++ library is using the other version:
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.163_x-ww_681e29fb\msvcm80.dll
Although both version are quite old (06/2006 & 09/2006) (i.e. it's probably not a recent windows update) I think this is the problem.
Now why is the linker is linking to the newer version?
How can I link to the older version?
Any tips?
|
|
|
|
|
Welcome to the world of Win32 side-by-side assemblies.
The version of the assembly that you're going to use is specified in your manifest resources, which are generated from a manifest file. This is generated by Visual Studio and you should find a copy in your 'intermediate files' directory. For some reason, the version number that the manifest specifies is significantly older than the actual RTM version (8.0.50727.42).
When loading through a manifest, on systems which support Win32 side-by-side assemblies (XP, 2003 and later), the publisher can specify that a newer version is to be loaded. They do this by placing a policy file in %SystemRoot%\WinSxS\Policies, under the appropriate folder for the assembly. In the .policy file, they list how the bindings should be redirected. I have an 8.0.50727.163.policy file which says to redirect to 8.0.50727.163.
I also have assembly version 8.0.50727.91 - I'm not sure where this came from, it doesn't have a corresponding policy file. I think version 163 came with .NET 2.0 SP1. Visual Studio 2005 SP1 has yet another new version of the runtimes, but I'm not sure of the version number.
Win32 side-by-side assemblies are pretty complicated and you should ensure that you install the CRT through one of the supported methods: the vcredist_x86.exe file, or the CRT merge module (MSM). If you use the CRT merge module you must also use the corresponding policy merge module, or it will fail to load any version due to the manifest in the application asking for an older version than is on the system. That is, you should merge in both Microsoft_VC80_CRT_x86.msm and policy_8_0_Microsoft_VC80_CRT_x86.msm .
|
|
|
|
|
Thanks for this interesting food for thoughts!
I will look into that monday...
|
|
|
|
|
Dear Friends,
Could you please help me in this regard. What I need is this,
1. I want a .net User Interface to display office files(word, excel etc.).
So that I can put it in my web page to display office files. Similar to
DSO Framer control, but DSO Framer control is an activeX control made by using un-managed code.
But I need a similar UI, made by using .Net Framework. Doesnt itlook good. Could you please help me in this regard.
Thank you.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
You know, it's hard to understand why you ask the same question over and over, especially when the last time you asked it is still visible.
I suggest you either write what you need, or tell your client that it doesn't exist. If it does, it costs money and people are trying to sell it. So, they want to find you, and if you can't find it with google, it probably doesn't exist.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Mr. Christian,
It is truely needed thing for me. May be its not imposiible. In one or the other I may get it. Thats why I am putting my query. And one more thing it would be really flexible and reliable to have such kind of control. Because .Net has features than any previous micro soft products.
Mr. Christian please try your level to help me for "Gods" sake. Because I am not comminting person in the view of user friendliness to clients. In some cases I will be ready to make it my self. Please try to help me please. Thank you.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
indian143 wrote: It is truely needed thing for me.
I needed a .NET wrapper for the Canon camera SDK. Instead of asking people to write me one, over and over, I wrote it myself, having established that none existed. That's how life works.
indian143 wrote: And one more thing it would be really flexible and reliable to have such kind of control. Because .Net has features than any previous micro soft products.
First of all, I'm sure it would be. Second, you're wrong. .NET can't do a single thing that can't be done in C++, how could it ? All it does is make it easier to write particular types of apps, compared to C++.
indian143 wrote: Mr. Christian please try your level to help me for "Gods" sake.
I'm not sure what sort of help you're after. Do you think I can write what you want in a matter of seconds ? So that it's 'flexible and reliable' ?
indian143 wrote: In some cases I will be ready to make it my self.
Well, I'd say that's what you need to do. I've already pointed out that for newer versions of Office, a .NET API exists, that seems like a good starting point. I'm still unconvinced that it will result in a component that's any easier to install from a client point of view than a C++ ActiveX control, but I Could be wrong.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
You either have to use DSO Framer or you will have to go with a third party product like ASPOSE.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Yes, I tried with Aspose, it was excellent. I prepared 90% of the requirement. Then they said no we dont want this sort of thing. The only problem with Aspose, which they dont like is it doesnt have UI. Thats the only problem.
About the other things which you replied, I too believe in them. But still we shouldnt be so over confident like "Heitler". Ok, in any way one day or the other I may sit to start it on my own. Still as a human being I am asking you, you are most welcome to send the answer for my query always. And this is request too. Ok. Take care. Bye
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
a little stumped with a regex i've been working on...
trying to parse name/value pairs from a string - I have something close, but it chokes on certain cases.
(?# PROPERTY )(?<property>[a-zA-Z0-9_]*)\x20*?(?# OPERATOR )(?<operator>>=|<=|<|>|=|!=|LIKE)(?# Value )\x20*?'?\w+'?
// any property name of any length, captured into backreference 'Property'
(?<property>[a-zA-Z0-9_]*)
// whitespace, 0+, minimal matching
\x20*?
//any of the operators >=, <=, <, >, =, !=, LIKE captured into backreference 'Operator'
(?<operator>>=|<=|<|>|=|!=|LIKE)
// whitespace, 0+, minimal matching
\x20*?
// single quote, 0-1
// followed by word character, 1+
// followed by single quote, 0-1
'?\w+'?
I am looking to match (and extract) name/operator/value pairs from a string, such as...
PropertyName='SomeValue' AND IntProperty < 9 OR AnotherProperty LIKE 'this is a test'
the regex i have above works fine for the first two terms, but then when you get a quoted string, it only matches up to the first space... This is only ever going to be an issue with the quoted strings, anything else will assume a word boundary on whitespace, which is the desired behavour.
I need that last part of the Regex to basically say "if we're enclosed in single quotes, get anything between the opening and closing quote; otherwise, match everything up to whitespace"
any help is much appreciated. (or if anything spots any weak spots in the Regex i have so far..)
thanks -
|
|
|
|
|
You will need to test for quotes and assign the substring a name. Do this at the first place in your expression where the quotes can occur. This will test for optional single or double quotes:
(?<ql>[""']?) -- *The double-quote is repeated as shown if it exists in a VB string.
You must then use conditional matching to test whether <ql> has been assigned. The syntax for the conditional match is:
(?<name or expression>yes|no) -- The |no portion is optional.
So,
(?<ql>\k<ql>)
Will test whether <ql> was previously assigned, and if so it will match it again. Otherwise, it does nothing.
Hope that helps.
|
|
|
|
|
Keith -
I was headed in that direction, but couldn't quite get it.. Thanks for the help on it.
What you have helped with has given me..
(?<Property>[a-zA-Z0-9_]*)
\x20*?
(?<Operator>>=|<=|<|>|=|!=|LIKE)
\x20*?
(?<quote>[""']?)\w+?\k<quote>
\x20*?
which matches the following
PropertyName = 'Blah' AND PropertyTwo >= 9 OR PropertyThree = "asdf" OR AnotherProperty >= 'thisis atest'
perfectly up until the last part...
AnotherProperty='thisis atest'
the \w+? will stop at the space in between 'is' and 'atest', which is where i am stuck now. using .*, or something similar captures too much... I am inclined to believe that using a negated character class [^""'] is the way to go, but am not positive how to do that; the things I have been trying wind up matching too much. Any ideas?
Thanks -
-- modified at 9:21 Friday 5th January, 2007
|
|
|
|
|
Try replacing the \w+?\k<quote> with:
.+\k<quote>
This will match everything between the quotes.
The \w is matching any word character, so it's not matching the spaces. The period will match anything, and since we want to get everything between the quotes, we use the + to denote one or more matches.
Hope that helps.
|
|
|
|
|
You really have a grammar there, not just a regular expression. I'd recommend using something like ANTLR[^] to parse your expressions. It's a lot less of a headache than trying to do a single RE that does the whole job.
|
|
|
|
|
Hi,
Is there a property i can set on a treeview node that stops it being selected?
I've got a tree where i only want the leaves of the tree to be selectable and the rest of the tree to just be for navigating to those leaves. I'm currently setting the cancel property of the treeviewcancelevent object to true in the beforeselect event but it seems to behave a bit erratically on occasion.
any help / pointers to articles or properties i've just not seen would be much appreciated.
Thanks
Russell
|
|
|
|
|
I am trying to print out a basic report using the PrintDocument and have a few fields that are going to have to wrap.
My I know that I can define a style and print the text to the graphics object using the DrawString method and a defined rectangle but how am I supposed to know how big to define the rectangle in the first place?
I have found several tutorials on the web about this but they all seem bent on just showing you how the wrapping and trimming of the string works, not how to ensure that you can print a full string with wrapping in a rectangle.
|
|
|
|
|
Graphics.MeasureString() calculates the size that DrawString() would like to use.
The overloads without SizeF argument assume no word wrapping is going to happen
so what they return almost equals
new SizeF(string length*average char width, font height).
The overloads with SizeF argument allow you to specify a maximum width (and a real
or fictious max height) and also return the effective size, but now performing
word wrapping as is required to stay within the specified width.
So the trick is to give MeasureString() the SizeF that corresponds to the maximum
Rectangle you are willing to give DrawString().
Luc Pattyn
|
|
|
|
|
Darn... what I was looking for was a function that, given the font, text and allowed width would tell me the largest rect height I would need to hold all the text.
I got around it by working up on level a bit and defining a rect for the entire page so any text I would put in there will wrap. I know that all my text total will never be longer than one page can handle so as long as it all wraps to the next line I am ok there.
Thanks.
|
|
|
|
|
Hello,
I am using the final release of .NET 3.0 to create a WPF application containing several Expander controls.
These expanders are customized by a central style:
<Style TargetType="Expander">
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="White" Offset="0.0"/>
<GradientStop Color="DarkGray" Offset="1.0"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
As reaction to the MouseEnter event I am trying to animate the background color inside the expander markup:
<Expander Name="accountExpander" [...]>
<Expander.Triggers>
<EventTrigger RoutedEvent="Expander.MouseEnter">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX" From="1.0" To="1.2" Duration="0 .1"/>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" From="1.0" To="1.2" Duration="0 .1"/>
<ColorAnimation Storyboard.TargetProperty="Background.GradientStop[1].Color" From="DarkGray" To="SteelBlue" Duration="0 .1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Expander.Triggers>
</Expander>
Without the ColorAnimation the code is working perfectly, the problem seems to be property path for the Storyboard.TargetProperty. Before I switched to using central styles for the expanders I simply labeled the second gradientstop, which color I wanted to change, with the x:Name property. But as I declare the gradient stop inside a Style this is no longer possible. So i tried to use the longer property path syntax. According to the documentation it should be possible to access specific properties in an array-like fashion but the above code does not work for me.
Any ideas how I can animate the style-set property in my storyboard?
Thanks in advance
FalkoD
PS:
Somehow the board software seems to dislike XAML in its <code> tag so I hat to disable formating sorry for the ugly layout.
|
|
|
|
|
Hi everyone,
I have a textbox on a form with a Validating event handler attached. The textbox is bound to a data source. The code for the event handler is given below. Basically, the amount entered in the text field should not exceed the amount in the balance field. If this happens, error provider is set and Validating event is cancelled, giving the user the opportunity to correct the amount.
On the UI side e'thing is working fine, however I noticed that the data source is updated regardless, even if e.Cancel is set to true. That is a problem because the data source should never be set to an invalid value as it is taken as input for other calculations.
I expected that the data source would not be updated if e.Cancel is set to 'true'. Am I missing something?
Thanks,
Roel
private void textBoxCash_Validating(object sender, CancelEventArgs e)
{
if (Convert.ToDouble(textBoxCash.Text) > this.balance)
{
errorProvider.SetError(textBoxGenerateCash, "Cash exceeds balance");
e.Cancel = true;
}
else
{
errorProvider.SetError(textBoxCash, null);
}
}
|
|
|
|
|
I just want to know wich one is better for learning and better in 3D perfomance?
OpenGL or Direct3D?
and please introduce some refrences for each one
-- modified at 4:58 Thursday 4th January, 2007
|
|
|
|