4
votes

we have a legacy application done in VB6. When we add new windows to this application we create them with WPF and we expose a COM interface to open it from VB6. The problem is that the first time a WPF window is opened it takes a while as the system needs to load the WPF run-time.

Is there a way to load the run-time in background so the user does not has to wait when opening the window?

Thanks.

1

1 Answers

1
votes

Some ideas:

  • Create hidden WPF windows when VB6 application starts, so WPF will load while user will do something else in application.
  • If it will not work with hidden window, you still can create WPF window with positon like new Point(10000, 10000), and select to not show this window in taskbar, so this hidden WPF window will force .NET to load WPF engine.

So, you can create invisible WPF window in background when application starts, and user will not have to wait later.