|
If you get an answer to this, I'd be interested to find out how to do it.
"It was the day before today.... I remember it like it was yesterday."
-Moleman
|
|
|
|
|
If still anyone is looking for this, just override the control's DisplayRectangle property. Just mentioned as I was looking for the same till a few days ago.
|
|
|
|
|
Hi,
I want to display a description of the item being hovered over, how would i do this please.
|
|
|
|
|
Use a tooltip.
"It was the day before today.... I remember it like it was yesterday."
-Moleman
|
|
|
|
|
Or a balloon
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
That is a nice article you linked to. I am wondering why it was voted down a bit... It may be an older article from 2002, but the information looks still useful.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello,
Has anyone got an upto date and working version of a gamequery library?
i have attempted to fix the one located at http://www.codeproject.com/csharp/gameserverinfo.asp?df=100&forumid=128181&exp=1&mpp=50&select=2186981&msg=2186981
However the skill needed is beyond me, and i have recived no e-mail from the original writer.
So anyone able to assist me?
Cheers
|
|
|
|
|
hi,
I want to display the time and date in a textbox using c# where i should put the formula and how
regards
|
|
|
|
|
Use System.DateTime.Now
textbox.Text=System.DateTime.Now.ToString();
at page load or any buttion's click event wherever you want.
Naresh Patel
|
|
|
|
|
exactly. and use a timer if u want it to look like a clock
there are no facts, only interpretations
|
|
|
|
|
And use the conditional operator ?: to format it like a real clock
int Hours = ((YourTimeVariable / 1000) / 3600);
int Minutes = ((YourTimeVariable / 1000) / 60) - (Hours * 60);
int Seconds = ((((YourTimeVariable / 1000)) - (Minutes * 60)) - (Hours * 3600));
strHours = Hours < 10 ? "0" + Hours.ToString() : Hours.ToString();
strMinutes = Minutes < 10 ? "0" + Minutes.ToString() : Minutes.ToString();
strSeconds = Seconds < 10 ? "0" + Seconds.ToString() : Seconds.ToString();
Time_TextBox.Text = strHours + ":" + strMinutes + ":" + strSeconds;
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Muammar© wrote: strHours = Hours < 10 ? "0" + Hours.ToString() : Hours.ToString();
strHours = Hours.ToString("D2"); etc. will suffice.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Have I been re-invinting the wheel?
Thanks Luc .. I didnt' know it.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Or maybe just use the ToString method
DateTime.Now.ToString("hh:mm:ss");
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: DateTime.Now.ToString("hh:mm:ss");
DOH!!
Thank you guys
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
By the way, your sig made me laugh so much a couple of months ago,yet I want to know if my understanding was correct so please tell me what it really means:->
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
or be lazy and use DateTime.ToLongTimeString ( alternatively :DateTime.ToShortTimeString ) methods
there are no facts, only interpretations
|
|
|
|
|
Is there a way to prevent dataGridView to move to the next row after editing the cell? It happens after EndEdit event, so handling EndEdit doesn't help.
Tnx in advance
Dragan Matic
|
|
|
|
|
Did you try saving the current cell address while editing and on the KeyDown event handler go back to the address you saved?? just a thought
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Yes, the problem is that currentCell is moved after CellEndEdit event. I can reposition current cell back to coordinates I want in CellEndEdit event, but something after that happens in DataGridView that moves currentCell one field down, and I simply can't find out where it is happening.
|
|
|
|
|
C++ but applied equally, if not more so to C#...
On a recent contract I added a
<br />
using MynameSpace.MyStuff <br />
to the header and proceeded to use my classes. I got a roasting for the using 'using'. Some nobby quote like "If god had meant for us to use 'using' he wouldn't have given us namespaces'. I can see how 'using' can stop the prevention of name collision, but it does help in the speed of development.
<br />
System.Drawing.Color myColor1 = System.Drawing.Color.Red;<br />
System.Drawing.Color myColor2 = System.Drawing.Color.Green;<br />
System.Drawing.Color myColor3 = System.Drawing.Color.Blue;<br />
or
<br />
using System.Drawing;<br />
<br />
Color myColor1 = Color.Red;<br />
Color myColor2 = Color.Green;<br />
Color myColor3 = Color.Blue;<br />
Does anybody have any tips / hints /preferences when 'using' is ok, and when to use fully qualified types. Do you use 'using' for the framework and fully qualified for your own? A mixture of both?
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"I haven't spoken to my wife now for 48 hours. I don't like to interrupt her.
|
|
|
|
|
I would use 'using' anywhere that I am going to use an object from that namespace more than once. Seriously, anyone who tells you otherwise is a moron. This isn't C++, where namespace std contains pretty much everything, .NET namespaces are much smaller.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Seriously, anyone who tells you otherwise is a moron
Good enough for me. Cheers
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"I haven't spoken to my wife now for 48 hours. I don't like to interrupt her.
|
|
|
|
|
Christian Graus wrote: This isn't C++, where namespace std contains pretty much everything, .NET namespaces are much smaller.
Yes, therefore figuring out what namespace some Widget is in without resorting to Visual Sudio is very difficult, a fully-qualified name avoids the problem.
|
|
|
|
|
No, it doesn't. Perhaps if you're using intellisense to *search* for something, and elect to have to search *again*, rather than turn it into a using statement. I rarely find that I have to look, I know where most things I use are.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|