'Declaration
Public Property AllowDropFile As Boolean
public bool AllowDropFile {get; set;}
public read-write property AllowDropFile: Boolean;
public function get,set AllowDropFile : boolean
If this property is set to true and a file is dropped within the control, the DropFile event is raised.
'Declaration
Public Property AllowDropFile As Boolean
public bool AllowDropFile {get; set;}
public read-write property AllowDropFile: Boolean;
public function get,set AllowDropFile : boolean
'We assume that the GdViewer1 control has been properly integrated. Friend WithEvents GdViewer1 As GdPicture14.GdViewer 'Allowing to drop files. GdViewer1.AllowDropFile = True 'Add the event. AddHandler GdViewer1.DropFile, AddressOf GdViewer1_DropFile 'Define the event. Sub GdViewer1_DropFile(ByVal FilePath As String) Handles GdViewer1.DropFile If GdViewer1.DisplayFromFile(FilePath) <> GdPictureStatus.OK Then MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.AllowDropFile") End Sub
//We assume that the GdViewer1 control has been properly integrated. //Allowing to drop files. GdViewer1.AllowDropFile = true; //Add the event. GdViewer1.DropFile += GdViewer1_DropFile; //Define the event. void GdViewer1_DropFile(string FilePath) { if (GdViewer1.DisplayFromFile(FilePath) != GdPictureStatus.OK) MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.AllowDropFile"); }