Well, i have a problem with an ActiveX OCX.
I have an OCX and this open a form non-modal on the Internet Explorer, and
the app generate an strange error:
Non-modal forms cannot be displayed in this host application from an
ActiveX DLL (Error 406)
I need open this form in non-modal model, but i dont want this control
compiled in ActiveX Exe.
Any solution?
Regards and sorry for my bad english.
Flávio
Add this to the form you want to show (you can drop in a bas module if you want but it's
convenient to have it in the form itself)
'=======================Form2 here
Option Explicit
Public Enum ShowWinStates
SW_HIDE = 0
SW_SHOWNORMAL = 1
SW_NORMAL = 1
SW_SHOWMINIMIZED = 2
SW_SHOWMAXIMIZED = 3
SW_MAXIMIZE = 3
SW_SHOWNOACTIVATE = 4
SW_SHOW = 5
SW_MINIMIZE = 6
SW_SHOWMINNOACTIVE = 7
SW_SHOWNA = 8
SW_RESTORE = 9
SW_SHOWDEFAULT = 10
SW_FORCEMINIMIZE = 11
SW_MAX = 11
End Enum
Private Declare Function ShowWindow Lib "user32" _
(ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Public Sub ShowForm(State As ShowWinStates)
Call ShowWindow(Me.hWnd, State)
End Sub
'=======================
...and then, to use it, do something like....
'=========
Private Sub Command1_Click()
Call Form2.ShowForm(SW_SHOWMAXIMIZED)
End Sub
'=========
--
Ken Halter - MS-MVP-VB - http://www.mvps.org/vbsight - Please keep it in the groups..
"Marcem" <mont...@terra.com.br> wrote in message
news:u5c#t$GADHA...@TK2MSFTNGP10.phx.gbl...
PRB: Modeless Forms in VB ActiveX DLL's Don't Display in VC++ Clients
http://support.microsoft.com/default.aspx?scid=kb;en-us;247791
It works. You'll go to heaven.
I hope, you can understand what I mean.
Thanks Thanks Thanks
"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> escreveu na mensagem
news:ODqKZWHA...@TK2MSFTNGP12.phx.gbl...
Whew!.... That's a load off of my mind. I was starting to get worried ;-)
> I hope, you can understand what I mean.
Just kidding <g>
> Thanks Thanks Thanks
You're welcome! :-)