I am trying to hide a form but cannot seem to get it to work. Here is snippet of the code:
The from appears to disappear momentarily but then reappears. I need this form loaded in the background but invisible to the user once the app it calls is loaded. I am not working with multiple forms which is why I stuck with the default form instead of instantiating. Any ideas how to get this to work?
Thanks
VB.NET:
[size=2][color=#0000ff]
Private[/color][/size][size=2][color=#0000ff]Sub[/color][/size][size=2] myForm_Load([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] eventSender [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.Object, [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] eventArgs [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.EventArgs) [/size][size=2][color=#0000ff]Handles[/color][/size][size=2][color=#0000ff]MyBase[/color][/size][size=2].Load
[/size][size=2]
[/size][size=2][color=#008000]'Display the form[/color][/size]
[color=black]myForm[/color][size=2].DefInstance.Show()[/size]
[size=2][color=green]'Some code goes here which calls another app[/color][/size]
[size=2]
[/size]
[size=2][color=#008000]'Hide the form[/color][/size]
[size=2]myForm.DefInstance.Hide()
[/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]Sub
[/color][/size]
The from appears to disappear momentarily but then reappears. I need this form loaded in the background but invisible to the user once the app it calls is loaded. I am not working with multiple forms which is why I stuck with the default form instead of instantiating. Any ideas how to get this to work?
Thanks