Desaware Home
Products    Purchase    Publishing    Articles   Support    Company    Contact    
Product FAQ
Licensing System
CC Factory
Event Log Toolkit
IniFile Tool-5M
NT Service Toolkit
OneTime Download
VBX Legacy
Professional Services


Contact Desaware and order today

Sign up for Desaware's Newsletter for the latest news and tech tips.

SpyWorks Support

Frequently Asked Questions - Background Threads

  1. I get a licensing error when I distribute an EXE I created using dwbackthread and the required files to another system and run it.
  2. I keep getting a run-time error when using dwbackthread to create background threads

1. I created an EXE that uses the dwbackthread component. It works fine on my system, but when I distribute the EXE and required files to another system and run it, I get a licensing error:

Runtime error -2147191504 (80047530)
This component is not licensed for use in this environment

There was a bug with the way the dwbackthread component was licensed for EXEs. Download the latest dwbackthread component by running the Update utility or contact Desaware if you have a firewall or proxy server that may prevent the Update utility from working

2. I use the dwBackThread component to create background threads. But if my application tries to display a modeless form, I get the following run-time error 406:

"Non-modal forms cannot be displayed in this host application from an ActiveX DLL, ActiveX Control, or Property Page."

This is a known Microsoft bug that has been fixed with Visual Studio Service Pack 4 (see Q257664 in Microsoft Product Support).

You can download the Service Pack from There is also a workaround if you do not have or do not want to use Service Pack 4. The workaround is instead of using:

Form1.Show vbModeless 

Declare the following:

Private Declare Function ShowWindow& Lib "user32" 
(ByVal hwnd As Long, ByVal nCmdShow As Long) 
   Private Const SW_SHOWNORMAL& = 1 

Then use the following code:

Load Form1 
lres = ShowWindow(Form1.hwnd, SW_SHOWNORMAL) 

to display the form as modeless.

Products    Purchase    Articles    Support    Company    Contact
Copyright© 2012 Desaware, Inc. All Rights Reserved.    Privacy Policy