'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.DropFile")
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.DropFile");
}