6
Answers

How to use the Dispatcher in windows form Application.

How to use the Dispatcher in windows form Application.
 
I am getting error on Dispatcher Keyword.
 
here is my code.
 
private void btnOk_Click(object sender, EventArgs e)
{
Dispatcher.BeginInvoke(new Action(OpenDocument));
OpenNewFile opn = new OpenNewFile();
opn.Hide();
}
public void OpenDocument()
{
if (cbRegion.SelectedIndex >= 0 && cbPaperSize.SelectedIndex >= 0 && cbFont.SelectedIndex >= 0 && cbTemplateSection.SelectedIndex >= 0 && cbTemplateDocument.SelectedIndex >= 0)
{
try
{
object missing = System.Reflection.Missing.Value;
if (!File.Exists(destinationPath))
{
File.Copy(sourcepath, destinationPath, true);
}
//Microsoft.Office.Interop.Word.Application ap = new Microsoft.Office.Interop.Word.Application();
//Microsoft.Office.Interop.Word.Document oWordDoc = Globals.ThisAddIn.Application.ActiveDocument;
Microsoft.Office.Interop.Word.Application ap = Globals.ThisAddIn.Application;
Microsoft.Office.Interop.Word.Document oWordDoc = ap.ActiveDocument;
oWordDoc = ap.Documents.Open(destinationPath, missing, false, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing
, missing, missing, missing);
oWordDoc = ap.ActiveDocument;
ap.Visible = true;
ap.Activate();
}
catch (Exception ex)
{
throw ex;
}
}
else
{
MessageBox.Show("Please select the value form combobox", "BOX", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
Answers (6)
0
Dnyandeo Shinde

Dnyandeo Shinde

NA 71 9.9k 12y
The creation of table is depending on your logic it may be any depend on your logic.
0
Sivaraman Dhamodaran

Sivaraman Dhamodaran

NA 61.8k 2.7m 12y
You can not fix the tables as it depends how you want to group data logically. So the number table varies depending on the person who designs the database.