Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / DGDK.NET support under Visual Basic 6

Author
Message
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 14th Nov 2006 17:49
A recent request from a user was put to me regarding support for DGDK.NET to run under Visual Basic 6. Now I for one are no longer using this version purely because of the jump to .NET and the supported languages. But I've managed to successfully get VB6 to compile an application that uses the DGDK.NET toolkit. Attached is the sample VB6 project and the required dgdkGlobals.bas file that allows you to use the toolkit. You will need to have the DGDK.NET toolkit or component installed to run the application.

Now, for the bad news . Because of the way DGDK.NET works, you cannot run your VB6 applications from within the IDE, i.e. for debugging. The only reason for this is that when running from inside the IDE, obtaining the current process handle always returns the process handle to the VB6 runtime, and not the actual application. This was also a problem under .NET if you had the VSHost process flag enabled as well. Hence why the documentation specifically asks you to turn this feature off in Visual Studio.NET. I cannot find an alternative workaround for VB6 users running their applications in the IDE. So, to summarise, VB6 is supported, but you cannot run the application within the IDE for debugging a DGDK.NET project. If you Compile your VB6 app into an EXE, and run the EXE from outside the IDE, it works perfectly.

Again, I'm not going to spend any more time on this because of the benefits of upgrading to VB.NET and using the Express versions, but this is here for prosperity anyway.

Paul.

Attachments

Login to view attachments
tschwarz
19
Years of Service
User Offline
Joined: 13th Feb 2005
Location: 127.0.0.1
Posted: 14th Nov 2006 21:56
Paul,

Thank you for the time you spent on this, I needed it for an application that is currently written in VB6 and I was going to replace my shell to dbpro routines with it.
When I ran your test exe it gave me a Runtime error 445, object doesn't support this action but, as you said nuff time spent.

I have been running vb.net to test and learn DarkGDK .net So, far I really like DarkGDK .net. The only thing is I wished it came with an example of using it on a vb form. I'll play around with it for another week and if I can't figure it out I'll post on the forum and see if anybody else has done it.

again, thank you for your time
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 14th Nov 2006 22:07
ZK did some stuff with embedding a dgdk.net dx window in a winform

APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 14th Nov 2006 22:16
tschwarz, the error will be due to me compiling with version 1.0.6.0 of the DGDK.NET (I forgot about that) This update will be available publicly for customers when Rich uploads it onto the server.

Also, for placing onto a windows form, this is virtually identical to how my Winforms example is used. You basically need to use the hWnd argument of a form control, or even the form itself. If you look at the winforms code, you'll see that it's literally the same when calling the DGDK.NET functions.

Paul.

jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 15th Nov 2006 12:09
Apex,
A suggestion for the examples. It would be great if all the examples had both a C# and VB version, instead of some in VB and some in C#, the only one current that is both AFAIK is the tutorial one.

Cheers,

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 15th Nov 2006 16:10
jasuk70, as updates for the toolkit are released by TGC, I'll be adding new samples to the toolkit as and when they're completed, but thanks for the tip

Paul.

Login to post a reply

Server time is: 2024-06-29 04:25:34
Your offset time is: 2024-06-29 04:25:34