I wrote dll for my SQL database which takes BLOB data from tables and converting it into pdf file. It works good, but i try to add dialog window for choosing pdf saving path and it gives me next message:
System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
May be someone know what's problem?
dll code where issue is:
public static void Run(SqlInt32 i)
{
FolderBrowserDialog fd = new FolderBrowserDialog();
fd.ShowDialog();
string save_pth = fd.SelectedPath+'\\';
if (gener_pdf(gener_jpg(i, save_pth), save_pth))
{
List<string> to_del = gener_jpg(i, save_pth);
for (int p = 0; p < to_del.Count(); p++) { File.Delete(to_del[p]);}
}
}