Even if I prevent the Java window from resizing dynamically and wait until the parent window is resized and then size the applet to fit, the flicker can still occur.Īny advice or alternative ideas would be appreciated. I am not sure if this is a 'feature' of the web control or not, but no amount of redraws at different points in the dynamic resize can fix this.
The flicker is not apparent in the applet when running in an HTML page, in a browser, during resize.
The problem with the current method is whenever the C# form window is resized, which resizes the HTML page, which in turn resizes the applet (all are set to fit 100%) then a flicker can sometimes develop in the embeded HTML page. This works OK but can anyone tell me if its possible to embed a Java applet directly into the C# application without the need for the WebBrowser Control ? I have a requirement to do something similar but in revese and I am looking for an alternative to my current method.Ĭurrently I have a C# application where I use the Microsoft WebBrowser Control and load an HTML page into that, which in turn has an embedded Java applet in the HTML page. To run the Java Application, use "java MyWindow " from the command line.
To Build the Project edit and use Build.BAT present in the downloadable Zip file above. SpBrowser->Navigate2(&vurl, &ve, &ve, &ve, &ve) #pragma warning(default: 4310) // cast truncates constant value #pragma warning(disable: 4310) // cast truncates constant value PUnk->QueryInterface(IID_IWebBrowser2, (void**)&spBrowser) Printf( " Create AtlAxWin Done.\n",pUnk) HWND hwndChild = ::CreateWindow( " AtlAxWin", In the 2nd Param you can use ProgID or UUID of any activex control. Printf( " Create AtlAxWin Begin.\n",pThreadParam->hwnd,pThreadParam->szURL) VOID CreateIEControl(ThreadParam *pThreadParam)