|
-
Jun 3rd, 2002, 09:58 AM
#1
Thread Starter
New Member
ActiveX EXE showing form
I'm using software Data Junction and they recommend creating COM's for showing any components. I tried creating ActEXE that show forms with Combo Box and few other features, but when I try calling the form, that doesn't work. I'm new in creating COM's, so I need a little help. I have a Method in that class for showing the form. Can I do that or I need something special?
Thanks
Ana
-
Jun 3rd, 2002, 10:16 AM
#2
Is your form and your class in the ActiveX exe? Just add a function in the Class to show the form. Although you wont be able to access the ActiveX Form's properties from the Project.
-
Jun 3rd, 2002, 10:46 AM
#3
Thread Starter
New Member
Form and the class are in ActiveX EXE, and I tried function for showing form, it didn't work. Any other suggestions?
-
Jun 3rd, 2002, 11:38 AM
#4
This code assumes the class is called cShowMe and the form is called frmShowMe in the ActiveX Exe
VB Code:
'in the class
Public Sub ShowForm()
frmShowMe.Show
End Sub
'in the project you are calling it from
'first make sure you referenced the activex component
Private Obj as New cShowMe
Private Sub Form_Load()
Obj.ShowForm
Me.ZOrder 1
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set Obj=Nothing
End Sub
If you are running this in the IDE then make sure when you do to shrink the IDE window. Since the form is being called from the ActiveX Exe and not the application directly then it doesn't always move to the front of the ZOrder. I've found that it's best to use something like SetForeGroundWindow to make sure it comes to the front.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|