Invalid URI: The format of the URI could not be determined
-
The above message is followed by: "Control.Invoke failed". Baffling! This is a desktop application, so why are URI's even involved? Here's how the delegate is created:
EventHandler printButton = btnPrint\_Click; HighVoltage hv = new HighVoltage(m\_Printer.PrintController, s\_SchedulerController, printButton); hv.ShowDialog();
Here's how it's passed to the class:
public HighVoltage(Mercury.Controller.Print.PrintController thePrintController, SchedulerController theSchedCtler, EventHandler thePrintButton) { InitializeComponent(); printButton = thePrintButton; ...
Here's how it's used:
Utils.InvokeDelegateOnCorrectThread(printButton, new object\[\] { null, null });
This eventually reaches:
return control.Invoke(\_delegate, args);
where the error happens. The contents of all the variables look reasonable in the debugger. Any ideas what could be causing this? Thanks!
-
The above message is followed by: "Control.Invoke failed". Baffling! This is a desktop application, so why are URI's even involved? Here's how the delegate is created:
EventHandler printButton = btnPrint\_Click; HighVoltage hv = new HighVoltage(m\_Printer.PrintController, s\_SchedulerController, printButton); hv.ShowDialog();
Here's how it's passed to the class:
public HighVoltage(Mercury.Controller.Print.PrintController thePrintController, SchedulerController theSchedCtler, EventHandler thePrintButton) { InitializeComponent(); printButton = thePrintButton; ...
Here's how it's used:
Utils.InvokeDelegateOnCorrectThread(printButton, new object\[\] { null, null });
This eventually reaches:
return control.Invoke(\_delegate, args);
where the error happens. The contents of all the variables look reasonable in the debugger. Any ideas what could be causing this? Thanks!
Is this a WPF app? WPF uses URIs everywhere. But anyways, somewhere you are specifying a URI in the wrong format. Or the control is. Did you try turn on all first chance exceptions? That might help you catch it when its really happening.
-
Is this a WPF app? WPF uses URIs everywhere. But anyways, somewhere you are specifying a URI in the wrong format. Or the control is. Did you try turn on all first chance exceptions? That might help you catch it when its really happening.
Thanks for the reply. It turns out it was getting into an unexpected part of the code after the Invoke (), so I have to dig deeper.
-
Thanks for the reply. It turns out it was getting into an unexpected part of the code after the Invoke (), so I have to dig deeper.
when you want to close the thread, rather than remove the question and leave a messy thread, I would suggest you just append "[solved]" or "[closed]" to its subject line. TIA.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
when you want to close the thread, rather than remove the question and leave a messy thread, I would suggest you just append "[solved]" or "[closed]" to its subject line. TIA.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
Noted.