I try the next way:
this.AllowDrop = true;
this.DragEnter += new System.Windows.Forms.DragEventHandler(Form_DragEnter);
void Form_DragEnter(object sender, DragEventArgs e)
{
// here I need to check whether it access .mdb format
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.Copy;
}
else
{
e.Effect = DragDropEffects.None;
}
}
How to chech it ? In DataFormats. there is no database format
Then loop through the string array checking file extensions