Is it possible to run a blitz3d or blitzmax app INSIDE (as a child of) a VB form / window?
Running Blitz3d or Max on a VB form?
Miscellaneous Forums/General Discussion/Running Blitz3d or Max on a VB form? If you have registered an activex object on your system such as the following it should be possible:
http://www.blitzbasic.com/toolbox/toolbox.php?tool=180
http://www.blitzbasic.com/toolbox/toolbox.php?tool=180
You dont need an active-x, just get the program HWND and set it as a child to your form HWND.
I literally did that both in VB and C++, so I could run any kind of program (even MS-Word) inside my form... in the C++ case, I could run anything inside Firefox ;)
I literally did that both in VB and C++, so I could run any kind of program (even MS-Word) inside my form... in the C++ case, I could run anything inside Firefox ;)
This would be the proper VB6 code. You'll need to alter the blitz window style with Get/SetWindowLong to remove the titlebar. Also destroy the blitz process when your app unloads.
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long WinExec App.Path & "\bb.exe", 1 win& = FindWindow("Blitz Runtime Class", "My App") SetParent win, Me.hwnd SetWindowPos win, 0, 0, 0, 0, 0, 1
@Eikon
Nice, just had to make sure the Blitz app had
AppTitle "My App"
and it works!
However how to prevent it the b3d window from showing prior to moving it inside the window
Nice, just had to make sure the Blitz app had
AppTitle "My App"
and it works!
However how to prevent it the b3d window from showing prior to moving it inside the window
The easiest way is to make the vb form topmost, so that it covers up the blitz window. You should also move the code above to a timer with at least 300ms delay to allow time for vb form to show.
Private sub timer1_timer() ' // Make VB form topmost SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 1 + 2 WinExec App.Path & "\bb.exe", 1 win& = FindWindow("Blitz Runtime Class", "My App") SetParent win, Me.hwnd SetWindowPos win, 0, 0, 0, 0, 0, 1 SetWindowPos Me.hwnd, 0, 0, 0, 0, 0, 1 + 2 Timer1.Enabled = False end sub
Hmm, still shows in middle then moves.
I wonder if there is a 'tidy' way of doing this?
Even if make the form invisible as it starts up-I still see the blitz window :-(
And of course I need the blitz app to be able to talk to the vb as vice versa...
I wonder if there is a 'tidy' way of doing this?
Even if make the form invisible as it starts up-I still see the blitz window :-(
And of course I need the blitz app to be able to talk to the vb as vice versa...
Try using Named pipes to communicate between the two applications. http://en.wikipedia.org/wiki/Named_pipe#Named_pipes_in_Windows
That page lists the relevant functions you should look up in MSDN.
That page lists the relevant functions you should look up in MSDN.
Does anyone know how to turn a *.blitz*.exe into a avi that can then be showed on any screen?(Forum) (Including input and output?)
Simulated ; Video memory screenshot to fileformat?
I used panno's webcam thing on traffic and they fined 200 people in a neirby city. (Rumor?) (Sattilite fines are still the best though)
The police here use sound to video. (6 mile range video per 3D spacial mass surface spot; fine per violation per square inch. Bankrupt? ) One illegal move on the map and you are notified. (Crime??) Gov.x
Simulated ; Video memory screenshot to fileformat?
I used panno's webcam thing on traffic and they fined 200 people in a neirby city. (Rumor?) (Sattilite fines are still the best though)
The police here use sound to video. (6 mile range video per 3D spacial mass surface spot; fine per violation per square inch. Bankrupt? ) One illegal move on the map and you are notified. (Crime??) Gov.x
do you want to do it dynamically on the fly.... if not camstudio pretty fine.