Hello,
I trying to embed a window running on the desktop in a form. The test app is simple a form with a button and a frame. The code below is attached to the "Start" button. I'm running Gambas 3.9.1 under Mint 17 with the Mate desktop. What is the correct syntax for the Desktop.FindWindow command. I used the title shown on the open window I want to embed. Not sure that was correct. Thanks, Marty <Code> Gambas class file Public Sub btnStart_Click() Dim hEmbedder As Embedder Dim iWindowinfoArray As Integer[] hEmbedder = New Embedder(iqpy) As "Panadapter" Print Desktop.ActiveWindow * iWindowinfoArray = Desktop.FindWindow("IQ.PY v. 0.30 de AA6E") hEmbedder.Embed(iWindowinfoArray[0]) End Iqpy is the name of the frame on the form. The error occurs at the line marked with the *. =======================<Error>========================================= 50331653 < Result obtained for the active window (Print Desktop.ActiveWindow) The program 'Panadapter' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 672 error_code 3 request_code 20 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user