Click here to Skip to main content
15,911,646 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Open CVS file in text Pin
Richard MacCutchan24-Jun-13 22:38
mveRichard MacCutchan24-Jun-13 22:38 
AnswerRe: Open CVS file in text Pin
MaulikDusara26-Jun-13 8:55
MaulikDusara26-Jun-13 8:55 
QuestionClick a main thread button from a background thread Pin
treddie24-Jun-13 20:41
treddie24-Jun-13 20:41 
AnswerRe: Click a main thread button from a background thread Pin
Bernhard Hiller24-Jun-13 22:21
Bernhard Hiller24-Jun-13 22:21 
GeneralRe: Click a main thread button from a background thread Pin
treddie24-Jun-13 23:24
treddie24-Jun-13 23:24 
AnswerRe: Click a main thread button from a background thread Pin
GuyThiebaut24-Jun-13 22:43
professionalGuyThiebaut24-Jun-13 22:43 
GeneralRe: Click a main thread button from a background thread Pin
treddie24-Jun-13 23:47
treddie24-Jun-13 23:47 
GeneralRe: Click a main thread button from a background thread Pin
treddie25-Jun-13 19:40
treddie25-Jun-13 19:40 
After studying this for a while, It seems that setting up an action and an extension is really just a simplification of doing an explicit delegate and attaching a method to it. So my existing code should do the same thing, then, except that I think I have the guts wrong in the Run() procedure and other places. Unless my assumptions are wrong, it seems that before I jump into Actions and Extensions, I need to understand the explicit delegate approach.

UPDATE: I am running your extensions idea, and I can get the b/g thread to run a task, but I am still not getting the button to respond, once I have the main thread caught in a long task. I was thinking that part of my problem is that I don't think the background thread is monitoring mouse behavior. When I start the program, the Form_Load sub starts the background thread, which gets the delegate going and the Run() sub is called. Even if I make the Run() procedure a continuous loop, it is going directly to the button click procedure every time, regardless of whether or not I have clicked the button. That part seems to make sense...Why would I WANT it to keep looping through the click event?! So I think I have one choice in that respect:

1. Have the Run() procedure monitor mouse behavior continuously, and when any button is clicked, check sender and only go to the Pause_Continue button click handler when it was the button in question. A monitor like that sounds like some sort of event listener. Not sure how to do that without some API functions.

UPDATE 2: After researching some more, it looks like maybe something involving WithEvents could work.

UPDATE 3: Now it looks more like AddHandler/RemoveHandler is the way to go.

modified 26-Jun-13 5:21am.

QuestionVB6 DataGrid Bookmark Error Pin
Member 981947024-Jun-13 10:27
Member 981947024-Jun-13 10:27 
AnswerRe: VB6 DataGrid Bookmark Error Pin
Eddy Vluggen25-Jun-13 9:59
professionalEddy Vluggen25-Jun-13 9:59 
AnswerHow to detect UTF-8-based encoded strings Pin
diegosendra24-Jun-13 9:33
diegosendra24-Jun-13 9:33 
SuggestionRe: How to detect UTF-8-based encoded strings Pin
Richard Deeming24-Jun-13 9:51
mveRichard Deeming24-Jun-13 9:51 
GeneralRe: How to detect UTF-8-based encoded strings Pin
diegosendra24-Jun-13 10:30
diegosendra24-Jun-13 10:30 
GeneralRe: How to detect UTF-8-based encoded strings Pin
Roy Heil24-Jun-13 11:08
professionalRoy Heil24-Jun-13 11:08 
GeneralRe: How to detect UTF-8-based encoded strings Pin
diegosendra24-Jun-13 11:15
diegosendra24-Jun-13 11:15 
GeneralRe: How to detect UTF-8-based encoded strings Pin
Richard MacCutchan24-Jun-13 20:33
mveRichard MacCutchan24-Jun-13 20:33 
QuestionCombine Printjobs Pin
tolarion24-Jun-13 2:23
tolarion24-Jun-13 2:23 
AnswerRe: Combine Printjobs Pin
Dave Kreskowiak24-Jun-13 4:05
mveDave Kreskowiak24-Jun-13 4:05 
GeneralRe: Combine Printjobs Pin
tolarion24-Jun-13 4:46
tolarion24-Jun-13 4:46 
GeneralRe: Combine Printjobs Pin
Dave Kreskowiak24-Jun-13 7:16
mveDave Kreskowiak24-Jun-13 7:16 
GeneralRe: Combine Printjobs Pin
tolarion24-Jun-13 10:02
tolarion24-Jun-13 10:02 
GeneralRe: Combine Printjobs Pin
Dave Kreskowiak24-Jun-13 11:58
mveDave Kreskowiak24-Jun-13 11:58 
GeneralRe: Combine Printjobs Pin
tolarion24-Jun-13 12:24
tolarion24-Jun-13 12:24 
GeneralRe: Combine Printjobs Pin
Dave Kreskowiak24-Jun-13 15:39
mveDave Kreskowiak24-Jun-13 15:39 
GeneralRe: Combine Printjobs Pin
tolarion24-Jun-13 22:50
tolarion24-Jun-13 22:50 

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.