|
For some reason I cannot override EndInit() or Count in DataView. Not quite sure why, Anakrino shows them as public virtuals but VS.NET 2002 errors out saying they are not marked virtual, abstract or override.
Is there something I am just over looking?
Rocky Moore <><
|
|
|
|
|
Rocky Moore wrote:
Not quite sure why, Anakrino shows them as public virtuals
You should know better than to trust a decompiler for info like that!
EndInit() is from the ISupportInitialize and that is NOT marked virtual, and Count is never virtual. Anakrino obviously lies to u! Use the object browser or ILDASM rather.
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|
|
leppie wrote:
Anakrino obviously lies to u! Use the object browser or ILDASM rather.
Yeah, I probably should have when straight to he ILDASM but didn't give it a lot of concern when I noticed that browsing the base class in VS.NET 2000 shows the member as overridable also. Figured two different sources wouldn't be wrong... Oppps..
Rocky Moore <><
|
|
|
|
|
What is the proper way to declare a protected set procedure for a read-only property, so that other objects in the same assembly can write as well as read?
I've thought of a couple:
public object TheProperty
{
get
{
}
}
protected object _TheProperty
{
set
{
}
}
protected object theproperty
{
set
{
}
}
protected object pr_TheProperty
{
set
{
}
}
protected void SetTheProperty(object newvalue)
{
}
Which of these would be the best (and feel free to suggest your own )?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
so that other objects in the same assembly can write as well as read?
Use the internal keyword for those variables, in fact you dont even need to have a property for them as you know what you are meant to do with them
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|
|
I'm doing this for some of them, but others are kept in an inconvenient place and/or the component needs to know when they are changed.
I think I'm going to just decide myself which one to do.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
I've been using Java SDK for many years and Sun Microsystems had the entire API up for reference. Where can I find this for C#? I looked all over the ms.com site and foudn nothing. thanks!
|
|
|
|
|
|
A friend of mine told there's a number on each harddisk; this number is unique. So it can be used to make sure nobody can copy ypur software (the customer needs a hash code from this number to use the softwarer)
Does anyone how to obtain this nuber in C, C++, C# or Java?
Thank you in advance
|
|
|
|
|
I have used this sometime:
char VolumeName[200]="";
char FileSystem[50]=""; //FAT, FAT32, NTFS, CDFS, ...DWORD VolumeSerialNumber=0;
DWORD MaxFileName=0;
DWORD dwFileSystem=0;
GetVolumeInformation("c:\\", VolumeName, sizeof(VolumeName), &VolumeSerialNumber, &MaxFileName, &dwFileSystem, FileSystem, sizeof(FileSystem));
CString VolumeSerialNum;VolumeSerialNum.Format("%X",VolumeSerialNumber);VolumeSerialNum= VolumeSerialNum.Left(4) + CString("-") + VolumeSerialNum.Right(4);
jhaga
CodeProject House, Paul Watson wrote:
...and the roar of John Simmons own personal Nascar parked in the garage. Meg flitting about taking photos.Chris having an heated arguement with Colin Davies and .S.Rod. over egian values. Nish manically typing *censur*. Duncan racing around after his pet *c.* Michael Martin and Bryce loudly yelling *c.* C.G. having a fit as Roger Wright loads up *c.* . Anna waving *c.* and Deb scoffing chocolates in the corner.
..Good heavens!
|
|
|
|
|
Thanks for helping me with this C++ implementation,
but I noted yesterday I need a C# version; because I need to implement it in a C# program. Can you help me with this one too?
Thank you in advance
|
|
|
|
|
All you have to do is lookup the function name at microsoft
and read the info and use it with [DllImport()] attribute.
This is What I came up with doing a simple search with google.
Click Me
Bo Hunter
|
|
|
|
|
When a file entry is right-clicked in Windows Explorer a dialog appears with a minimum of a "General" and a "Summary" tab. The "Summary" tab always contains entries for Title, Subject, Author, Category, Keywords and Comment.
The .NET FileInfo class allows access to name, created date, etc. but not to the properties listed on the "Summary" tab.
How can I get to this "Summary" info with C#??? I don't event need to change it, just access it.
Thanks.
Grant
|
|
|
|
|
Google "FMTID_SummaryInformation"
|
|
|
|
|
Why is it happen that, when I'm setting the AutoScroll option of the main form to be true, it makes multi copies and dirt of the text I'm writting by using GDI(DrawString method) through the Paint event of the main form on every time I'm scrolling/resizing the window.
I'll be gratefull to receive your help.
|
|
|
|
|
Call Invalidate() after the scrolling/resizing.
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|
|
I have run into that before... You need to either apply a translation transform or take into account the offsets of AutoScrollPosition. (There is a bug in AutoScrollPosition; the AutoScrollPosition requires a positive value if you set it; but it always returns a negative value when you read it.) Just add the values from AutoScrollPosition to all the coordinates in you Paint routine.
The size of the scrollbars are determined by the bounding area of all the child controls contained within the control. TO change this, you can set AutoScrollMinSize to the actual size you want.
What is happen is that Win32 ScrollWindow (or whatever it is called) is being called, and the invalidated region is then asked to paint itself, but without including the offset position.
In addition to the above, there should be some OnScroll event (I don't remember the name). Try calling Update() within the event to perform realtime updating as you scroll. This removes the redrawing delay that occurs when they user is continually dragging the scrollbar, and defering any paint events from being generated.
Just doing invalidate() doesn't work because it flickers--also, it doesn't take into account the scroll position, so your client area never actually scrolls.
Thanks,
Wes
|
|
|
|
|
I wanted to share two important news with you. A new (and free) C# decompiler has been made available by Lutz Roeder. Reflector[^] was in the past "only" showing IL(L) code. Now Reflector embeds a C# decompiler plugin and it comes just as the definitive tool to unmasquerade all those CLR secrets...
Reflector comes even handier than predicted with the use of hyperlinks to navigate through methods within the source code. Amazing!
Anakrino[^] 1.1 has been updated. In fact, only the xml configuration file needs an update. Get it here[^]. Replace the xml file in your Anakrino install folder with this one. Caution : this xml file references paths of the form C:\WINDOWS\... and, as a consequence, you are very likely to have to replace those occurences with C:\WINNT\... Otherwise, Anakrino raises an exception when it starts.
With these tools in hands, it is possible to know how EVERY .NET class is actually implemented.
For native calls, just give a look at rotor.
|
|
|
|
|
Stephane Rodriguez. wrote:
Reflector comes even handier than predicted with the use of hyperlinks to navigate through methods within the source code. Amazing!
Well, if you have a class highlighted in the TreeView, you can hit enter and it'll jump to its base type. Or if you have a method selected, hit enter and it'll jumpt to its return type. And the links were there in the IL as well.
Stephane Rodriguez. wrote:
With these tools in hands, it is possible to know how EVERY .NET class is actually implemented.
For native calls, just give a look at rotor.
I've been looking at Rotor. It's fairly interesting. I've been contemplating installing it so I can program against it. Maybe I'll even install Mono.
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
|
|
|
|
|
David Stone wrote:
Maybe I'll even install Mono.
Latest version wont compile on my linux box
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|
|
Stephane Rodriguez. wrote:
has been made available by Lutz Roeder
He's done some really interesting things. Thanks for the FYI.
Stephane Rodriguez. wrote:
With these tools in hands, it is possible to know how EVERY .NET class is actually implemented.
So will you be rewriting everything, just for fun?
-Nick Parker
|
|
|
|
|
When you see the immediate benefits of these tools for those wildly posting issues, it's too bad we don't clearly show permanent links to these tools in the forum. Quite cheap an improvement.
Nick Parker wrote:
So will you be rewriting everything, just for fun?
I don't think so. I am even thinking about giving up the interop stuff altogether, and go to a more creative side (ASP.NET). So, may be bye bye C# forum and good morning ASP.NET forum!
All those interop details are much like learning by heart tons and tons of tiny details. We developers were sold seamless interop, and the truth is that, just to give a crude example of where we developers are now, the CLR 1.1 does not even release running COM instances when told to (chris brumme blog).
Someone bold enough could rewrite the entire Windows Forms code, or sell a total replacement. It's clearly lagging behind today's needs, especially when you see how people are used to MFC controls and the like. After all, that's business opportunities for companies like Infragistics. According to me, this portion of the run-time is utter crap (internal classes, too tightly coupled with WIN32 controls, while being hardcoded at the same time).
|
|
|
|
|
Stephane Rodriguez. wrote:
When you see the immediate benefits of these tools for those wildly posting issues, it's too bad we don't clearly show permanent links to these tools in the forum. Quite cheap an improvement.
Interesting thought, maybe you should suggest this to Chris in the Suggestions forum....
Stephane Rodriguez. wrote:
So, may be bye bye C# forum and good morning ASP.NET forum!
Not sure how much of a UI designer you are for Win32, however if you haven't done much web stuff you will soon hate the limitations.
-Nick Parker
|
|
|
|
|
I am creating a console sort of like quakes in which the user can modify variables and execute commands by typing them into a command line. So I have a Shell class which keeps track of variables and commands that are registered to it. Each command that can be executed has a delegate to the function that it calls when the user types its name in. I want to know if its possible to pass a function name as an arguement to another function, the purpose being that the Shell class would take care of creating the actual delegate. I noticed that in the delegate constructor it uses the parameter void() target, but when i try that it generates a bunch of errors. Any help would be appreciated.
Thank you.
Steve
Not all who wander are lost...
|
|
|
|
|
You'll have to wait for .NET ver2 for anonymous delegates, in the meantime you will have to template each of them, or maybe you can use Reflection.Emit to build delegates dynamically, but that a bit difficult.
another suggestion is to go the COntrol.Invoke way, not sure if you can define a delegate with a "params" parameter.
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|