Share via

CS program key system

DrozdzXOS Dróżdż 1 Reputation point
2021-12-26T16:35:05.817+00:00

Im writing a program with a key system and like
Process.Start("url");

it just doesnt recognise it

Developer technologies | VB
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


2 answers

Sort by: Most helpful
  1. Karen Payne MVP 35,606 Reputation points Volunteer Moderator
    2021-12-26T18:36:16.957+00:00

    For .NET Core the following is how to open a web page in the default browser.

    Note I used the full namespace System.Diagnostics

    Sample call

    OpenInBrowser("http://www.google.com");
    

    Method

    private static void OpenInBrowser(string address)
    {
        System.Diagnostics.Process.Start(new ProcessStartInfo
        {
            FileName = address,
            UseShellExecute = true
        });
    }
    

    Was this answer helpful?

    0 comments No comments

  2. LesHay 7,146 Reputation points
    2021-12-26T17:54:30.49+00:00

    Hi
    No problem here. With the non-existant details provided, there is no way to help you.

    ' New blank default project
    Option Strict On
    Option Explicit On
    Public Class Form1
    
     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    
     Dim url As String = "https://www.google.co.uk/search?newwindow=1&q=potluck&spell=1&sa=X&ved=2ahUKEwiBkIfYg4L1AhWlolwKHX_sBygQBSgAegQIAhA2&biw=979&bih=533&dpr=2.5"
    
     Process.Start(url)
     End Sub
    End Class
    

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.