Click here to Skip to main content
16,005,206 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow to deploy a excel application Pin
zecodela9-Aug-01 18:25
zecodela9-Aug-01 18:25 
GeneralCopying files Pin
MARNEFFE Philippe7-Aug-01 9:27
MARNEFFE Philippe7-Aug-01 9:27 
GeneralRe: Copying files Pin
Cem Kalyoncu7-Aug-01 12:24
Cem Kalyoncu7-Aug-01 12:24 
GeneralRe: Copying files Pin
chris foote7-Aug-01 17:19
chris foote7-Aug-01 17:19 
QuestionChanging the clipboard from VB for applications? Pin
Daniel Fallman31-Jul-01 1:08
Daniel Fallman31-Jul-01 1:08 
GeneralMulti language Pin
30-Jul-01 23:19
suss30-Jul-01 23:19 
GeneralCoInitialize has not been called Pin
29-Jul-01 3:21
suss29-Jul-01 3:21 
GeneralRe: CoInitialize has not been called Pin
Sam C29-Jul-01 3:56
Sam C29-Jul-01 3:56 
What version of VB are you using? I have heard that using threads within VB6 is highly unstable and causes a lot of problems.

Here's a snippet from Dan Appleman, and the Desaware site:
Sigh... It seems that many readers missed my original point. The ideas was not to encourage VB programmers to use CreateThread with Visual Basic. It was to explain clearly and accurately why you shouldn't use CreateThread with Visual Basic.

So, when Visual Basic 6 turned out to be considerably less thread-safe than VB5, breaking the sample programs referenced by this article, what could I do? I suppose I could go back and revise the samples and try to make them work with VB6. But then the same problem might arise with later versions of Visual Basic as well. 

Visual Basic offers good support of multithreading including multithreaded clients in ActiveX servers (this is described quite thoroughly in the latest edition of my Developing COM/ActiveX components book). I strongly encourage you to stay within the rules defined by the Visual Basic documentation and not use the CreateThread API with Visual Basic.

For those who insist on pursuing CreateThread further, to start with you should eliminate all Declare statements and use a type library instead. I don't promise that this will fix the problem, but my initial testing indicates that it is a necessary first step.


If you want the entire article goto http://www.desaware.com/articles/threadingL3.htm, his articles are knowledgable, and he is also the guy who write Win32API for Visual Basic programemrs. Have a copy of that on my desk, err...wait, no, yeah, I'm a pure VC++ programmer =)


Sam C
----
Systems Manager
Hospitality Marketing Associates
GeneralRe: CoInitialize has not been called Pin
Sam C29-Jul-01 4:00
Sam C29-Jul-01 4:00 
GeneralRe: CoInitialize has not been called Pin
29-Jul-01 19:50
suss29-Jul-01 19:50 
GeneralRe: CoInitialize has not been called Pin
Klaus Probst7-Aug-01 15:33
Klaus Probst7-Aug-01 15:33 
GeneralList Boxes Pin
27-Jul-01 5:08
suss27-Jul-01 5:08 
GeneralRe: List Boxes Pin
Klaus Probst7-Aug-01 15:33
Klaus Probst7-Aug-01 15:33 
GeneralRe: List Boxes Pin
Jason Teagle20-Aug-01 1:07
Jason Teagle20-Aug-01 1:07 
GeneralRe: List Boxes Pin
7-May-02 18:49
suss7-May-02 18:49 
GeneralDirectx Immediate Mode Visual Basic Pin
23-Jul-01 5:12
suss23-Jul-01 5:12 
GeneralAs Any Data Type Pin
Michael Cocozza17-Jul-01 4:32
Michael Cocozza17-Jul-01 4:32 
GeneralRe: As Any Data Type Pin
27-Jul-01 13:51
suss27-Jul-01 13:51 
GeneralRe: As Any Data Type Pin
Klaus Probst7-Aug-01 15:41
Klaus Probst7-Aug-01 15:41 
GeneralVB/VBA and C++ classes Pin
Alberto Bar-Noy17-Jul-01 4:23
Alberto Bar-Noy17-Jul-01 4:23 
GeneralRe: VB/VBA and C++ classes Pin
Ulf Öhlén18-Jul-01 23:16
Ulf Öhlén18-Jul-01 23:16 
GeneralRe: VB/VBA and C++ classes Pin
Klaus Probst7-Aug-01 16:00
Klaus Probst7-Aug-01 16:00 
GeneralDrawing things Pin
16-Jul-01 11:56
suss16-Jul-01 11:56 
GeneralRe: Drawing things FAST Pin
CodeCrafty®17-Jul-01 21:59
CodeCrafty®17-Jul-01 21:59 
GeneralRe: Drawing things FAST Pin
Cem Kalyoncu7-Aug-01 12:16
Cem Kalyoncu7-Aug-01 12:16 

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.