vb.net I have folder in program path called patient files i need to open specific file using textbox1 with name of file

Ahmed Ramadan 0 Reputation points
2023-06-03T22:17:41.8+00:00

vb.net I have folder in program path called patient files i need to open specific pdf file using textbox1 with name of file

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,828 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,714 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,570 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 112.1K Reputation points
    2023-06-04T02:38:48.4133333+00:00

    Try something like this:

    Dim p = Path.Combine(Application.StartupPath, "patient files", textbox1.Text & ".pdf")
    Dim si = New ProcessStartInfo With {.FileName = p, .UseShellExecute = True}
    
    Process.Start(si)
    
    0 comments No comments