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.

DarkBASIC Professional Discussion / Visual Basic integration

Author
Message
rapscaLLion
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 28th Nov 2002 00:05 Edited at: 7th Apr 2014 23:33
Basically, is it possible?

Think of Photoshop, all the menus and toolwindows floating around, while the actual image being edited is in another floating window. How would I go about putting the contents of a DBP screen (probably a "hidden" type program executed by VB) into a floating VB window like that? I can understand that you have to use memblocks and such for data transfer, but how exactly would I do this? Any suggestions? (I have the VB/DB toolkit from Andreas Mattsson, but I don't understand it )
hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 28th Nov 2002 00:13
hmm, don't really get what you mean, are you trying to pass information from dark basic to visual basic when both screens are up and floating?

your birth was a blessing, sent to live and die on earth as a lesson, we each have a star all you have to do is find it, once you do, everyone who sees it will be blinded - DMX
rapscaLLion
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 28th Nov 2002 01:07 Edited at: 7th Apr 2014 23:33
well... not really. You know the "hidden program" type of executable in DBP? Well I want a "Hidden" type program in DB, which the VB program will execute.
Then, whatever the hidden DB program renders, is displayed in a floating... or non floating window in VB.
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 28th Nov 2002 01:12
You would need to get the running DBPro window handles and/or get the DX handle, grab the screen and then paste it into your VB program.

Not fun...

Or you could get the DBPro program to continually grab the screen and dump it to, say, the clipboard and then get the VB part to get it out again...

Not fun either...

Good news everybody! I really am THAT good...
rapscaLLion
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 28th Nov 2002 03:43 Edited at: 7th Apr 2014 23:33
ya... ok, say I could capture the screen to a memblock in DB. How would I go about pasting it onto a VB window?
Hubdule
21
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 28th Nov 2002 09:38
It's easy to render a DBP prog in a VB window.
Do the following:
Create a DBPro prj. in windowed mode and set the borders to 0 so it's just a blank render window. Position that window at the location 0,0 on screen. Give it a name you easily can remember.

Then create a program in VB. Try the FINDWINDOW API to find your DBPro window handle. If you found it then use the SETPARENT API to set a new DBPro window parent e.g a message box on a form. Voila ... that's it. Your DBPro prog runs in a VB window. Ah yes and don't forget to terminate the DBPro process if you end your VB program ... just use the SENDMESSAGE api and send a WM_CLOSE message to the DBPro window handle. Otherwise you will run an instance of your DBPro program every time you run your VB prog.

The communication between the two programs could be done via memory,Clipboard or files.

Hope that helps you with your problem. I made an ActiveX control for IE to run a DBPro prog in IE's window maybe a 3d homepage hehe ...

Kohai of UWDesign
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: France
Posted: 28th Nov 2002 11:43
Hub > or 3d online gaming

Can we get a link to this activeX control ???

[Kohai]
[url]www.underwaredesign.com[url] [url]kohaistyle.com[url]
pIII 733/256 Ram/Geforce 256
rapscaLLion
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 28th Nov 2002 15:06 Edited at: 7th Apr 2014 23:33
interesting... you mean I should size the DBP window from code with that screen size command thing?
Hubdule
21
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 28th Nov 2002 15:49
@rapscaLLion: The above method works best with just "WINDOWED" apps.

@Kohai: I'm currently at work. Just send me an email to hubdule@colorarts.de and I'll send it to you this evening. Otherwise I'll surely forget that

rapscaLLion
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 29th Nov 2002 00:04 Edited at: 7th Apr 2014 23:34
arg! How do you use setwindow api... I figured out findwindow... I need examples

Login to post a reply

Server time is: 2024-05-04 01:08:10
Your offset time is: 2024-05-04 01:08:10