Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

vb.net open file with default program

Dim OpenFileDlg as new OpenFileDialog.

OpenFileDlg.FileName = "" ' Default file name
OpenFileDlg.DefaultExt = ".xlsx" ' Default file extension
OpenFileDlg.Filter = "Excel Documents (*.XLSX)|*.XLSX"
OpenFileDlg.Multiselect = True
OpenFileDlg.RestoreDirectory = True
' Show open file dialog box
Dim result? As Boolean = OpenFileDlg.ShowDialog()

' Process open file dialog box results
for each path in OpenFileDlg.Filenames
    Try
        System.Diagnostics.Process.Start(Path)

    Catch ex As Exception
        MsgBox("Unable to load the file. Maybe it was deleted?")
    End Try
    If result = True Then
        ' Open document
    Else
        Exit Sub
    End If
next
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity get textmesh pro component 
Csharp :: elevated priviledge in c# 
Csharp :: request for adminstrator permission 
Csharp :: unity c# check if multiple keys are pressed 
Csharp :: unity put children in list 
Csharp :: exit a method c# 
Csharp :: c# read from text documenmt 
Csharp :: change array size in unity 
Csharp :: blazor button onclick parameter 
Csharp :: lump in neck under jaw 
Csharp :: c# + longest streak in strings 
Csharp :: set particle system start colour + random between two 
Csharp :: includes method C# 
Csharp :: c# console beep sounds 
Csharp :: c# switch by type of object 
Csharp :: how to stop rigidbody2d from falling in unity 
Csharp :: Xamarin.Forms - How to navigate to a tabbed page child page 
Csharp :: ggdesign 
Csharp :: video gets pixelated by scaling it up to Screen Size unity 
Csharp :: c# entity framework code first connection string 
Csharp :: c# combobox selectedvalue 
Csharp :: milliseconds to seconds c# 
Csharp :: c# array of strings 
Csharp :: how to make a specific scene load only on game start in unity 
Csharp :: c# shuffle list 
Csharp :: convert ienumerable to list 
Csharp :: c# cast to type variable 
Csharp :: c# size of enum 
Csharp :: remove comma from string c# 
Csharp :: bytes to httppostedfilebase c# 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =