View Full Version : Visual Basic AND Wrapper Problem
4th October 2001, 23:32
I'm writing a plugin with Visual Basic and I'm using GenWrapper.
I ran into the following problem: I can only show forms if and only if they are modal, so while the form is open I can't use the rest of the programs. I wonder If there is a way to cancel this behauvior
27th December 2001, 23:39
I get the same problem, I guess the guy who wrote GenWrapper didn't think about that. But I searched MSDN and found a page that said that some programs doesn't allow non-modal forms with ActiveX DLLs, and it didn't say what to do to get around the problem. All it told me to do was this:
If App.NonModalAllowed Then
.. and that made the form Modal. But if a Winamp plugin's form is modal, it goes on top of Winamp and doesn't let the user work with Winamp while the form is shown (like the messageboxes goes on top of forms)! So my plugin is going to be in the systray only, and if the user wants to s/he can open the form through the popupmenu of the systray icon.
5th January 2002, 18:55
Public Declare Function ShowWindow Lib "user32.dll" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Const SW_HIDE = 0
Public Const SW_MAXIMIZE = 3
Public Const SW_MINIMIZE = 6
Public Const SW_RESTORE = 9
Public Const SW_SHOW = 5
Public Const SW_SHOWMAXIMIZED = 3
Public Const SW_SHOWMINIMIZED = 2
Public Const SW_SHOWMINNOACTIVE = 7
Public Const SW_SHOWNA = 8
Public Const SW_SHOWNOACTIVATE = 4
Public Const SW_SHOWNORMAL = 1
Use it like this:
ShowWindow Form1.hwnd, SW_SHOW
ShowWindow Form1.hwnd, SW_HIDE
Put that in IRjlWinAmpGenPlugin_Initialize and your form will show up modally when Winamp starts! Use the same code to open the Configure window too.. It works perfectly!! I love APIs :D
28th March 2002, 09:30
Ok I have a problem with the forms created with this. I can set Visable = FALSE but when I set the form visibility to TRUE I get an ActiveX error. Doesn't anyone have a solution for this in VB6? I'm trying to minimize my form into the System Tray.
29th March 2002, 11:47
Have you tried to hide the form using this..
ShowWindow Form1.hwnd, SW_HIDE.. and SW_SHOW to show it again? I think that worked for me :)
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.