|
Try This..
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsDigit(e.KeyChar))
e.KeyChar = (char)(0x00);
}
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Use a MaskedTextBox instead or maybe a NumericUpDown control.
|
|
|
|
|
Go and visit the VB Forum, strange that there is someone asking the same question over there!
You two individuals on the same course / doing the same homework / working on the same thing?
|
|
|
|
|
Hi,
Can any one tell where we can use generics to gain performance (except collections) in .net projects with WCF services.
Thanks and Regards,
Kalyan
|
|
|
|
|
Implementing algorithms like a simple stack using generics have shown a gain in performance.
|
|
|
|
|
Generic would always increase performance
If you avoid using generics then you must need to
either type cast or apply boxing and unboxing which
ultimately degrades performance.
To evaluate performance (To get idea about benefits of generics)
http://csharpfeeds.com/post/1468/Use_Generics_to_improve_performance.aspx[^]
Hope this will help!
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Is there any other uses other than mentioned above.
|
|
|
|
|
No man.
That is why generics are used.
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
|
Hi,
We have developed a C# .NET application and one of our customers got this error message when starting the application "Runtime Error! C:....R6002 - floating point support not loaded". It was on Windows 7 and he could not start the application this time. This issue has only been seen once, the customer has not had any problem at all with the application besides this issue.
This fault has never been seen after that and we could not reproduce this issue. Our application is run on many different laptops.
I must give the customer an explanation but I am not sure. It had been easier if the error always occured.
Best regards
Mac
|
|
|
|
|
Take a look here[^] for some suggestions from Microsoft.
It's time for a new signature.
|
|
|
|
|
Hi Guys,
for the context setting, I am exchanging messages between my nServiceBus client and nSerivceBus server. its is the namespace xyz.Messages and and a class, Message : IMessage
I have more messages that are in the other dlls, like xyz.Messages.Domain1, xyz.Messages.Domain2, xyz.Messages.Domain3.
and messages that derive form that base message, Message.
I have the endpoints defined as like :
at client
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="xyz.Messages" Endpoint="xyzServerQueue" />
<add Messages="xyz.Messages.Domain1" Endpoint="xyzServerQueue" />
<add Messages="xyz.Messages.Domain2" Endpoint="xyzServerQueue" />
</MessageEndpointMappings>
</UnicastBusConfig>
at Server
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="xyz.Messages" Endpoint="xyzClientQueue" />
<add Messages="xyz.Messages.Domain1" Endpoint="xyzClientQueue" />
<add Messages="xyz.Messages.Domain2" Endpoint="xyzClientQueue" />
</MessageEndpointMappings>
</UnicastBusConfig>
and the bus initialized as
IBus serviceBus = Configure.With()
.SpringBuilder()
.XmlSerializer()
.MsmqTransport()
.UnicastBus()
.LoadMessageHandlers()
.CreateBus()
.Start();
now when i try sending instance of Message type or any type derived types of Message, it successfully sends the message over and at the server, i get the proper type.
eg.
Message message= new Message();
Bus.Send(message);
message = new MessageDerived1();
Bus.Send(message);
message = new MessageDerived2();
Bus.Send(message);
My problem arises when any type, say MessageDerived1, contains a member variable of type Message, and when i assign it to a derived type, the type is not properly transferred over the wire. It transfers only as Message type, not the derived type.
public class MessageDerived2 : Message
{
public Message message;
}
MessageDerived2 messageDerived2= new MessageDerived2();
messageDerived2.message = new MessageDerived1();
message = messageDerived2;
Bus.Send(message);
any help is strongly appreciated.
Thanks
TJ
modified on Wednesday, May 12, 2010 4:02 AM
|
|
|
|
|
There are a set of calls in .Net that return the standard images for "plus", "minus", "minimize", "checkbox", etc. I know these calls exist because I have used them. Can't for the life of me remember what they are called. Please help!
Don Heath
|
|
|
|
|
Are you, perhaps, thinking of this[^]?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks, Henry! That is what I was thinking of.
Don Heath
|
|
|
|
|
My pleasure.
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I've just spent an hour wondering what dark force was silently consuming an exception in my application and eventually found out that it was a binding source. Having read the documentation(!) I can see that the BindingSource.DataError event is raised when "a currency-related exception is silently handled" ref[^].
If the unhandled exception had made the application crash and burn in the usual manner then the error would have been very obvious. As it was I only noticed it when a control showing detailed information did not update when I clicked down the rows in a datagridview.
Is it possible to stop the BindingSource silently consuming exceptions or is it prudent to treat a subscription to the DataError event as non-optional?
Alan.
For completeness this is the code where the exception originates.
private void BindingSource_PositionChanged(object sender, EventArgs e) {
BindingSource bs = (BindingSource)sender;
FileRecord frec = bs.Current as FileRecord;
if (frec != null) {
Detail.Text = this.FormatData(frec.File);
} else {
Detail.Clear();
}
}
|
|
|
|
|
Any body have a good link to a coding conventions document? have to present a document of coding conventions for an upcoming project.
have checked out the one here on codeproject but there is alot of negativity towards it
Thanks
Simon
Marc Clifton wrote: That has nothing to do with VB. - Oh crap. I just defended VB!
|
|
|
|
|
|
|
Coding techniques and programming practices standards - here.
|
|
|
|
|
Just wing it.
|
|
|
|
|
I wish that was possible less documentation to give.. As the project team is made up with a .net developer and 2 * MSAccess Developers thought it was best to sing from the same hymn sheet
Marc Clifton wrote: That has nothing to do with VB. - Oh crap. I just defended VB!
|
|
|
|
|
Hi,
I hope this is the right place to ask: I distantly remember coming accross an article here on codeproject.com some time ago where someone described the problem that Visual Studio scrambles the order of resources in RESX files (or something very similar). IIRC, it also provided a tool that would alphabetically sort the resources. However, I can't find that article anymore.
Does someone know the article I'm talking about? Or maybe give me tips how/where to look for it?
Thanks
|
|
|
|
|