You could try this
Make sure you are using Standard runtime and not DirectX
Then use the window control object to make the window invisible.
Make sure to make it reappear when dosbox closes