|
i'm trying to trigger the mouse right click event on a from control , and i know we can use the context menu, but i don't need a context menu i just want get some data when mouse right click is done on a record of the gridview , how can i catch the mouse right click, any idea ...
|
|
|
|
|
Use the mousedown event and check the eventarguments to see if it's the right button that is clicked.
Good Luck
|
|
|
|
|
Both left and right click can be trapped by using the MouseDown event.
Various mouse down events are trapped in the code below.
private void form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) <br />
{<br />
Point mouseDownLocation = new Point(e.X, e.Y);<br />
<br />
string eventString = null;<br />
switch (e.Button) {<br />
case MouseButtons.Left:<br />
eventString = "L";<br />
break;<br />
case MouseButtons.Right:<br />
eventString = "R";<br />
break;<br />
case MouseButtons.Middle:<br />
eventString = "M";<br />
break;<br />
case MouseButtons.XButton1:<br />
eventString = "X1";<br />
break;<br />
case MouseButtons.XButton2:<br />
eventString = "X2";<br />
break;<br />
case MouseButtons.None:<br />
default:<br />
break;<br />
}
My signature "sucks" today
|
|
|
|
|
How to Split a DataGridView using C#?
|
|
|
|
|
How you want to split datagridview ?
Do you want to provide paging in datagridview ??
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Hi all,
I have an scenario, I have to merge some dynamic content (to say data retrived from DB) in an existing word document without losing the existing content in that document. So that when ever there is a new conent, i use the same word document file and append my content. Please suggest me how to do this, else provide me some URL to learn and do using C#.
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
|
Hi everyone,
Suppose that you have some partly damaged file that you want to copy to somewhere else reading only the good bytes and ignoring the ones that can't be read "getting over them".
I'm using a simple StreamReader in a loop and ignore IOExceptions as they occur but it doesn't work and go very wrong once a cyclic redundancy is encountered..
What would you use?
|
|
|
|
|
You should probably use a FileStream[^] as it allows you to read the file at the pure byte level. in this way you are free to interpret the data without any assumptions made by the framework. You can also position your file pointer randomly hence avoiding portions of data that you know are corrupt.
It's time for a new signature.
|
|
|
|
|
Thanks, I should try that.. Excuse my late reply and most importantly the vote.
Cheers,
Muammar.
|
|
|
|
|
No problems with late reply, and thanks for the feedback. I hope it works out for you.
It's time for a new signature.
|
|
|
|
|
Hi Code Gurus
I need to load the PDF document inside the c#.net Application. I tried with PDF Viewer. If i did any changes in PDF form Field i need to track that also. This is not possible in PDF Viewer. So i need any other Control or Way to load PDF inside the Application.
Please send me the Code snap or project link to resolve this problem.
Thanks in advance..
With Regards
"FAKEER"
|
|
|
|
|
Fakeer wrote: Please send me the Code snap or project link to resolve this problem.
Well Fakeer that is not going to endear you to the forum, asking for the code is frowned upon.
So if you need to edit the PDF you need a PDF EDITOR not a viewer. There are plenty of them around. try doing some research[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Here is a C# pdf viewer sample developed using a third party sdk called Black Ice.
My signature "sucks" today
|
|
|
|
|
Is there option to convert from System.Linq.IQueryable to DataTable with some sort of ToDataTable() function, and avoid looping? Both approaches on
http://www.c-sharpcorner.com/UploadFile/VIMAL.LAKHERA/LINQResultsetToDatatable06242008042629AM/LINQResultsetToDatatable.aspx gives me similar speed efect, but I need speeder. Actually I am wondering if there is something like http://msdn.microsoft.com/en-us/library/bb386921.aspx but with using System.Linq.IQueryable instead IEnumerable? I have few functions that sends System.Linq.IQueryable parameter to this function expecting DataTable[] in return.
Best Regards,
Zex
modified on Wednesday, May 26, 2010 6:26 AM
|
|
|
|
|
I did a search on the internet and found some posts.
This post might help you - it is not the exact solution you are looking for but is similar.
My signature "sucks" today
|
|
|
|
|
|
Thank you all, I have similar approach like one in http://peteohanlon.wordpress.com/2008/01/04/extending-linq/, and it is works. But I wonder (because of speed performance) about something like http://msdn.microsoft.com/en-us/library/bb386921.aspx (Creating a Custom CopyToDataTable<T> Method). They said "The existing CopyToDataTable methods only operate on an IEnumerable<T> source where the generic parameter T is of type DataRow. " but wondering is there something equivalent to CopyToDataTable method for IQueryable<T>? Probably not, but maybe somewhere someone offers equivalent method...
I have working function now, but looking for speeding it.
|
|
|
|
|
|
|
I have a project needs to help of people.
My project is : Neural networks use some character recognition ("0", "2", ..., "9") with the character of the image was prepared on the computer as different fonts.
appreciate the early response of people.
thanks.
|
|
|
|
|
read "how to get an answer" on this page. Then try again. Or not.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
And what have you implemented so far?
My signature "sucks" today
|
|
|
|
|
From the looks of it, just that post.
|
|
|
|