|
-
Feb 11th, 2006, 07:55 AM
#1
Thread Starter
Junior Member
Active X and IE
I have created an Active X object in VB6 but, when trying to run it, Internet Explorer (version 6) opens and prevents it from being run in VB. When I 'tell Internet Explorer to 'unblock' it, the object is displayed in the Browser and not in VB. I've tried deselecting the JIT option in IE security as recommended by Microsoft but it has had no effect.
Can anyone help please?
Thanks
-
Feb 13th, 2006, 07:26 AM
#2
Re: Active X and IE
Welcome to the forums. 
What does this OCX do (or supposed to do) and how does it do it (or how is it supposed to do it?)?
-
Feb 13th, 2006, 07:34 AM
#3
Thread Starter
Junior Member
Re: Active X and IE
The OCX is an option box with amended properties for movement purposes. It's a fairly basic one from a beginners tutorial and the first one I've created.
But....it jumps straight to Internet Explorer.
-
Feb 13th, 2006, 08:28 AM
#4
Re: Active X and IE
Does the ocx have code that opens IE?
-
Feb 13th, 2006, 12:32 PM
#5
Re: Active X and IE
Have you tried compiling it into a ocx and then adding it into a new VB project ?
Are you trying to run the activeX control project itself ?
-
Feb 13th, 2006, 01:45 PM
#6
Thread Starter
Junior Member
Re: Active X and IE
There is no code that requests IE to open. Also, after creating the Active X object I run it just as any normal VB project is run. Is there another way to run it if using Active X objects...I don't know as its the first one I've created?
Thanks
Last edited by Bomber2006; Feb 13th, 2006 at 01:46 PM.
Reason: Spelling Mistake
-
Feb 13th, 2006, 03:26 PM
#7
Re: Active X and IE
OK. You are making an ActiveX Control. (In the File menu, the make menu now shows "Make Project1.ocx" and in the window that opens when you click Project>Project1 Properties menu, it shows "ActiveX Control" as 'Project Type'.
Deleloping and debugging ActiveX Controls / ActiveX Exe / ActiveX DLL, is slightly different than developing a Standard Exe.
The following tutorials will help you more understanding the topic.
ActiveX Control Tutorials By Karl Moore :
Part 1 - See page 5 - That's exactly what you are looking for
Part 2
Part 3
Part 4
Part 5
Make Your First ActiveX Control
-
Feb 19th, 2006, 11:11 AM
#8
Thread Starter
Junior Member
Re: Active X and IE
Thanks a lot. That seems to be fine.
-
Feb 19th, 2006, 09:04 PM
#9
New Member
Re: Active X and IE
I was´nt able to find any answer to this problem on the Page 5 you mentioned.
Am I missing something?
-
Feb 20th, 2006, 01:44 AM
#10
Re: Active X and IE
What happens when you 2x-click a file ending in .OCX from Windows Explorer?
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Feb 20th, 2006, 05:17 AM
#11
Re: Active X and IE
If the .ocx filetype is associated with some program in the registry (in HKEY_CLASS_ROOT), Windows opens it with that program. If it is not associated, Windows displays the 'Open With' window.
Right click any file in explorer. In the context menu, if there is a bold menu, that is the default action of that file. When you doubleclick the file, that action will happen.
To register/unregister an ActiveX dl/control/exe from context menu, see this tip: http://www.devx.com/vb2themax/Tip/18337
Last edited by iPrank; Feb 20th, 2006 at 02:19 PM.
-
Feb 20th, 2006, 07:00 AM
#12
New Member
Re: Active X and IE
Guys, let me give this example:
In VB6, I start a new Activex Control Project.
A designer named UserControl1 opens up.
I Put a Command Button or a Shape inside UserControl1.
After that, I add a Form to this project, which will be Form1.
Then I close UserControl1, and a new control icon appears
at the bottom of the Toolbox.
I create an instance of this control, which is exactly equal
to the control that I have created in UserControl1.
After this, I run the program by clicking on Start, hopping
to see a Form with my custom control, but instead, a new
instance of Internet Explorer opens up, showing my control.
I need to test my ActiveX controls, as I develop them, on a
form, not on a browser.
I have also tryed to use the OPEN WITH option in Windows
Explorer, to force Visual Basic to open this kind of files, but
the problem still remains.
-
Feb 20th, 2006, 08:14 AM
#13
Re: Active X and IE
There is a difference between (embedded) 'User Control' and 'ActiveX Control'.
When you select the "ActiveX Control Project" from 'New Project' menu, the project compiles into a ocx file.
You need to either reference the compiled ocx in a completely new 'Standard Exe' project, or you need to create a 'Project Group' in your existing ActiveX Control project to test it. Click on 'File> Add Project' menu to add a new standard exe project.
Adding just a form will not work.
'User Controls', on the other hand, doesn't compile into separete ocx. The embeds into the exe.
To add a new usercontol, open a new 'Standard Exe' project. Then, from 'Project' menu, select 'add User Control'. From the dialogbox, add a new user control.
See, VB has added a new usercontrol for us !
Just paste a button and in it's click event, write
VB Code:
MsgBox "Hello User Control"
Now, close the designer window of the user control. Open the form's designer window and look at the tool box. You'll see an icon for your usercontrol. Click it and paste in into the form. Run the project.
-
Feb 20th, 2006, 08:30 AM
#14
Re: Active X and IE
 Originally Posted by Laser2200
Guys, let me give this example:
In VB6, I start a new Activex Control Project.
A designer named UserControl1 opens up.
I Put a Command Button or a Shape inside UserControl1.
After that, I add a Form to this project, which will be Form1.
Then I close UserControl1, and a new control icon appears
at the bottom of the Toolbox.
I create an instance of this control, which is exactly equal
to the control that I have created in UserControl1.
After this, I run the program by clicking on Start, hopping
to see a Form with my custom control, but instead, a new
instance of Internet Explorer opens up, showing my control.
I need to test my ActiveX controls, as I develop them, on a
form, not on a browser.
I have also tryed to use the OPEN WITH option in Windows
Explorer, to force Visual Basic to open this kind of files, but
the problem still remains.
Got it. Again, what happens when you 2x-click a file ending in .OCX (or .DLL) from Windows Explorer?
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Feb 20th, 2006, 02:17 PM
#15
Re: Active X and IE
 Originally Posted by Dave Sell
Got it. Again, what happens when you 2x-click a file ending in .OCX (or .DLL) from Windows Explorer?
See post #11
-
Feb 20th, 2006, 02:25 PM
#16
Re: Active X and IE
 Originally Posted by iPrank
See post #11
The question is directed toward the original poster for him to test and report what happens on his system presently.
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Feb 20th, 2006, 02:27 PM
#17
Re: Active X and IE
Oh. Sorry. 
I misunderstood the question.
-
Feb 20th, 2006, 02:31 PM
#18
Re: Active X and IE
I thought he has added a form in a ActiveX Control Project and is trying to run the same project by pressing F5. Isn't it ?
-
Feb 20th, 2006, 02:35 PM
#19
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Feb 20th, 2006, 02:38 PM
#20
Re: Active X and IE
Then why it has anything to do with Windows Explorer ?
-
Feb 20th, 2006, 02:40 PM
#21
Re: Active X and IE
There may be something associated with OCX or DLLs on his system. It is just a check for bomber to test.
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Feb 20th, 2006, 02:44 PM
#22
Re: Active X and IE
No matter what program is associated with an ActiveX ocx/dll, if it is correctly registered, it will always work correctly if you referenced (or CreateObject) it in a VB project.
In my system, dll/ocx files are associated with a small (un)registration utility.
-
Feb 20th, 2006, 02:45 PM
#23
Re: Active X and IE
It is a test for bomber to perform.
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Feb 20th, 2006, 02:54 PM
#24
Re: Active X and IE
LOL. I realized our misunderstanding. 
This thread is started by Bomber2006. Looks like his problem is solved in post#8.
The current question is posted by Laser2200 in post#10 and post#12.
-
Feb 20th, 2006, 03:18 PM
#25
Re: Active X and IE
Oh, right. I think I completely missed bombers post#8. I think I withdraw my request LOL.
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
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
|