Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

From .exe to .dll

Status
Not open for further replies.

kencat742

Programmer
Jun 30, 2005
23
US
I recently discovered that the program I just finished now needs to be an ActiveX .dll instead of the standard .exe I had created it as. It has to be a .dll in order to run inside a data analysis program (MetaMorph). I think I have the forms and modules transfered correctly over to the .dll file however when I go to run the program it tells me that "non-modal forms cannot be displayed" the forms I have are a splash screen to browse for a file and then another form with textboxes and command buttons. If anybody has good links for (1) explaining the difference between modal and non-modal forms or (2) explaining how to change my forms to modal

I have looked at the msdn website and done a google search; however, I have not found anything which explains in simple terms. I hope that I have given enough information about what I need, if not I can do my best to explain more about my program.

Thanks for any help you can give :)
-Kendra

You've heard about the computer programmer that died while washing his hair in the shower. The instructions said, 'Lather, rinse, repeat.'
 
Kendra:

Form1.Show vbModal

That should do it.

Hope this helps.



Ron Repp
 
A little more info: modal forms hold focus to themselves until they are closed. Non-modal forms do not. An example of a modal form that you probably already know is the one shown by the MsgBox function.

To clarify the difference if you need to, just create a new project. Add a command button to form1, and add another form, form2, to your project. Have your command button show form2. Run the program, click the command button. note that you can click on either form1 or form2. now, have the command button show form2 modally (use Ron's example). Do as before, and now try to click on form1 again. You'll find that you can't. That's the difference. Note that the modal behavior is restricted to the forms in your application. If you have another application with other forms in it, you can click on that.

HTH

Bob
 
I think I understand the difference now.

Am I going to have to start over with my form with all the textboxes and command buttons to make it modal or is there something in the properties which will do it?

Thanks :)

~Kendra

You've heard about the computer programmer that died while washing his hair in the shower. The instructions said, 'Lather, rinse, repeat.'
 
RonRepp has given you all you need to do. :) Just add the vbModal argument to the Show method.
 
Thanks, I'll try that today at work, I've been out of the office for the past few days and havent had a chance to work on the program.

You've heard about the computer programmer that died while washing his hair in the shower. The instructions said, 'Lather, rinse, repeat.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top