Click here to Skip to main content
15,901,122 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: help! Pin
daredevil_beware164-Jun-07 3:11
daredevil_beware164-Jun-07 3:11 
GeneralRe: help! Pin
Sathesh Sakthivel4-Jun-07 3:18
Sathesh Sakthivel4-Jun-07 3:18 
GeneralRe: help! Pin
daredevil_beware164-Jun-07 3:22
daredevil_beware164-Jun-07 3:22 
GeneralRe: help! Pin
Sathesh Sakthivel4-Jun-07 3:36
Sathesh Sakthivel4-Jun-07 3:36 
GeneralRe: help! Pin
daredevil_beware164-Jun-07 23:46
daredevil_beware164-Jun-07 23:46 
AnswerRe: help! Pin
leckey4-Jun-07 3:59
leckey4-Jun-07 3:59 
GeneralRe: help! Pin
daredevil_beware164-Jun-07 23:51
daredevil_beware164-Jun-07 23:51 
QuestionCan't shut down ocx Pin
sprice864-Jun-07 0:14
professionalsprice864-Jun-07 0:14 
Hi I wonder if any kind person out there may be able to help me.
I am writing an ocx (vb6), in which it is necessary to watch for directory and file changes.
Ths is done by creating a new thread and then using ReadDirectoryChangesW and WaitForSingleObject to do the watching. This works perfectly, but when the calling .exe shuts down, I have to be able to destroy this thread, and that is where the trouble starts.

Once this new thread is started if I attempt to shut down the calling application, the ocx does not terminate. Although it is sent a WM_NCDESTROY message by the caller, VB seems to intercept this and it never arrives at the ocx's window proc. The ocx's terminate event is not called either and the caller continues to run (albeit without a window). If I use the End directive in the IDE, VB crashes, and if I run it as a compiled exe, it does not terminate.

Does anyone know if it is possible to detect that the calling app wants to shut down so that I can destroy the extra thread created by the ocx and allow a normal shut-down to take place.

Any help would be appreciated as I am horribly baffled.

Confused | :confused:

Bertram

AnswerRe: Can't shut down ocx Pin
CPallini4-Jun-07 0:23
mveCPallini4-Jun-07 0:23 
GeneralRe: Can't shut down ocx Pin
sprice864-Jun-07 2:58
professionalsprice864-Jun-07 2:58 
QuestionScreen Capture a Certain Application Pin
Ian Uy3-Jun-07 22:48
Ian Uy3-Jun-07 22:48 
AnswerRe: Screen Capture a Certain Application Pin
Dave Kreskowiak4-Jun-07 3:54
mveDave Kreskowiak4-Jun-07 3:54 
GeneralRe: Screen Capture a Certain Application Pin
Ian Uy4-Jun-07 11:14
Ian Uy4-Jun-07 11:14 
GeneralRe: Screen Capture a Certain Application Pin
Dave Kreskowiak4-Jun-07 14:05
mveDave Kreskowiak4-Jun-07 14:05 
Questionproblem in loading the project Pin
Prakash_Mishra3-Jun-07 21:25
Prakash_Mishra3-Jun-07 21:25 
AnswerRe: problem in loading the project Pin
Dave Kreskowiak4-Jun-07 3:52
mveDave Kreskowiak4-Jun-07 3:52 
GeneralRe: problem in loading the project Pin
Prakash_Mishra4-Jun-07 20:53
Prakash_Mishra4-Jun-07 20:53 
Questionhow can i create connection and do the operation in vb Pin
koolprasad20033-Jun-07 21:10
professionalkoolprasad20033-Jun-07 21:10 
AnswerRe: how can i create connection and do the operation in vb Pin
originSH3-Jun-07 23:24
originSH3-Jun-07 23:24 
Questionerror with thread Pin
WhiteGirl233-Jun-07 20:58
WhiteGirl233-Jun-07 20:58 
AnswerRe: error with thread Pin
Dave Kreskowiak4-Jun-07 3:44
mveDave Kreskowiak4-Jun-07 3:44 
GeneralRe: error with thread Pin
WhiteGirl234-Jun-07 20:23
WhiteGirl234-Jun-07 20:23 
GeneralRe: error with thread Pin
Dave Kreskowiak6-Jun-07 16:29
mveDave Kreskowiak6-Jun-07 16:29 
QuestionProgressBar Thread Pin
ayeleteric3-Jun-07 19:56
ayeleteric3-Jun-07 19:56 
AnswerRe: ProgressBar Thread Pin
Christian Graus3-Jun-07 20:25
protectorChristian Graus3-Jun-07 20:25 

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.