|
It seems like you're using an older version of the .NET Framework. System.Windows.Forms.KeyEventArgs.SuppressKeyPress is only supported in versions 2.0 and 3.0. Well, this isn't the end of the world..there's always an alternative. Try this in the KeyPress event:
private void numericUpDown1_KeyPress(object sender, KeyPressEventArgs e)<br />
{<br />
if (e.KeyChar >= (char)Keys.D5)<br />
{<br />
e.Handled = true;<br />
}<br />
}
This should prevent the user from entering keys greater than 5 on the keyboard. This won't work if the user uses the numeric keypad. Just play with the ">= (char)Keys.D5)" part to get the desired results.
Hope that helps,
Ashish
-- modified at 4:22 Friday 10th November, 2006
|
|
|
|
|
I will check,thanks a lot.If i got the result i wil msg u.If u got the key try to infrom me.
My small attempt...
|
|
|
|
|
Do u feel,is there any other method.Actually i want to restrict the number greater than 10000.
My small attempt...
|
|
|
|
|
Hi All,
Am planning to take a test of 70-315(C#-Web application)by next week.Can anyone help me with details of latest pattern of the exam.
Thanks in Advance.
Thanks,
Mirunab
|
|
|
|
|
Mirunab wrote: Can anyone help me with details of latest pattern of the exam.
What does that mean?
I went along to the exam centre, signed in, was shown to a computer and they logged me into the exam. I then answered the questions and at the end of the exam I went back to the receiption where I received a print out of my grade.
|
|
|
|
|
ohh sorry.I think my question might be not clear.Here it is, wat's the thing is, am taking web application certification test. How many questions will be there.What are the major portion covered in that.What sort of questions will be there.At last can anyone help me with the latest dumps?
Thanks,
Mirunab
|
|
|
|
|
Mirunab wrote: How many questions will be there.
I don't remember, but I do remember that each question was given an average of 2 minutes to answer.
Mirunab wrote: What are the major portion covered in that
The questions are randomly chosen from a pool. You may not get the same questions as a person sitting next to you doing the exact same exam.
Mirunab wrote: What sort of questions will be there
Most are multiple choice - some are pick one, some are pick many. There is the odd question on putting things in the correct order.
Mirunab wrote: At last can anyone help me with the latest dumps?
No, that would be cheating.
The exam cram books are a good source of information and they have practice exams in the same style.
|
|
|
|
|
I don't know how to check my internet connection.
Did I'm connected on the internet or not.
I have Visual Studio 2003.
Vasildb
|
|
|
|
|
|
Hi Friends,
I created treeview with checkbox.
When user clicked on checkbox of any node of treeview how do I know that checked node is parent node or not?Please help?
There is no event that send treenode as sender. All Event send whole treeview as sender? please Help ?
Suhas Bothe
-- modified at 7:57 Thursday 9th November, 2006
Suhas Bothe
|
|
|
|
|
Hi,
the node that has been checked is supplied in the TreeViewEventArgs of the event. Use its ParentNode property to determine whether it has a parent or is a top level node.
Robert
|
|
|
|
|
There are no any Propety for System.EventArgs e.
please can you explain in details?
|
|
|
|
|
If you catch the AfterCheck event you will get TreeViewEventArgs and not EventArgs. I assume you probably used the Click event so far. Use AfterCheck instead and you'll be fine.
Robert
|
|
|
|
|
Can you explain in details please.
suhas bothe
|
|
|
|
|
The 'AfterCheck' event occurs after the tree node check box is checked. Just delegate this event and in the function you'll get 'TreeViewEventArgs' as the second parameter.
It would have all the information you are looking out for.
For more details you can refer to the 'AfterCheck' help in MSDN.
There are two types of fools in this world: One who give advice and the others who do not take it...
|
|
|
|
|
Hi guys, im trying to write a multimonitor application, how do i move a form to the second monitor, well whats the best way? i use the following code i wrote some time ago, not sure its the best way though, i want the least amount of overhead.
using(DXQuartz frm_quartz = new DXQuartz())
{
Screen[] screen = new Screen[1];
screen = Screen.AllScreens;
frm_quartz.Location = new Point(screen[1].WorkingArea.Left, screen[1].WorkingArea.Top);
frm_quartz.Size = new Size(screen[1].WorkingArea.Width, screen[1].WorkingArea.Height);
frm_quartz.Show();
}
Any help on this would be amazing, there is probibly a built in method for this im missing, thanks for the input
si
|
|
|
|
|
Hi!
There are 2 problems with this code:
1. The assignment screen = new Screen[1]; doesn't have any effect because you're assigning Screen.AllScreens to screen in the next line.
2. The code will throw an IndexOutOfBoundsException if there's only one Screen available.
Otherwise it's the normal way to make the form fill the second screen...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi,
Why is it that my Convert.ToDateTime isn't working any more...
Usually when i said DateTime Test = Convert.ToDateTime(System.DateTime.Now); the value of Test was "2006/09/11 14:00:00 PM" now it is "11/9/2006" not at all what i want... Is there a setting to change this?
The regional settings are the same as when the Convert.ToDateTime work right...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
try out
Test.ToString("MM/dd/yyyy");
rahul
|
|
|
|
|
I might be wrong but wouldn't this: Test.ToString("MM/dd/yyyy"); bring back the value "11/09/2006"...
I'm looking for the value of "2006/09/11 14:00:00 PM"
Usually the Convert.ToDateTime brought back this value that i'm looking for without a problem... on my friends PC this Convert.ToDateTime(System.DateTime.Now); brings back the value "2006/09/11 14:00:00 PM" but not on mine... as it brings back the wrong value format..."11/09/2006"
What could the reason be for this?
Thank you in advance...
Regards Nico
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
then try
Test.ToString("yyyy/dd/MM")+" "+Test.ToLongTimeString();
rahul
|
|
|
|
|
I really don't understand what you are trying to do because System.DateTime.Now already returns a DateTime object. So the Convert.ToDateTime() method call is redundant - it does nothing.
NarutoFan#1 wrote: the value of Test was "2006/09/11 14:00:00 PM" now it is "11/9/2006" not at all what i want
No, the value of Test is a DateTime object (which has no culture specific representation)
|
|
|
|
|
I just used the System.DateTime.Now as and example. That could be a string "2006/12/12 14:00:00 PM", The thing is ... usually when i used the Convert.ToDateTime("WHATEVER") the correct value (being "2006/09/11 12:00:00 PM" so the format was "yyyy/MM/dd hh:mm:ss") but now it brings back a value of "11/09/2006" which is "dd/MM/yyyy". How could this be? I change nothing that i know of....
Please help.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
I suggest that instead of using Convert, use DateTime.Parse.
See Example from MSDN below:
using System;
using System.Globalization;
namespace Parse
{
class Class1
{
public static void Main(string[] args)
{
// Assume the current culture is en-US.
// The date is Feburary 16, 1992, 12 hours, 15 minutes and 12 seconds.
string myDateTimeValue = "2/16/1992 12:15:12";
DateTime myDateTime = DateTime.Parse(myDateTimeValue);
Console.WriteLine("1) myDateTime = {0}", myDateTime);
// Reverse month and day to conform to a different culture.
// The date is Feburary 16, 1992, 12 hours, 15 minutes and 12 seconds.
IFormatProvider culture = new CultureInfo("fr-FR", true);
string myDateTimeFrenchValue = " 16/02/1992 12:15:12";
DateTime myDateTimeFrench =
DateTime.Parse(myDateTimeFrenchValue,
culture,
DateTimeStyles.NoCurrentDateDefault);
Console.WriteLine("2) myDateTimeFrench = {0}", myDateTimeFrench);
// The date is Feburary 16, 1992, 12 hours, 15 minutes and 12 seconds.
string[] expectedFormats = {"G", "g", "f" ,"F"};
myDateTimeFrench =
DateTime.ParseExact(myDateTimeFrenchValue,
expectedFormats,
culture,
DateTimeStyles.AllowWhiteSpaces);
Console.WriteLine("3) myDateTimeFrench = {0}", myDateTimeFrench);
}
}
}
/*
This example yields the following results:
1) myDateTime = 2/16/1992 12:15:12 PM
2) myDateTimeFrench = 2/16/1992 12:15:12 PM
3) myDateTimeFrench = 2/16/1992 12:15:12 PM
*/
if (ToErr == Human.Nature)
{
Forgive = Divine;
}
|
|
|
|
|
Okay thanks,
But why would DateTime TodayTest = DateTime.Now; produce the value "2006/09/11 12:00:00 PM" on my friend's computer but on mine it shows "11/09/2006". What could be the symptoms?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|