|
|
Use the System.Diagnostics.Trace or System.Diagnostics.Debug class; both have: WriteLine , Write , and Indent and Unindent methods.
James
Simplicity Rules!
|
|
|
|
|
In Dev7 you can also use System.Console.Write and System.Console.Write to write to your output window.
Tip# If you do not like all the long names you can put a shortcut 'using' line in the header like:
using db=System.Console
later use:
db.WriteLine
Rocky Moore
|
|
|
|
|
Check out this link. NDoc is an open source application that can generate MSDN-style help from C# code documentation. I love it!
|
|
|
|
|
|
|
What is this?
"Page not found" is what it is....
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
Whats that man?
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Sorry I was trying something and I accidentally posted..
|
|
|
|
|
Joshua Nussbaum wrote:
Sorry I was trying something and I accidentally posted
hehehe. Trying out the A HREF tags eh?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
|
David Cunningham wrote:
You becoming an honourary Canadian Nish?
Seriously, I am considering that. I don't think there are too many opportunities in the US or anywhere else. If I can wind up a decent Canadian job, I have plans to settle down there for good. When I was a kid I've always dreamt of snowy valleys. Quite countryside type places. I'd work from home. Well I am not sure working from home is too feasible nowadays!
Nish
p.s. If any Canadian companies are recruiting, lemme know please. I am available for any post from software developer to company president
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Variable arguments are not supported in C# with the ellipses(...)
You need to use an object array
Cheers,
Tom Archer
Author - Inside C#, Visual C++.NET Bible
Please remember to keep this for tax purposes.
|
|
|
|
|
I have a datagrid which has child rows. I want to grab all the data from selected row and display it on a different form in a different layout.
I can get the selected row by dg.CurrentRowIndex
and
get individual cell values by dg[row,column]
But, I need all the data and child data of the selected row
Thanks for any help,
Corina
|
|
|
|
|
How can I move my Form when the user is draging on the client area??
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
You could do something like this, you will probably want to play with it as I just threw it together and is a little rough around the edges, but it should do the trick.
protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
{
this.Left = Cursor.Position.X;
this.Top = Cursor.Position.Y;
}
Nick Parker
|
|
|
|
|
Yes!
It working! But the mous cursor moves to the upper-left corner when I drag it... hm... but thanks!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
This will work much better, hope this helps
protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
{
this.Left = Cursor.Position.X - this.Left/2;
this.Top = Cursor.Position.Y - this.Top/2;
}
Nick Parker
|
|
|
|
|
Improving on Nicks suggestion....
private bool mouseDown = false;
private Point mouseDownLocation = Point.Empty;
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
{
if( (e.Button & MouseButtons.Left) > 0 )
{
mouseDown = true;
mouseDownLocation = PointToClient(Cursor.Position);
}
}
protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs e)
{
if( (e.Button & MouseButtons.Left) > 0 )
{
mouseDown = false;
mouseDownLocation = Point.Empty;
}
}
protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
{
if( (mouseDown) )
{
Point currLocation = PointToClient(Cursor.Position);
Point offset = currLocation;
offset.Offset(-mouseDownLocation.X, -mouseDownLocation.Y);
Point newLocation = Location;
newLocation.Offset(offset.X, offset.Y);
Location = newLocation;
}
} Now the form moves with the cursor instead of the form's upper-left corner jumping to the cursors position
James
Simplicity Rules!
|
|
|
|
|
Nice idea James, the original post wasn't clear to me whether they wanted to allow the user to click to move the form or not. It's always fun to see different approach at accomplishing a task.
Nick Parker
|
|
|
|
|
Aaahh!! It works!!
And James: Tell me every book you've read about C#!!! NOW!!!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
Only a couple
Inside C# by Tom Archer and
C# Programming with the Public Beta from Wrox
James
Simplicity Rules!
|
|
|
|
|
okay, then it's only Inside C# I haven't read!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
i want to know whether a file has the attribute "readonly"
i get a "FileInfo" object. But i don't know how to deal with the "FileInfo.Attributes"
who can give me some example.
thanks
|
|
|
|
|
This example test if the file is readonly and if it is true it change it to normal attribute.
if( (File.GetAttributes(filename) & FileAttributes.ReadOnly) == FileAttributes.ReadOnly )
File.SetAttributes( filename , FileAttributes.Normal );
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|