Since this has gone unanswered and it looks like a similar issue I had when aborting a delete feature operation, I'll offer my workaround (which I based on something I found on the old Esri forums). It's hacky and you may already be doing this and were looking for a less-hacky method.
Add FindWindow and EndDialog to a class (you might already have a PInvoke class):
public class PInvoke
public static extern IntPtr FindWindow(String lpszClass, String lpszWindow);
public static extern int EndDialog(IntPtr hDlg, IntPtr nResult);
Add a timer to your extension class:
private Timer timerDeleteEsriDeleteMessage;
And a property for the timer:
private Timer TimerRemoveEsriDeleteMessage
if (timerDeleteEsriDeleteMessage == null)
timerDeleteEsriDeleteMessage = new Timer();
timerDeleteEsriDeleteMessage.Interval = 1;
timerDeleteEsriDeleteMessage.Tick += new EventHandler(OnTimerDeleteEsriDeleteMessageTick);
Add the method that actually shuts down the window:
private void OnTimerDeleteEsriDeleteMessageTick(object timerObject, EventArgs myEventArgs)
// Close the dialog with the caption 'Delete'
IntPtr textBoxHandle = PInvoke.FindWindow(null, "Delete");
Now the timer can be started just before a delete operation.
// I show my dialog here (if I want one)
// then start the timer, then abort the operation
this.TimerRemoveEsriDeleteMessage.Tag = "AbortOperation";
I'm thinking this approach may work for the
Create Feature Task could not be completed. message (maybe by replacing
Create in the OnTimerDeleteEsriDeleteMessageTick method).