A1VBCode Forums

Please Help Me In Activex Control


http://a1vbcode.com/vbforums/Topic15515.aspx

By khalsainfotechs - 12/20/2005

I am making active x control in that i put one form and funtion like show form

i want that when i put that ocx file in my project and call show function every time new form show but my problem is that i put two ocx in my project and my code are below

private sub cmd1_click()

ocx1.show

end if

private sub cmd2_click()

ocx2.show

end if

BUT IT SHOW SAME FORM EVERY TIME

PLS HELP

By true_innocent_hero - 6/30/2007

Mr.

You must need to use the following...



Dim Form As New FormNameGoesHere

Form.Show



Add the above code in your OCX1.show method.

FormNameGoesHere means that, you must write here the name of form etc. Form1,,,,,



Now when ever you call the function



OCX1.Show it will show a new form.



Innocent