ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 3rd, 2003, 05:34 AM
msrnivas msrnivas is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 30 msrnivas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
How to use ocx

Hi

I have one ocx which written in vb.I want to use this ocx in my web application (asp.net)Can i use it? if so how to use that ocx

can anybody give ex how to call or refer ocx in asp.net

thanks sr

Reply With Quote
  #2  
Old September 3rd, 2003, 04:14 PM
admcdona admcdona is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 20 admcdona User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You can place ocx's on asp.net pages the same way you would with classic ASP and HTML pages. You just embed it on the page with the object tag. I will give a code example below...followed by an explanation.

Code:
<OBJECT id=DHTMLName style="LEFT: 0px; TOP: 0px" codeBase=x/MyOCX.CAB#version=1,0,0,38
classid=CLSID:1EC44743-592A-493B-B462-2E239C5088DG>
<PARAM name=[param name] value=[param value]>
</OBJECT>

<script language=vbscript>
sub startComponent
DHTMLName.[your ocx methods functions etc.]
end sub
</script>

Explanation:
First of all, you make and compile your component in VB6. Then you use the package & deploy wizard to build a .CAB (internet package) that will include your ocx and any other files that your ocx needs to run.
After you build the CAB, go to the folder where you had the package built...there you will find and HTM file with the same name as your OCX. Open that up and it will contain the <OBJECT> tag that you should use to embed your control.
The ID is simply a way for you to reference the object with your vbscript, jscript or any other DHTML type language.

If the control you are trying to use is a 3rd party control or any other control that you can't find a classid for, you may need to contact the maker of that ocx...both for permission to use the control and for the classid.

Hope this helps,
-Aaron

Reply With Quote
  #3  
Old October 3rd, 2006, 11:19 PM
jgeek jgeek is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 2 jgeek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 32 sec
Reputation Power: 0
How to use ocx in a java appln

i am using a java based web appln.....i have to use an ocx (written in vb) here....where does the .cab package have to be placed..i have added the object tag in my jsp but it is not working

Reply With Quote
  #4  
Old January 5th, 2007, 04:33 AM
singhswat singhswat is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 2 singhswat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 15 sec
Reputation Power: 0
Smile request

Quote:
Originally Posted by jgeek
i am using a java based web appln.....i have to use an ocx (written in vb) here....where does the .cab package have to be placed..i have added the object tag in my jsp but it is not working


hi pal,
i am stuck with the same issue can u help me out......
I need to use a ocx n a java application, how do i do it...
a sample code snippet will be of great help....

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > How to use ocx


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap