|
I am interested in accessing and manipulating the position of the icons on the desktop. I am also interested in how to dock a window to the outside edge of the desktop. If anyone can help me on either of these topics it would be greatly appreciated.
Thanks...
|
|
|
|
|
Has anybody purchased Inside C# from Amazon UK recently. I want to get the second edition (already owning the first), but the one on Amazon seems to still be the first edition.
I'm assuming this is a web-site c**k-up but don't want to risk buying something I already have.
Michael
Look, try and use your intelligence, man, even if you are a politician. - The Doctor
|
|
|
|
|
Well, I just checked Amazon.com and it ships the 2nd edition... Do you have to go through Amazon UK or can you grab it from Amazon.com?
|
|
|
|
|
They will create a new record for the 2nd ed, and they may be holding on to it until stocks of the first sell out.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
If anyone has a very good C# book to recomment, please let me know. I don't want something that takes me by the hand (altough OOP principles and the philosophy behind Windows\Web Services programming would be nice...). I know my way around although I've never really touched C++ before (mainly Javascript, Perl, ASP and PHP).
Also, are C# and VC++ really different? If yes, I guess I'd like suggestions on good VC++ books too! Is there a big difference between the VC++ for Visual Studio 6 and Visual Studio .NET? Thanks!
|
|
|
|
|
Inside C# by Tom Archer is a very good book. I have the first edition but the second edition is supposed to be better.
Visual C++.NET Step-by-Step is also a good book for learning how to program .NET under C++.
Michael
Look, try and use your intelligence, man, even if you are a politician. - The Doctor
|
|
|
|
|
If you haven't done much .NET before, I think you want a frameworks and language book. Troelson (Apress) and Liberty (O'Reilly) are pretty good choices here.
If you want a C# language book, I like my own book (Gunnerson (Apress))
If you want a VC.NET book, Challa and Laksberg (Apress) is the only one I know of, but there might be more now. VC.NET is pretty complex, however.
And yes, C# and VC++ are quite a bit different. They're both curly-brace languages, but C# is considerably less complex.
|
|
|
|
|
Thanks for the suggestions! I'd like to check out the first two books you mention (Troelson's and Liberty's) but was wondering if they're compliant with the final releases of the Visual Studio .NET? Archer's Inside C# is sais to be compatible with .NET beta 2. Is this the same thing with the two other books or are they up to speed? Thanks again!
|
|
|
|
|
merlin9876 wrote:
Archer's Inside C# is sais to be compatible with .NET beta 2.
If you can get your hands on the 2nd Edition of Inside C# it is updated for the final release. In addition to that the page count has doubled with lots of new content (or just about doubled; I don't have the exact numbers in front of me).
I'll recommend the second edition of Inside C# to anyone who wants to learn C#; but I haven't read Eric's, Jessie's, nor Andrew's books so I can't form any comparison between them. I can only offer that Tom's book cleared up a few things for me while I was reading his book, AFTER I had read Wrox's Programming C# with the Public Beta.
I've even learned something new from the second edition as well; so it's well worth the investment.
And just as any reputable news organization will do; I will let you know that I'm currently working with Tom on a new project.
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
The changes between beta2 and RTM were really pretty tiny. An updated book is better - because it will contain lots of small fixes - but I don't think the delta will be much of an issue.
I think that Liberty has an updated version out. I'm not sure about Troelson.
|
|
|
|
|
Hi all
I get this msg when trying to compile:
Operator '*' cannot be applied to operands of type 'decimal' and 'double'.
Surely this cant be right.
OK, downcasting decimal to double works fine though.
READ MSDN
|
|
|
|
|
Arithmetic operations are always defined on similar types:
double + double
decimal + decimal
int + int
In some cases, there will be an implicit conversion that allows something like:
short i = 5;
int j = 55 + i;
to succeed, by automatically converting i to an int.
With double and decimal, there are no such implicit conversions. Decimal carries more significant digits than double, and double has more range, so you can't convert from one to the other without possible data loss.
That's why you're getting the error.
|
|
|
|
|
Many thanx, sometimes one just need a good explanation
READ MSDN
|
|
|
|
|
Hi all
I was just wondering if there are any other sites available similar to SourceForge and Freshmeat where you can host and find C# applications? Correct me if I am wrong, but I find codeproject is really restricted to code snippets and libraries.
Cheers
READ MSDN
|
|
|
|
|
Not sure of the kind of stuff you are looking for, but have you tried http://www.gotdotnet.com/
Michael
Look, try and use your intelligence, man, even if you are a politician. - The Doctor
|
|
|
|
|
I am interested in creating an application that is similar to a windows start bar which docks to the top of the desktop instead of the bottom. It is unclear to me how I would go about building such an application. I need it to interact with the icons on the desktop such that it just doesn't cover them over but moves the icons appropriately down to make way for the window that is docking to the top. Just as when you are resizing the windows start bar on the bottom the icons are rearranged to make room for the larger start bar.
If anyone could point me in the right direction as to what I am trying to do is called or give me a few hints. It would be greatly appreciated.
Thanks
|
|
|
|
|
|
After creating a new class that inherits the System.Windows.Forms.TextBox, in the new class I would like to set value of the default Name (other defaults as well) for the TextBox when a new instance is created by dragging the control from the Toolbox and dropping it on a Form. Any idea how to do this?
Kyle
|
|
|
|
|
simple override the constructor to set the values.
if you want it to play nice with the property browser ( making it look there hasn't been a change ), then either override the property declaration with a new DefaultValue attribute for simple types, or for complex types, override or create a new version of each ShouldSerialize<propertyname> method, and return false if it equals your value.
|
|
|
|
|
Andy,
Thank you very much for your help. Yes I do want to play nice with the property browser. Setting the value of properties in the constructor means they are now fixed at that value regardless of changes made in the property browser. I am looking to maintain normal design time behaviour. I just want to override the default name that appears when a control is dropped on a form. I tried to override the property declaration with this code:
private string name = "";
[DefaultValue("tbx")]
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
but got this warning:
c:\documents and settings\kyle\my documents\visual studio projects\numericonlytextbox\numericonlytextbox.cs(49,17): warning CS0108: The keyword new is required on 'CustomControl.NumericOnlyTextBox.Name' because it hides inherited member 'System.Windows.Forms.Control.Name'
and it did not set the Name value to the default "tbx".
I am also very intrigued by the ShouldSerialize method. Do you have any short segments of code you would share that could help me to better understand overriding the inherited property and SouldSerialize method?
Thanks again,
Kyle
|
|
|
|
|
kyledunn wrote:
Setting the value of properties in the constructor means they are now fixed at that value regardless of changes made in the property browser.
This is false. Setting values in the constructor will not do that. you need to set the value.
kyledunn wrote:
and it did not set the Name value to the default "tbx".
it didn't change it, because you never set it. the DefaultValue attribute is only for the IDE to know when it's been changed. It doesn't actually set the value. You have to set it yourself in the constructor.
kyledunn wrote:
but got this warning:
that warning is because you need to explicitly say whether it is an "override" or a "new". In this case, since the "Name" property is not virtual, you can only use "new".
All that said, it is a REALLY BAD IDEA to try to override the Name property. Controls do magic things with the name property to make sure they are unique. Making them all "tbx" would be a BAD THING.
|
|
|
|
|
Hi Andy,
I set the value of this.Width to equal 300 in the constructor for the custom textbox control and then changed it to 100 in the property browser. Upon running the form the textbox reverted to a width of 300 which led me to the false statement above. I just tried setting the value to any other number than it's original default and it worked as you described. The original default number was influencing the behavior I was describing.
Thanks for the explanation about the DefaultValue. That makes sense.
I agree it's a bad idea to change the default name. I was interested in changing the default, not necessarily getting rid of the sequential number, but it was a bad example to choose.
Thanks for your help.
Kyle
|
|
|
|
|
In moving over my code, I'm now to the MFC Wizards that we created.
We used to create a property page/sheet and call SetWizardMode to activate them, but alas, that feature is no longer in .NET
So, what is our replacement feature/procedure for this? I created a form, threw in a tab control, but could not find a way to hide the tabs.
Any thoughts?!
|
|
|
|
|
|
I read that one in my research and it really didn't tell me anything. Just a kludge work around.
But talking about kludges... I hid the tab controls under a panel and life is nice again. Kludgie, but nice.
I know there is a Wizard component available, but I really don't want to spend $160 just to hide a tab.
|
|
|
|