|
ya i am working on something so while the "d" key is held down something will happen how would i do this i tried putting it in a button with a tutorial i found but it didnt seem to work it was something like
private void cmdright_KeyDown(object sender, EventArgs e CHANGED SOMETHING HERE)
|
|
|
|
|
The problem is that you used a button, which doesn't have the input focus for very long. Handle the KeyDown event of the Form.
|
|
|
|
|
In textbox..
when ever user write his address, He has to start with Numeric value then after all he can use what ever he want ?
if he not use numreic value, then message come up.
Can anyone help me with that?
-Thanks
Peter
|
|
|
|
|
create an event listener for the textbox textchanged event, parse the string, if the first character (or two or three, etc..) are numeric, then proceed, else, if the first char is not numeric, display a messagebox and clear the textbox.
|
|
|
|
|
but how do i chek that condition...i have to use substring or pls help me with that ?
Peter
|
|
|
|
|
use if(IsNum(textBox1.Text[0])),
As IsNum is a function you may create and takes a parameter of char to check if its a number.
|
|
|
|
|
pakpatel wrote: when ever user write his address, He has to start with Numeric value
Are you really, really sure about that?? You're making a bad assumption here...
|
|
|
|
|
Ya i know but what i do man..that's how they want ?
Peter
|
|
|
|
|
A good app starts with good solid requirements. Your customers are not software developers. They have no concept of what is and isn't best practice. If the customer wants something that is known to be bad practice, it's part of your job to hash this requirement out and make sure that the customer understands that this will affect the quality of the app and spell out what the potential pitfalls are, and have the customer sign off on the bad requirement. The last thing you need is to give the customer everything they wanted and them not give you what you wanted ($$$) because the app didn't do everything they envisioned it doing.
|
|
|
|
|
Agree with Dave. If you give the customer exactly and literally what they wanted, you will find that in the end you have a system that is hard to maintain, with a lot of loop holes, and does not handle situations that did not occurs to the customer that it may happens, at that moment.
|
|
|
|
|
Split the numeric part away from the non-numeric part.
|
|
|
|
|
use Regex when the textbox fires it's Validating event. if the Regex fails, you can clear the box.
http://www.dotnetcoders.com/web/Learning/Regex/syntax.aspx[^]
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
Perhaps if you communicated to your client some more concrete examples... There are legitimate addresses that don't start with a number. Private roads sometimes are used
Waverly Place
Anytown, XX, 12345
Sometimes people spell out numbers as well:
One Rockefeller Plaza
Some begin with directions:
West 106 Broadway
As long as you're dealing with a small, known pool of addresses, you'll be OK. However, if you're soliciting general address input, I'd stay away from this rule. Just my 2 cents... Good luck!
|
|
|
|
|
Hello,
So I did my homework and I learned and succesfully created a custom event. Now I want to go to the next level. I want to trigger the event an app1 and hear it on app2. Is it possible? For example. Let's say we created two Console Applications one was just listening and the other one was triggering an event.
|
|
|
|
|
You'll need more than events to communicate between applications.
If the 2 apps are on the same machine, you can communicate between them using pipes. See System.IO.Pipes[^] in the latest .NET framework.
If the 2 apps are on different machines, you'll want to use a robust communication mechanism like Windows Communication Foundation (WCF)[^] or Remoting[^]. WCF is the latest communication technology, Remoting is an older technology.
|
|
|
|
|
Are those water pipes or gas pipes? Thanks. I'll look into it.
|
|
|
|
|
Member 3537109 wrote: Are those water pipes or gas pipes? Thanks. I'll look into it.
Specifically, "Named Pipes".
|
|
|
|
|
There's some articles on here - just search for named pipes[^]
I believe that they can be used across a LAN to communicate between different machines as well. Also, I read somewhere that they're useful for interapp communication in Vista where other methods can fail
Dave
|
|
|
|
|
Hello one and all,
I have strange issue with my .net 2.0 windows application. The application shows an empty error messagebox sometimes (gridrow double click in a datagridview, tab click and in some cases even on application launch). However this only happens with some deployments and gets corrected (no code changes) in the subsequent deployments.
It will be of great help if anyone can help me in resolving this issue.
Warm Regards,
Krishna Murthy
|
|
|
|
|
I've never come across this before. Without more info there's probably not much more anyone can do from here.
(an empty error message box kind of makes me think of out of memory problems though.)
Does the app crash after the empty message box?
If you can recreate it reliably, don't click ok to the message box, just leave it, and try and attach a debugger (you can do remote debugging if it only happens on production machines) to it so you can see what's happening.
Or, if it crashes, use ADPlus to get a crash dump, and analyse it with windbg. (Debugging .NET 2.0 application by John Robbins is the best resource I've ever read for learning how to use ADPlus and windbg)
You'll have to make sure all your builds include full debug symbols, you've got a symbol server, and the correct source archived for the version.
Simon
|
|
|
|
|
As Simon mentions its very hard to give any advice without more information, in terms of what you have tried already?
Looking on google one person has had an issue with a ClickOnce application and blank message boxes but the only way they solved it was uninstalling software which is not reliable or the best solution!
Without sounding too obvious the first port of call would be to the application\event logs to ensure nothing has been logged there with the error which could be of use. If not then Simons ideas are the way forward without giving us more information.
p.s. When searching google i did find this query on another website (posted by you ) so if you do solve it let us know.
|
|
|
|
|
Hello,
I have a small application which creates a WebService using .netRemoting technoligy.
The problem I have is that the WebService starts correctly but I don't know how the WebService can return informations to the object which has created the WebService.
Explanation:
------------------
I have one class names "myFirstTest". In this class I start the WebService with the following code:
RemotingConfiguration.RegisterWellKnownServiceType(typeof(MyTestServer),"MyTestServer", WellKnownObjectMode.Singleton);
In MyTestServer I have the definition of all functions calls that can be done over SOAP but I don't know how to inform my class "myFirstTest" that a function call has been done in my WebService.
If I could at least get the object representing the WebService I would get a chance to pass it the instance of "MyFirstTest" object to allow it to call functions in "MyFirstTest", but I don't know how to get the object representing the WebService
Do you have any idea?
Thanks in advance for your help.
Alain.
|
|
|
|
|
Nobody to help me?
Please let me know if you need more details
Alain
|
|
|
|
|
I have one tree with parent node and 6 child nodes.I want to count number of child nodes. If I uncheck any childnode(s) than messagebox should display number of checked child nodes . If I deselect 4 child nodes than messagebox should display number "2".
I am using this approach but not getting sucess
private void count(TreeNode node)
{
int j = node.Nodes.Count;
MessageBox.Show(j.ToString());
foreach (TreeNode child in node.Nodes)
{
if (child.Checked == false)
{
j--;
}
MessageBox.Show(j.ToString());
}
}
this code count number of unchecked nodes when i select parent, i want to check itereatively on uncheck of each child!
any kind of help will e appreciated.
|
|
|
|
|