Click here to Skip to main content
15,891,409 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
Gerry Schmitz8-Jul-19 10:50
mveGerry Schmitz8-Jul-19 10:50 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
Mycroft Holmes8-Jul-19 11:31
professionalMycroft Holmes8-Jul-19 11:31 
AnswerRe: C# LINQ JOIN: Getting out of memory exception Pin
Dave Kreskowiak5-Jul-19 18:55
mveDave Kreskowiak5-Jul-19 18:55 
AnswerRe: C# LINQ JOIN: Getting out of memory exception Pin
lmoelleb9-Jul-19 22:42
lmoelleb9-Jul-19 22:42 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
Mou_kol14-Jul-19 0:34
Mou_kol14-Jul-19 0:34 
GeneralRe: C# LINQ JOIN: Getting out of memory exception Pin
lmoelleb14-Jul-19 10:41
lmoelleb14-Jul-19 10:41 
QuestionMouse delta Pin
MatrixRatrix4-Jul-19 0:14
MatrixRatrix4-Jul-19 0:14 
AnswerRe: Mouse delta Pin
BillWoodruff4-Jul-19 2:19
professionalBillWoodruff4-Jul-19 2:19 
0: disclaimer: I am not informed about how the use of threading may come into play here.

1: don't use a 'while loop: it's going to degrade performance: what you need in this case is a 'hook to get all Mouse Events ... either for a Form (WndProc), or for your app (App) ... or, for every running process (global).

2: why you need a 'hook: only the Control with Focus gets the WM_MOUSEWHEEL message; you can define an EventHandler to get the 'MouseWheel status:
C#
private void Form1_Load(object sender, EventArgs e)
{
    this.MouseWheel += OnMouseWheel;

    // assign other Controls the same EventHandler
    // dataGridView.MouseWheel += OnMouseWheel;
}

private int lastMWDelta;
private int lastMWClicks;

public Point lastMWPt;

public Control lastMWActiveControl;

private void OnMouseWheel(object sender, MouseEventArgs e)
{
    lastMWDelta = e.Delta;
    lastMWClicks = e.Clicks;
    lastMWPt = e.Location;
    lastMWActiveControl = sender as Control;

    Console.WriteLine($"wheel: control: {lastMWActiveControl.Name} delta: {lastMWDelta}");
}
If there are only specific Controls you want to get wheel events for: define the same type of EventHandler for those.

3: how do you implement a 'hook ?

a: first decide what type of 'hook is required.

b: read the articles here on CodeProject about 'hooks ... like: [^], [^], [^], [^]

Come back with code, and specific issues, or questions.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot

QuestionWPF MVVM Entity Framework(using code First Approach) Pin
Member 145206353-Jul-19 23:21
Member 145206353-Jul-19 23:21 
AnswerRe: WPF MVVM Entity Framework(using code First Approach) Pin
F-ES Sitecore3-Jul-19 23:28
professionalF-ES Sitecore3-Jul-19 23:28 
GeneralRe: WPF MVVM Entity Framework(using code First Approach) Pin
Member 145206354-Jul-19 2:48
Member 145206354-Jul-19 2:48 
GeneralRe: WPF MVVM Entity Framework(using code First Approach) Pin
Gerry Schmitz4-Jul-19 7:36
mveGerry Schmitz4-Jul-19 7:36 
GeneralRe: WPF MVVM Entity Framework(using code First Approach) Pin
Mycroft Holmes4-Jul-19 13:01
professionalMycroft Holmes4-Jul-19 13:01 
AnswerRe: WPF MVVM Entity Framework(using code First Approach) Pin
BillWoodruff4-Jul-19 2:22
professionalBillWoodruff4-Jul-19 2:22 
Questionindex was out of bound of the array Pin
Derbz3-Jul-19 16:50
Derbz3-Jul-19 16:50 
AnswerRe: index was out of bound of the array Pin
phil.o3-Jul-19 17:26
professionalphil.o3-Jul-19 17:26 
GeneralRe: index was out of bound of the array Pin
lmoelleb3-Jul-19 22:36
lmoelleb3-Jul-19 22:36 
AnswerRe: index was out of bound of the array Pin
OriginalGriff3-Jul-19 19:49
mveOriginalGriff3-Jul-19 19:49 
AnswerRe: index was out of bound of the array Pin
bVagadishnu5-Jul-19 7:03
bVagadishnu5-Jul-19 7:03 
QuestionTrying to use VS2017 C# and Excel2007. I need help understanding the error being reported Pin
Greg Gonzales2-Jul-19 19:15
Greg Gonzales2-Jul-19 19:15 
AnswerRe: Trying to use VS2017 C# and Excel2007. I need help understanding the error being reported Pin
OriginalGriff2-Jul-19 20:17
mveOriginalGriff2-Jul-19 20:17 
AnswerRe: Trying to use VS2017 C# and Excel2007. I need help understanding the error being reported Pin
Gerry Schmitz2-Jul-19 21:42
mveGerry Schmitz2-Jul-19 21:42 
AnswerRe: Trying to use VS2017 C# and Excel2007. I need help understanding the error being reported Pin
Maciej Los3-Jul-19 8:44
mveMaciej Los3-Jul-19 8:44 
Questionusing c# to copy files from clients to main server Pin
coderz322-Jul-19 12:34
coderz322-Jul-19 12:34 
AnswerRe: using c# to copy files from clients to main server Pin
BillWoodruff2-Jul-19 15:35
professionalBillWoodruff2-Jul-19 15:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.