How to convert this code to vb code? RRS feed

  • Question

  • hi all

    I am new to the  vb and I want to start by converting this code to vb code

     Dim ofd As New OpenFileDialog
            ofd.Filter = "Image Files|*.jpg;*.bmp;*.png;*.gif"
            ofd.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.Desktop
            ofd.Multiselect = True
            ofd.RestoreDirectory = True
            ofd.Title = "Select the files that you want to add to the the list"
            If ofd.ShowDialog() = DialogResult.OK Then
                PictureBox1.Image = Image.FromFile(ofd.FileName)
            End If

    And also how to keep converting other codes so 

    Thanks and I am really appreciated any help

    Saturday, October 6, 2018 2:48 AM


  • Hello,

    Do you understand that code to open file will be executed on the client side?


    <div class="col-lg-6 col-md-6 col-sm-6">
                        <button class="button-analyse" id="btnSelect">select file</button>

    JS + JQuery

            var $input = $('<input type="file" />');
            $input.change(function() {
              alert("selected file:"+$(this).val());

    Sincerely, Highly skilled coding monkey.

    • Marked as answer by Max45-1 Sunday, October 7, 2018 12:10 AM
    Saturday, October 6, 2018 10:09 AM