CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2009
    Posts
    4

    How to use Visual Basic 6.0 ActiveX Control in ASP.NET & C# 3.5

    I am developing an application in ASP.NET & C#3.5. But I need to use an ActiveX Control which developed in Visual Basic 6.0.
    Can anyone help me?

    1. How to use ActiveX Control in Web application.
    2. How to send values from ActiveX Control to web server.

    Please help!

    Thanks in advance

  2. #2
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: How to use Visual Basic 6.0 ActiveX Control in ASP.NET & C# 3.5

    Quote Originally Posted by SharmaMohit3333 View Post
    I am developing an application in ASP.NET & C#3.5. But I need to use an ActiveX Control which developed in Visual Basic 6.0.
    Can anyone help me?

    1. How to use ActiveX Control in Web application.
    2. How to send values from ActiveX Control to web server.

    Please help!

    Thanks in advance
    1)Web Controls are web Controls and if your control isn't designed for usage in net IMHO it isn't possible. WebControls are designed in a way so they could be sent to the user via HTML code so the browser is able to show it on the screen.
    2) A web control has a postback method so its easy to post values back to the server. This is one of the reasons why you need to use a web control. What sort of ActiveX you have so you think you need to use it in the web ?.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  3. #3
    Join Date
    Jan 2009
    Posts
    4

    Re: How to use Visual Basic 6.0 ActiveX Control in ASP.NET & C# 3.5

    Quote Originally Posted by JonnyPoet View Post
    1)Web Controls are web Controls and if your control isn't designed for usage in net IMHO it isn't possible. WebControls are designed in a way so they could be sent to the user via HTML code so the browser is able to show it on the screen.
    2) A web control has a postback method so its easy to post values back to the server. This is one of the reasons why you need to use a web control. What sort of ActiveX you have so you think you need to use it in the web ?.

    1. I've found that how to use ActiveX control in ASP.net like
    <object id="objOcxCtrl" classid ="clsid:BBB438D4-B437-46AD-B583-6215E398F31F"
    codebase="http://ServerIpAddress/CheckActiveX/MyActiveX.CAB#version=1,0,0,0" >
    </object>

    2. I've built this ActiveX control in Visual Basic 6.0. I need to read all information from the client system i.e. from selected path, I need to find out how many folder, subfolders & files count, extention of files with Size also.
    For e.g. If user uses MyActiveX control then first user needs to browse the path and it will show Client Side drive, folders & files list. When user will select the path and click on then it will show a report i.e. count for folders, subfolders, files with extentions, size.

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How to use Visual Basic 6.0 ActiveX Control in ASP.NET & C# 3.5

    Your control sends file info to the web, and then others can see? Doesn't sound like something I'd like to have running.

    Also, can easily be mis-used.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jan 2009
    Posts
    4

    Re: How to use Visual Basic 6.0 ActiveX Control in ASP.NET & C# 3.5

    Quote Originally Posted by dglienna View Post
    Your control sends file info to the web, and then others can see? Doesn't sound like something I'd like to have running.

    Also, can easily be mis-used.

    I need to do R&D on it. How to interact that ActiveX Control with Web Server.
    Could you please help on it?

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How to use Visual Basic 6.0 ActiveX Control in ASP.NET & C# 3.5

    You'd be doing remote-control type, but you'd have to deal with firewalls, and av programs blocking you.

    I suppose that we could just post code for you and the bad guys to see, that lets VB6 controls interfacing with the web.

    I really don't know if it can be done, anyways. Not since XP SP2, anyways.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Jan 2009
    Posts
    4

    Re: How to use Visual Basic 6.0 ActiveX Control in ASP.NET & C# 3.5

    Quote Originally Posted by dglienna View Post
    You'd be doing remote-control type, but you'd have to deal with firewalls, and av programs blocking you.

    I suppose that we could just post code for you and the bad guys to see, that lets VB6 controls interfacing with the web.

    I really don't know if it can be done, anyways. Not since XP SP2, anyways.

    When user will open the web page where ActiveX control is used that a pop up message will come to install AcitveX control then it will be visible to Client side otherwise it will not.

    It would be greatly appreciated if I will get code :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured