|
You mean Obsolete attribute? I've tried it, but it didn't help
Thanx for your answer
Bobo
|
|
|
|
|
bobo.jede wrote: You mean Obsolete attribute?
Yes
bobo.jede wrote: I've tried it, but it didn't help
I know it won't but it informs other developers that you shouldn't use it. Maybe if you mark it with this and then in the event throw a NotImplementedException . The obsolete gives them the reason why they should not use it.
The only (and best way) to do this would be to write your own control (NB you don't have to write it from scratch you could create a wrapper around an existing ComboBox, only exposing the methods / events / properties you want).
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Make your new event public and use ObsoleteAttribute with two parameters. In this case compiler will return an error when somebody try to use this event.
[Obsolete("SelectedIndexChanged is obsolete. Use MyNewEvent instead.", true)]
public new event EventHandler SelectedIndexChanged;
|
|
|
|
|
bobo.jede wrote: Is there any way to do this?
Yes, write your own control, rather than inheriting ComboBox.
bobo.jede wrote: And is it correct to do it in OOP?
Quite simply, no it is not. Inheritance implies that the derived object inherits every public property/method/event from its parent.
|
|
|
|
|
J4amieC wrote: Yes, write your own control, rather than inheriting ComboBox.
Yes, that can be a way but I want to use this control and it's rich functionality.
J4amieC wrote: Quite simply, no it is not. Inheritance implies that the derived object inherits every public property/method/event from its parent.
But I can do the same with methods, don't I ?!
Bobo
|
|
|
|
|
bobo.jede wrote: But I can do the same with methods, don't I
No, you can never completly hide a method in a derived class either. I suppose you could 'new' it and just do nothing within the method, but its still there.
|
|
|
|
|
Try overriding OnSelectedIndexChanged and DONT call the base class.
|
|
|
|
|
Perhaps I understand what you mean, but this doesn't "disable" calling SelectedIndexChanged event.
It seems that it is not possible to do, what I want and that it is not correct in OOP principles.
Bobo
|
|
|
|
|
I'm developing an application which as a number of databound controls hooked up to (ultimately) an SQL database, typical database application infact.
Using a BindingSource -> BindingNavigator -> Controls setup as created by VS the following problem occurs.
When the application is run and the "Add New" button is clicked on the BindingNavigator, if you select the text in the ComboBox then you cannot do anything else with the program, the combobox retains focus. You can click the close button but it has no effect.
If it is not in the process of adding a row then everything is fine.
Any ideas?
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Sorted it
Down to DataBinding on the SelectedItem property. Don't do this! Bind the Text property like the designer does.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
What exactly is the problem, you want to convert the string "0x01 0x02" to a hexadecimal string is that correct?
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
yes thats right.
do u know how?
|
|
|
|
|
aruna_koride wrote: do u know how?
Yes
What do the hex characters represent, the byte value of the characters in the string? E.g. is it a hex dump which you're converting back into the original file?
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Actually I want to send the string(0x01 0x02) to server, The server is coded in such a way that if it receieves exactly this value, it returns success otherwise failure .
|
|
|
|
|
So you need to send this constant string?
In that case:
string command = "\x01\x02";
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
<br />
int nIO = Int64.Parse("0x02",System.Globalization.NumberStyles.HexNumber );<br />
|
|
|
|
|
The type or namespace name 'MD5CryptoServiceProvider' could not be found (are you missing a using directive or an assembly reference?) .
The above exception coming for WindowsMobile, Visual Studio 2005 application, when we tried to use MD5 hashing function, already added
using System.Security.Cryptography.
please advice..
|
|
|
|
|
The cryptography APIs follow a factory pattern. If you want an instance of the MD5 algorithm, use System.Security.Cryptography.MD5.Create .
The MD5 algorithm is supported as of .NET Compact Framework 2.0.
|
|
|
|
|
thanks mike.
But the intellisense is not showing System.Security.Cryptography.MD5
its only showing untill System.Security.Cryptography!
Am I missing any reference?
|
|
|
|
|
I think your project must still be set for Compact Framework 1.0, which did not have this class. Check whether your target device will be compatible - Compact Framework 2.0 works with Windows Mobile 2003 for Pocket PC, Windows Mobile 5.0, custom CE 5.0 platforms, and SP1 adds support for custom CE 4.2 platforms. If so, consider upgrading the project using the Project, Upgrade Project menu option.
If you must keep using Compact Framework 1.0, consider using the MD5 class from OpenNETCF v1.4[^].
|
|
|
|
|
Hello Everybody,
I have already asked this question but no body given me response, i am repeating the same problme:-
I have made a user control, then add a panel on it and add a combobox on the panel. The whole user control then i added at runtime to a Autocad Pallete. But when i want to select an item from the combobox it hides the menu. But i am able to select the item from keybord. What is the problem with mouse?
Thanks...
|
|
|
|
|
Hi all.
I'm busy with the exception handling on my project. What I'm looking for is documentation on exception handling. Something that will tell me that when working with sql catch the following excptions and when working with int catch the following exceptions. I want to be able to break it down as simple as possible. I found the basic exception and their bases...But I want more....
Thanks in advance and any help will be much appreciated
He who laughs last is a bit on the slow side
|
|
|
|
|
hi,
I suggest you to try MS's Enterprise Library Application Block, an Exception
Handling Application block may meet your needs.
peiking
|
|
|
|
|
Look at the framework documentation for the methods you are calling - it will list exceptions thrown. Now catch those you can FIX. Never ever catch something you can't actually fix (with ot without user interaction).
Basically the rule of exception handling is not "I want more". It is "I want less".
|
|
|
|
|
Thanks. Where do I find the framework documentation??
The reason why I want to catch as many exceptions as possible is that want I want to do is write all the exceptions thrown to an eventlog I'm still in the process of figuring out (next obstical)
From there we want to be able to just retrieve the custom eventlog and then from there be able to get information on the exceptions.
Many thanx
He who laughs last is a bit on the slow side
|
|
|
|