|
First of all, you can have the same event handler for both of the buttons. If you are using VS 2005, you can choose the event handler for button2 from dropdown list of event handlers at the click event. You can also specify the same event handler like this:
<br />
this.Button1.Click += new System.EventHandler(this.Button1_Click);<br />
this.Button2.Click += new System.EventHandler(this.Button1_Click);<br />
Secondly, EventArgs doesn't have any properties that carries any useful information so what do you need instead of EventArgs.Empty ? If you need any additional properties you can write you own class that inherits from EventArgs and extends its functionality
|
|
|
|
|
|
I've developed a Crystal Reports, and when exported to PDF, it looks great. It even looks great (to me) when exported to excel. However, one of the business users is stating they have an issue with it. Since some of the cells that are being used are wider than the default for excel it is merging the cell with data with the cells around it, and centering the data in the merged cells. Does anyone know how to tell it I don't want it to do this?
|
|
|
|
|
When exporting Crystal Reports to Excel, I have found these general rules help:
1. Use Guidelines extensively to ensure all fields are perfectly aligned vertically.
2. Avoid using Center alignment in fields.
3. Fields cannot overlap one another, otherwise extra rows will result in the spreadsheet.
HTH!
Sincerely,
-Mark
mark@msdcweb.com
http://www.msdcweb.com
|
|
|
|
|
Hi there!
I need something visio-like for our upcoming delphi project conversion. All I found so far is VG.NET. But it is design-time editor. I am looking for run-time.
Any advices?
Thanks.
|
|
|
|
|
You're converting Delphi to C# ? Is it Delphi.NET ? Sounds like a rewrite to me....
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 )
|
|
|
|
|
Yup. Convert - is in fact rewrite.
Project itself is not a vector editor. It's more like Infopath with additional features (one of which is user editable sketches). I was thinking about Ink, but there is a requirement for regions, filled shapes and so on.
Here is what I have in mind (only for .NET WinForms)
http://www.ksdev.com/blockengine/screen.html[^]
|
|
|
|
|
Looks like a lot of fun.
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 )
|
|
|
|
|
Why not take a look at this[^]? You can also find a version of Netron on Sourceforge called Netron Unloaded.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I developed a drawing program.
I use GraphicsPath, now i wantto erase what i drawn. how could i do.
Drawing code is above.
Dim mousePath As New System.Drawing.Drawing2D.GraphicsPath()<br />
Dim SelectRect As New Rectangle()<br />
Dim ps As New Point()<br />
Dim pe As New Point()<br />
Private Sub PictureBomcp1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pbImage.MouseDown<br />
SelectRect.Width = 0<br />
SelectRect.Height = 0<br />
SelectRect.X = e.X<br />
SelectRect.Y = e.Y<br />
ps.X = e.X<br />
ps.Y = e.Y<br />
pe = ps<br />
If e.Button = Windows.Forms.MouseButtons.Left Then<br />
mousePath.StartFigure()<br />
End If<br />
<br />
End Sub<br />
<br />
Private Sub PictureBomcp1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pbImage.MouseMove<br />
If (e.Button = MouseButtons.Left) Then<br />
Dim thisform As PictureBox = CType(sender, PictureBox)<br />
Dim g As Graphics = thisform.CreateGraphics()<br />
mousePath.AddLine(e.X, e.Y, e.X, e.Y)<br />
g.DrawPath(New Pen(MyConstants._C, MyConstants._W), mousePath)<br />
End If<br />
End Sub<br />
<br />
Private Sub PictureBomcp1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pbImage.MouseUp<br />
Dim thisform As PictureBox = CType(sender, PictureBox)<br />
Dim g As Graphics = thisform.CreateGraphics()<br />
Dim p As New Pen(MyConstants._C, MyConstants._W)<br />
g.DrawPath(New Pen(MyConstants._C, MyConstants._W), mousePath)<br />
mousePath.Reset()<br />
g.Dispose()<br />
End Sub
|
|
|
|
|
May I suggest looking at these articles on CodeProject for good ideas on drawing programs:
Draw Tools[^]
Draw Tools Redux[^]
The second article is an extension of the first, both illustrate drawing objects, resizing, erasing, moving, saving to and restoring drawings from disk, etc.
Sincerely,
Mark
mark@msdcweb.com
http://www.msdcweb.com
|
|
|
|
|
Hi again,
I aim to do a simple eraser for deleting what i draw as mspaint.
I searched CodeProject for erasing code, but i couldnt find.
|
|
|
|
|
In that case, you wouldn't want to use a GraphicsPath to do the drawing, instead just draw on your canvas and implement the erasing code by drawing over existing objects with the background color, which is what MSPaint does.
Sincerely,
-Mark
mark@msdcweb.com
http://www.msdcweb.com
|
|
|
|
|
i would do so if not i didnt draw on %50 opac canvas :S
|
|
|
|
|
How do i sort a listviews items for what i whrite in a textbox that it only will show thoose items??
Love take care!!
|
|
|
|
|
andredani wrote: How do i sort a listviews items
Do you know how to sort a listview? If not do some searching there must be a million sources that show how to do it.
However if this is your problem:
andredani wrote: for what i whrite in a textbox that it only will show thoose items??
I have no idea what that means
|
|
|
|
|
hi all,
I am using a datagridview to display data.i am creating a datatable dynamically and set it as a datasource. i am contatenating values of two columns and displaying in a single column. i need to highlight one of the values as a bold text.
i am using VS 2005 with C#.net in windows application.
How can i implement the same?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Handle the DataGridView's CellFormatting Event and write code to change BackColor of the value of want to Highlight.
|
|
|
|
|
This is my code to save something from a textbox:
StreamWriter msgStreamWriter = new StreamWriter("message.txt");
msgStreamWriter.WriteLine(textBox1.Text);
msgStreamWriter.Close();
is it possible to save different messages and also in different files?
for example,
message1 into notepad1
message2 into notepad2
message3 into notepad3
help please!
Thanks.
|
|
|
|
|
What are message1, message2, message3?
|
|
|
|
|
For example, if a user decides to save the first message "hello" as message1.txt
Second message "how are you" as message2.txt
Third message "Goodbye" as message3.txt
What would the code be?
Because for now all i can do is to save the first message message1.txt. But saving the rest would be overwritting the contents of message1.txt.
|
|
|
|
|
I want to subtract the time. For example I have two timing; one is FROM TIME and the other is TO TIME. I want to get the difference of the timing. Is there any option thro' TimeSpan or DateTime
Regards,
LEE
|
|
|
|
|
The DateTime structure has a Subtract[^] method.
Paul
|
|
|
|
|
TimeSpan timeSpan = [firstDate].Subtract(secondDate);
then you can get the diff like
timeSpan.Minutes;
timeSpan.Hour etc.....
Hope that is what you are looking for
laddie
|
|
|
|
|
Dear All:
I Work With oce 3165 Printer this printer has 4 trays .
i want to work with trays but it is not regular.
(ex:for one print 1,3,2 & another print 1,2,4 used trays)
i work with PrintDocument.printerquerysetting()
but it does not work?
can any one help to me that control on this?
thx
msereshki
-- modified at 1:21 Wednesday 12th September, 2007
|
|
|
|