Single version of the program upload, can only upload to the local directory, not suitable for network applications, it seems only a single version can be used. Network program to use upload pictures still have to continue to transform.
private void Btnupload_click (object sender, EventArgs e) {Ope Nfiledialog ofd = new OpenFileDialog (); Ofd. Title = "Please select the uploaded image"; Ofd. Filter = "picture format |*.jpg"; Sets whether to allow multiple-select OFD. MultiSelect = false; if (OFD. ShowDialog () = = System.Windows.Forms.DialogResult.OK) {//Get the full path of the file (including the suffix after the name) string Filepa th = ofd. FileName; Tbimgfile.text = FilePath; int position = Filepath.lastindexof ("\ \"); String fileName = Filepath.substring (position+1); File.Copy (OFD. FileName, Application.startuppath + "\\Upload\\" + filename); Pbimage.imagelocation = Application.startuppath + "\\Upload\\" + fileName; } }