|
NDoc's GUI is superb - and it's the basis of the link that I put above. If it had continued to be developed fully in .NET 2, I'd have no hesitation recommending it - unfortunately it hasn't.
|
|
|
|
|
Could not run it successfully, see the message board of the link you sent me.
If you can help with the problems. It can not be compiled also, just 4 projects out of 6 as I remember in that solution under VS2008.
chesnokov
|
|
|
|
|
Have you downloaded the latest version from CodePlex here[^]?
|
|
|
|
|
Yes. It said you need latest sandcastle also to work? It failed to compile entire solution anyway, but GUI was compiled.
Why can not it work with latest sandcastle from microsoft downloads?
I want to run codeproject or codeplex GUI with microsoft downloaded sandcastle.
BTW. NDoc GUI looks more authentic
chesnokov
|
|
|
|
|
hi there,
i ve a problem in setting DPI in print document, everytime when i click on the button it shows "600 600", but i ve set it 1200 in pageSetupDialog.
here is codes
private void button3_Click(object sender, EventArgs e)
{
PageSetupDialog psd = new PageSetupDialog();
psd.Document = printDocument1;
psd.ShowDialog();
printDocument1.DefaultPageSettings = psd.PageSettings;
printDocument1.PrinterSettings = psd.PrinterSettings;
printDocument1.Print();
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
MessageBox.Show(e.Graphics.DpiX.ToString() + " " + e.Graphics.DpiY.ToString());
}
thanks
<div class="ForumSig">Becoming Programmer...</div>
|
|
|
|
|
I don't think you can set the DPI of your printer, it's simply a property of the printer. Instead, you need to scale your image to be the right size to print for that DPI at the size you want.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
oh, i cant resize my image, actually when i print text in black then its result is good, but when print in light gray or gray the result is bad, lots of dots can be seen,
Printer : HP LaserJet 1020 plus
do you know a good solution?
thanks
Becoming Programmer...
|
|
|
|
|
Hi everybody!
I have a DataTable which has 3 column. First column has type int, the second double, and the third is the product of the first and the second column.
How can i set the third column that the values in it have only 2 decimals after the decimal point?
DataTable dt = new DataTable("test_table");
dt.Columns.Add("column1",typeof(int));
dt.Columns.Add("column2",typeof(double));
dt.Columns.Add("column3",typeof(string),"column1*column2");
dt.Rows.Add(new object[] { 1, 5 });
dt.Rows.Add(new object[] { 2, 4,994 });
dt.Rows.Add(new object[] { 3, 6 });
dataGridView1.Columns.Clear();
dataGridView1.AutoGenerateColumns = false;
dataGridView1.DataSource = dt;
dataGridView1.Columns.Add(new DataGridViewTextBoxColumn());
dataGridView1.Columns[0].DataPropertyName = "column1";
dataGridView1.Columns.Add(new DataGridViewTextBoxColumn());
dataGridView1.Columns[1].DataPropertyName = "column2";
dataGridView1.Columns.Add(new DataGridViewTextBoxColumn());
dataGridView1.Columns[2].DataPropertyName = "column3";
Ex: in the second row the third column expression is 2*4,994 = 9,988 but i want that only 9,98 be the value.
I need this because the user can add rows to the datagridview and i want that also in the added rows to function this.
Thanks for your help!
|
|
|
|
|
Hi Noemi Katinka!
Use Math functions. It will round up the values upto given decimal point.
Like Math.Round(ProductAnswer,2)
Hope this will help you.
Regards.
"Save water,It's precious"
|
|
|
|
|
It depends on the rounding you require.
Math.Round does a strange thing, eg:
Math.Round(3.565m, 2).ToString();
Math.Round(3.575m, 2).ToString();
I always use
decimal x = 3.565m;
x.ToString("N2");
as the results are more consistant, trailing digit of 0-4 rounds down and 5-9 rounds up.
For no rounding as in
Noemi Katinka wrote: 9,988 but i want that only 9,98
you need a little function like
public string TrimDecimal(decimal value, int precision)
{
precision++;
string returnString = value.ToString();
int decimalPointPosition = returnString.IndexOf(".");
if (decimalPointPosition > -1)
{
if (returnString.Length > (decimalPointPosition + precision))
{
return returnString.Substring(0, decimalPointPosition + precision);
}
}
return returnString;
}
modified on Thursday, February 07, 2008 4:36:38 AM
|
|
|
|
|
This is called Bankersrounding
DaveyM69 wrote: It depends on the rounding you require.
Math.Round does a strange thing, eg:
// using ToString method because the value is being displayedMath.Round(3.565m, 2).ToString(); // rounds down to 3.56Math.Round(3.575m, 2).ToString(); // rounds up to 3.58
Ohter option = String x = String.Format("{0:9.990,00}", value.ToString());
|
|
|
|
|
Thanks for your idea.
But i resolved it in the following mode:
double d = 9.999 - 0.005;
Console.WriteLine(d.ToString("0.00"));
and this gives me the result 9.99 (what i need).
And when you need a double value with 1 decimal(no rounded) just substract 0.05, and so on for all numbers.
Have a nice day!
|
|
|
|
|
Has anyone worked on how to read the barcode output from the barcode reader.
The barcode reader produces its output in the notepad.
But i want to get the output and then format it.
Kindly suggest on this issue.
|
|
|
|
|
well, at least for the barcode readers i know:
if you scan a specific barcode, the reader just emulates some
keyboard input and the textual representation of the barcode
you scanned gets inserted into the textbox that has focus.
you could even create a console application, do some Console.Read()
and can then do whatever you want with the string representing
the barcode.
so it's up to your imagination!
|
|
|
|
|
Hi All :
I wount to restore DataBase Backup (BackupName.bak) from Device ( C:\ ) to SQL SERVER 2005 with new Name (NewBackupName) by C#.Net Code .
You should to Remmember the Name of ( mdf and ldf ) is defferant of name other backup database , if it the same (mdf and ldf ) name of other Database you should rename file mdf and ldf .
Who I Can do it ?
Thanks for any body hellp me
Thaer
|
|
|
|
|
Thaer Hamael wrote: You should to Remmember the Name of ( mdf and ldf ) is defferant of name other backup database
I dont think so. if you have the .Bak file , you can easily restore to SQL Server 2005 easily using C#
any problem !!! you can ask me
|
|
|
|
|
thanks Mr Abhijit Jana ,
I do it But the Restore Exeption occure by the exeption String the ldf and mdf is Using by other DataBase .
the idea in this case is who to rename the ldf and mdf .
who i can do it ?
thanks Abhijit Jana
Thaer
|
|
|
|
|
can you put the code of restoring over here ?
|
|
|
|
|
hi
My aim is to close a socket which is already open
Socket.close() is raising exception i have tried with few other things still its not closing properly
So if any one knows how to do this then plz do let me know
regards
sindhu tiwari
its me sid
|
|
|
|
|
Are you calling the ShutDown() method before you make a call to Close() ?
|
|
|
|
|
thanks for replying
......................will u plz tell me what this ShutDown() does
I would like to brief my problem ..
I am having a mobile application ......so if the mobile switches off i need to close the socket at my end ........
can u tell me the best way to do this .....apart from pinging it continously
its me sid
|
|
|
|
|
sindhutiwari wrote: will u plz tell me what this ShutDown() does
Read it from MSDN[^]
|
|
|
|
|
Hi Sid,
Dear I am also working on socket application. Try this statement "objSock.Shutdown(SocketShutdown.Both);"
|
|
|
|
|
hi Akmal
Dear,Thanks for ur reply .....i have tried that too ..it dint work perfectly...with my application
as u r also working on socket application
will u plz tell me how you are determining the status of client i mean to say connected or disconnected ......u r following two way pinging or any other thing plz do let me know
its me sid
|
|
|
|
|
Dear Sid,
I am using this piece of code in thread.It tells me when client is connected and send data to me.
Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPEndPoint endpoint = new IPEndPoint(IPAddress.Any, 8001);
listener.Bind(endpoint);
listener.Blocking = true;
listener.Listen(0);
Socket objSock = listener.Accept();
objSock.Receive(ReceiveData);
objSock.Shutdown(SocketShutdown.Both);
listener.Close();
S.Akmal
|
|
|
|