Board index » Visual Studio » VB6 Multithreading...
|
tbartlett
|
VB6 Multithreading...
Visual Studio73
I know, I know.... Don't do it :) Well... Unfortunately I don't have a lot of choice... ;) OK, so I'm working on changing some of our existing applications to use a multithreaded model using the correct method of seperate ActiveX exe's and NOT that nasty CreateThread API... Tis a daunting task and that's no joke!! For the most part I've got it working fine.. I instantiate the exe, call the method I need and the carry on doing other stuff. When my method is done it sends an event back to my form and Bob's your auntie.. All nice & it doesn't block my apps GUI at all :) Now, some of our forms are VERY complex, and contain a lot of controls for which we have written wrappers to extend their functionality. (Please don't ask why they're not OCX's... there were reasons at the time! ;) ). What I'd like to do is rather than setup these controls in my form, which take a while as some are comboboxes which populate themselves with reference data, I'd like to set them up in my activex exe, and let that deal with any data validating etc, leaving my form as just a communications layer between different ActiveX exe's. All was working well until I tried to pass an instrinsic control to the ActiveX exe... It seems I cannot send an object by it's specific type (such as a TextBox), as these controls are instantiated privately... The only way is to send as an Object, which means late-binding (yuk)... The end result required is a responsive GUI that doesn't freeze everytime anything that takes more than a split second is done, hence the idea of using multiple threads to do the work... So, to my question... Is there any way of sending the intrinsic control rather than a more generic object to an ActiveX exe? I'm not too worried about cross-process communication overhead, anything's an improvement over the current sluggish way our app runs, I'd just rather not have the additional overhead of late binding too, besides, intellisense doesn't work then... Any suggestions? (And sorry about the length of the post)... Thanks Lorne - |
