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

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,612 questions
C#
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.
10,260 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,574 questions
{count} votes

2 answers

Sort by: Most helpful
  1. LesHay 7,126 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
    
    0 comments No comments

  2. Karen Payne MVP 35,036 Reputation points
    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
        });
    }
    
    0 comments No comments