'We assume that the GdViewer1 control has been properly integrated.
If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
If GdViewer1.GetLastPath().EndsWith(".gif") Then
GdViewer1.SetItemMenuCaption(6, "PLAY GIF ANIMATION")
GdViewer1.SetItemMenuCaption(7, "STOP GIF ANIMATION")
GdViewer1.SetItemMenuEnabled(1, False)
GdViewer1.SetItemMenuEnabled(8, False)
GdViewer1.SetItemMenuEnabled(16, False)
Else
GdViewer1.RemoveItemMenu(6)
GdViewer1.RemoveItemMenu(7)
End If
Else
MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SetItemMenuCaption")
End If
//We assume that the GdViewer1 control has been properly integrated.
if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
{
if (GdViewer1.GetLastPath().EndsWith(".gif"))
{
GdViewer1.SetItemMenuCaption(6, "PLAY GIF ANIMATION");
GdViewer1.SetItemMenuCaption(7, "STOP GIF ANIMATION");
GdViewer1.SetItemMenuEnabled(1, false);
GdViewer1.SetItemMenuEnabled(8, false);
GdViewer1.SetItemMenuEnabled(16, false);
}
else
{
GdViewer1.RemoveItemMenu(6);
GdViewer1.RemoveItemMenu(7);
}
}
else
MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SetItemMenuCaption");