Results 1 to 4 of 4

Thread: Help writing an activeX control.

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    2

    Help writing an activeX control.

    Hey all,

    Most of my programming experience has been in Java and I have very little experience programming in VB so be easy on me I'm a Senior CS major at the U of A and I'm looking for help writing an activeX control that can be run from a web browser with the users permission.

    The program would simply go to Start - Run in Windows and run an executable already located on the machine. I've been told that VB is the best place to start writing activeX controls but I'm not really sure where to start. Is there anyone that could give me some sample code or point me to some previously written threads that would help me out? Any other advice is also greatly appreciated. Thank you!

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Help writing an activeX control.

    Welcome to the Forums.

    You will find more answers on your tpic by running a Forums Search: http://vbforums.com/search.php


    To run an executable from the run dialog like that it only need to have an entry in the environmental variables list.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    2

    Re: Help writing an activeX control.

    Thank you for the response. I looked through some topics and was able to come up with something very simple but it's not quite working.
    I created a new ActiveX control by creating a new project and selecting ActiveX control. Then I added the following code below. IE comes up and prompts me to accept the ActiveX control, I say ok and nothing happens. What have I done wrong?

    Private Sub Project1()
    System.Diagnostics.Process.Start ("C:\Open.txt")
    End Sub

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Help writing an activeX control.

    The code you have is VB.NET code and not VB 6 code.

    This will open the txt file in notepad using vb 6.

    Code:
    Shell "notepad.exe C:\open.txt"
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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