|
|
hi..all please give some suggestions if you have on this...
|
|
|
|
|
To enable clearing your points simply add a call to Invalidate() to the end of your button2_Click() event handler.
private void button2_Click(object sender, EventArgs e)
{
points.Clear();
this.Invalidate();
}
Whilst on the subject of painting, for what you are trying to to do you do not need to override the OnPaint() method, simply handle the Paint event of your form.
As far as moving the points is concerned the procedure will be the same as moving any drawing object.
1) Handle the MouseDown event, in it decide if the mouse location (e.Location) is at a point of interest. If so, make a note of the point1 and then set a boolean flag to true (call the flag something like 'moving' so that its name reminds you of what it's for, and take a note of the current position of the mouse in a class scope field (it will be needed in several places), of type Point , something like this.moveStartPoint = e.Location .
2) Handle the MouseUp event, in it set the flag ('moving') to false, and the moveStartPoint to null and call this.Invalidate()
3) Handle the MouseMove event, in it first check that 'moving' is true (this means that the mouse is still down). If not return . If it is true then set the point that you made a note of in 1)1 to the new location of the mouse. As you are only moving a point you can set it directly but if you were moving a 'shape' fro example, you would have to use something like
storedPoint.X += (e.X - this.moveStartPoint.X);
Take a look at this[^], for a complete example of moving things you have drawn.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
How to handle ToolStrip's Overflow button click event?
Thanks
|
|
|
|
|
OK, i found a way...
there is an event called Overflowbutton.click., we have to include this delegate and handle it explicitly
|
|
|
|
|
Hi there,
I am currently developing a CAN-Monitor (Controller Area Network). The messages
are received event-driven. At the moment the display of the messages is done by a ListView.
In the near future the number of received messages will grow up to ~ 600-800 messages per second.
The messages (encapsulated in a specific object) are delivered to the view via event to a event-handler-method.
Is there a alternative to the ListView which is more performant than the standard-one?
Thanx in advance!
|
|
|
|
|
The ListBox , but whatever control you use, as a user I can't read 600/800 messages per second. What's in the message that it needs to be displayed? If there's no specific information, I'd show a label saying (done msg x of y), and only show those who are "interesting" enough.
|
|
|
|
|
Even if there was such a control, how would a person make sense of a list that was constantly adding messages at an average rate of 700/sec? That sounds like the definition of information overload to me; I'd be more concerned with reducing the amount of information inserted into the list rather than finding a better list control.
|
|
|
|
|
If you absolutely must have a ListView with all of these messages, consider looking into the ListView's virtual mode. It might suit your task a little better.
That solution aside, could you look into using a different user experience that's a little more streamlined for your data?
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
Hi,
I've created a new user control.
I want to add the property "SelectionColor" to it (like in RichTextBox),
and then i wantto implement the functionality for the property.
Someone have an idea how to do it?
Thanks
modified on Saturday, July 25, 2009 9:22 AM
|
|
|
|
|
What is it that you are not sure of?
How to add a property, or how to implement the functionality for the property once it is added?
DO NOT reply to this post, edit your original to make this clear!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
you should write code like this code in user control
this code use for datagridview "RowHeaderVisible" property
public bool RowHeaderVisibl
{
get
{
return rowHeaderVisiblee;
}//get
set
{
rowHeaderVisiblee = value;
dataGridView1.RowHeadersVisible = rowHeaderVisiblee;
}//set
}//RowHeaderVisibl
|
|
|
|
|
I want to create a c# win form app. It should just display a message box, whenever I am opening Iexplorer.exe. How to do this friends?
|
|
|
|
|
Hi guys.
Could we use GpuCV[^] in C# ?
Thanks.
|
|
|
|
|
Theoretically, yes, if they publish an API. Do I know of a library that does this? No, but Google works as well for you as it does for me.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
go here[^]
Probably not for C# but could always write your own wrappers?
Mike
"It doesn't matter how big a ranch ya' own, or how many cows ya' brand, the size of your funeral is still gonna depend on the weather." -Harry Truman.
Semper Fi
http://www.hq4thmarinescomm.com[ ^]
My Site
|
|
|
|
|
Hi
Is there any way that I can create an unique id from the fingerprint which is scanned by a Microsoft FingerPrint Reader?
Thanks.
|
|
|
|
|
Click[^]
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
I had a BHO.
When a web page is opened on IE, I try to replace the HTMLElement's text using
foreach (IHTMLElement HtmlElemen in (IHTMLElementCollection)document.body.all)
{
try
{
HtmlElemen.GetType().GetProperty("innerText").SetValue(HtmlElemen, "NewText", null);
}
catch(Exception e)
{
System.Windows.Forms.MessageBox.Show("Message:" + e.Message );
}
}
In some PC's the html element's text is replaced successfully with "Newtext",
but in some PC's it is not replacing.
And an exception message is obtained "Object reference not set to an instance of an object. "
How to fix this exception?
This is built in vs2005 c#.
The exception is obtained only in the PC's which doesn't have VisualStudio2005 or Vs2008.
Are there any dependencies missing for execution of these code.
In my installation Setup, I already added "Microsoft.Mshtml.dll" also.
Still this exception is coming. How can I avoid this exception and make it execute succesfully in all PC's?
|
|
|
|
|
What Framework versions are installed on the PCs that fail?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi All,
I was create a Dll by using c# it works correctly with application. i want to register it's but regsvr command generate error .
error is given below.
The Module Dll1.dll was loaded but the entry point DllRegisterserver was not found.
Make sure that Dll1.dll is a valid Dll or OCX File and then try again.
so what is the problem behind it.
Thanks in advance
If you can think then I Can.
|
|
|
|
|
I have the same error with a my dll. I am using VS2005.
Have you find anything?
Thanks
|
|
|
|
|
hello
Reporting Services in Microsoft SQL Server 2005 web service provides three endpoints:
http://IRISSQLPROD1/ReportServer/ReportService.asmx is provided for backward compatibility with SSRS 2000.
http://IRISSQLPROD1/ReportServer/ReportService2005.asmx is the new management endpoint in SSRS 2005.
http://IRISSQLPROD1/ReportServer/ReportExecution2005.asmx is the new execution endpoint.
I did a bit of research, I think among the above three ws endpoints, this is the one which will allow me to execute a report programmatically:
http://localhost/ReportServer/ReportExecution2005.asmx
However, I'm still looking for a sample - programmatic report execution via WS endpoint above and exported to PDF (saved on shared folder/local disk)
Thanks
REF:
http://msdn.microsoft.com/en-us/library/aa237438(SQL.80).aspx
dev
|
|
|
|
|
Hi All,
I have a .Obj File(intermediate file), I want to use it in my c# project, How can I do that?
|
|
|
|
|
No idea what you want to do but I found this info on wikipedia [^] looks like a text format.
Never underestimate the power of human stupidity
RAH
|
|
|
|