Click here to Skip to main content
15,890,282 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Question on how to trap winform closing from VS designer Pin
Luc Pattyn15-Mar-11 4:24
sitebuilderLuc Pattyn15-Mar-11 4:24 
AnswerRe: Question on how to trap winform closing from VS designer Pin
Аslam Iqbal15-Mar-11 8:14
professionalАslam Iqbal15-Mar-11 8:14 
AnswerRe: Question on how to trap winform closing from VS designer Pin
Gregory Gadow15-Mar-11 12:46
Gregory Gadow15-Mar-11 12:46 
QuestionA quick threading question Pin
Alan Burkhart14-Mar-11 19:50
Alan Burkhart14-Mar-11 19:50 
AnswerRe: A quick threading question Pin
Groulien14-Mar-11 21:28
Groulien14-Mar-11 21:28 
GeneralRe: A quick threading question Pin
Alan Burkhart15-Mar-11 4:52
Alan Burkhart15-Mar-11 4:52 
AnswerRe: A quick threading question Pin
Luc Pattyn15-Mar-11 0:01
sitebuilderLuc Pattyn15-Mar-11 0:01 
GeneralRe: A quick threading question Pin
Alan Burkhart15-Mar-11 4:48
Alan Burkhart15-Mar-11 4:48 
Luc Pattyn wrote:
1.
I don't like Thread.Abort() as it may leave things in an unknown state. I prefer a cooperative way of terminating a thread, which implies the thread code itself checks an exit condition regularly (requiring some code, and causing some exit delay).

I wasn't sure exactly how to terminate the thread, and wasn't sure if I needed to explicitly end it in this case because it just ran through the "z" loop once and exited the sub. In a case like this, is the thread still alive once the sub has finished?

Luc Pattyn wrote:
2.
I detest empty catch blocks, I do appreciate you had a comment in there.
If all it does is cope with MakeThms possibly being Nothing, then better test for that explicitly.

I should have explained myself better in the comments. I don't usually leave empty catch blocks. I'm still studying in this area. If I do something like If MakeThms.Equals(Nothing) Then I get a null reference exception.

Luc Pattyn wrote:
3.
lvFiles.Invalidate() is forbidden in anything but the main thread. Don't tell me you are either running a very old .NET version (1.x) or have set lvFiles.CheckForIllegalCrossThreadCalls false? For your penitence read this[^].

I'm running .Net 3.5 / VS 2008 Express. I haven't set lvFiles.CheckForIllegalCrossThreadCalls to false. I do get an exception if I use lvFiles.Refresh(). I was pretty sure I shouldn't do this, but amazingly it worked. My primary test directory has 90 images, each 1900x1080 and about 800KB. It takes about 3 seconds to completely rewrite the ImageList. If I quickly select another directory in the TreeView before it's done, it appears to work without any problems. But I was curious since I was touching another thread. I'll dig into the linked article after posting here. Thanks!
Everybody SHUT UP until I finish my coffee...

AnswerRe: A quick threading question Pin
Luc Pattyn15-Mar-11 4:53
sitebuilderLuc Pattyn15-Mar-11 4:53 
GeneralRe: A quick threading question Pin
Alan Burkhart15-Mar-11 5:19
Alan Burkhart15-Mar-11 5:19 
AnswerRe: A quick threading question Pin
Luc Pattyn15-Mar-11 5:34
sitebuilderLuc Pattyn15-Mar-11 5:34 
GeneralRe: A quick threading question Pin
Аslam Iqbal15-Mar-11 8:18
professionalАslam Iqbal15-Mar-11 8:18 
QuestionAdo,vb .net datagridview datasource runtime Pin
Member 389234313-Mar-11 23:22
Member 389234313-Mar-11 23:22 
AnswerRe: Ado,vb .net datagridview datasource runtime Pin
Simon_Whale13-Mar-11 23:43
Simon_Whale13-Mar-11 23:43 
GeneralRe: Ado,vb .net datagridview datasource runtime Pin
Dalek Dave14-Mar-11 0:06
professionalDalek Dave14-Mar-11 0:06 
QuestionWriting to debug log Pin
cstrader23213-Mar-11 14:50
cstrader23213-Mar-11 14:50 
AnswerRe: Writing to debug log Pin
Luc Pattyn13-Mar-11 15:04
sitebuilderLuc Pattyn13-Mar-11 15:04 
AnswerRe: Writing to debug log Pin
Bernhard Hiller14-Mar-11 2:26
Bernhard Hiller14-Mar-11 2:26 
QuestionAccess to the registry key is denied. Pin
TornadoApps10-Mar-11 22:24
TornadoApps10-Mar-11 22:24 
AnswerRe: Access to the registry key is denied. Pin
Dalek Dave10-Mar-11 22:40
professionalDalek Dave10-Mar-11 22:40 
GeneralRe: Access to the registry key is denied. Pin
TornadoApps10-Mar-11 22:51
TornadoApps10-Mar-11 22:51 
GeneralRe: Access to the registry key is denied. Pin
riced10-Mar-11 22:57
riced10-Mar-11 22:57 
AnswerRe: Access to the registry key is denied. Pin
Zagarov18-Mar-11 7:22
Zagarov18-Mar-11 7:22 
Questionadding database while building setup file Pin
basheer.j10-Mar-11 9:33
basheer.j10-Mar-11 9:33 
AnswerRe: adding database while building setup file Pin
Dalek Dave10-Mar-11 10:09
professionalDalek Dave10-Mar-11 10:09 

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.