Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8547669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:18:55+00:00 2026-06-11T13:18:55+00:00

In my application users create text based files and then they are saved into

  • 0

In my application users create text based files and then they are saved into my own special filetype. When I create my clickonce project I am going to set it up so that my application opens these files when they are clicked open outside of the application.

My question is, how exactly do I write the logic so my program knows that it is opening through a file, so I can load the file into my application? I am geussing there is some kind of code I need to put in the form load to choose how the app is going to load, whether it opens a file or it loads as it normally would If I just opened it’s assembly. I am just not sure how I do that. I am using vb.net.

Would this work? How can I test this before I create my clickone program and set the filetype associations?

If (Environment.GetCommandLineArgs.Length > 1) Then

    Dim s As String = Environment.GetCommandLineArgs(1)

    ' Open file s

End If
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:18:56+00:00Added an answer on June 11, 2026 at 1:18 pm

    You have the right idea, take a look at this Code Project article(File-Association-in-VB-NET), it discusses exactly what you are asking.

    From Link:

    When the registry is set correctly and a file is opened in Windows Explorer, the file’s path is passed as a command-line argument (if you think of an application as a function, then these are the parameters). To retrieve the arguments, you use

    My.Application.CommandlineArgs. It returns a ReadOnlyCollection(Of String).
    You can use My.Application.CommandlineArgs(0) to retrieve the file path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Backbone.js application that allows users to create graphs based on large
I have a web application that allows users to create an account, and in
I'm working on an android application which allows users to create accounts on a
I use Membership.CreateUser to create users for my web application on demand. But is
I created an application , which Users can create a Topic and other can
I have a survey application, where users can create surveys and give choices for
I am attempting to write a VB.net application which will allow users to create
I'm facing troubles with APEX again! I create users for my application manually inside
I want to create a web application that allows users to sign up, register
I need to create application logs to capture users signing in/out and their requests,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.