Taskdialog without an Form |
Post Reply |
Author | |
Herbie
Newbie Joined: 14 July 2008 Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 08 January 2009 at 5:36am |
Hi together!
Is it possible to use an TaskDialog without an Control an a Form in an DLL? Thanks and Best Regards Frank |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
This appears to work:
1) Start VB6 and create a new ActiveX DLL project. 2) Click the project menu, and then click References. 3) Click the Browse button. 4) Navigate to the Codejock OCX folder (%programfiles%\Codejock Software\ActiveX\Xtreme SuitePro ActiveX vXXX\Bin\). 5) From the "Files of type" list, select "ActiveX Controls (*.OCX)". 6) Select the "Codejock.Controls.Unicode.vXXX" or "Codejock.Controls.vXXX" OCX (the choice depends on your Unicode requirements), and then click Open. 7) Click OK. Now add the following code to your DLL class:
Compile & Reference your DLL in another project, and then create an instance of your class and call ShowTaskDialog. The Task Dialog will appear. You can then add properties to control the dialog appearance as required. NOTE: Due to a bug in the VB6 IDE, the next time you go to the project references screen, you will NOT see the XtremeSuite Controls reference selected, even though it IS selected. You can confurm that it is selected by trying to select the reference again (You will get a name conflicts with existing project or llibrary error). |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Jason: What would be the advantage of using a DLL? Do I still have to register XtremeSuiteControls.ocx ?? If you still have to, you can better use:
Dim td
Set td = CreateObject("Codejock.TaskDialog.12.1.0")
td.MainInstructionText = "This is a test"
td.ShowDialog I don't need control on form, just create it on the fly...
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Hi Aaron,
I guess the advantage of putting the TaskDialog code in your own ActiveX DLL would be that you could add special/custom behaviour that could then be shared across all of your projects (that reference the DLL). For example, perhaps you always want to have the same Markup appear on part of the TaskDialog...You code it once in your DLL and then many projects can use that same look without any dupicated code. The reason I chose the Project menu > References method instead of CreateObject is that my method is Early Bound instead of Late Bound, which is faster (although how much of a difference you would notice on a modern processor, I am not sure). It also has the benefit of keeping the IDE Intellisense working, whereas your Dim td (as variant or as object) method does not. If you aren't the type to find Intellisense useful (some people don't), then this may not be a benefit. I also use the Project > References method instead of Project > Components because if the Project > Properties > Make tab > Remove information about unused ActiveX controls option is selected (which it is by default), then I *think* this causes problems with the compiled executable since the control doesn't appear on any forms (so the reference will be removed, and the code won't work). I actually haven't confirmed this in a long, long time, so my memory may be faulty here, and it might not actually be a problem. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Herbie
Newbie Joined: 14 July 2008 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Hi together!
Thanks a Lot! I works fine. Best Regards from Germany Frank |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |