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.

DLL Talk / Passing BlueGUI control handle to VB.NET

Author
Message
MoomanFL
19
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 24th Sep 2007 14:12
I have plugin DLL I have written in VB.NET that I am using to test some ideas I have. I have gotten the commands to work in DBPRo to show a message box when I use the command.

I am now working on a concept test command to send the handle of a BlueGUI2 panel control to the DLL, and then I want to add controls manually using .NETs System.Windows.Forms.Control.Add() function.

The problem I am stuck at, is how to pass the handle. VB.NET wants the value as a System.IntPtr value. I try the following code in the DLL:



And the sub is called in DBPro as such:



Unfortunately the whole thing compiles just fine, but pukes on me when it trys to run the program. Any clue how I might pass this handle so that .NET can utilize it? I am using .NET 2005

Design documents?!? What design documents??? I thought we were just going to wing it!!!
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 24th Sep 2007 15:29
In my experience with writing many vb.net plugins for dbp, they always need some form of conversion before they can be called from dbp. I use ZKAT8IT's dll converter which decompiles the original dll, modifies the MSIL, adds a string table, then recompiles the dll for use as a dbp plugin. I think this process is going to be necessary for you as well, regardless of the blue gui component or not.

My DBP plugins page is now hosted [href]here[/href]
MoomanFL
19
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 24th Sep 2007 15:33
I already have the DLL converted and can call and use the functions from it within DBPro.

The problem is knowing how to convert the "handles" that BlueGUI gives to something that VB.NET can use. VB.NET expects handles to be of the System.IntPtr type.

Design documents?!? What design documents??? I thought we were just going to wing it!!!

Login to post a reply

Server time is: 2024-11-22 22:05:57
Your offset time is: 2024-11-22 22:05:57