views:

97

answers:

4

Hi,

My application was built with VB.NET. It's an EXE application. It's already running well on dozens of Windows hosts as an independent app - without a development environment.

Now I try to run it on a Windows 2008 server (as a native app), but the form is not shown - nothing is displayed. When I debug, I see that it's running all "form_load" subroutines until the end, but then nothing is displayed. I find no errors. What could be the reason? What should I check?

I must say that it works fine on many other Windows machines, but not on Windows 2008 server machines (we tried on another one).

It's not a database application. GUI only.

Thanks in advance!

A: 

I suppose the appropriate .net Framework is installed on the server?

Paul Lydon
"When I debug, I see that it's running all "form_load" subroutine till the end, but then nothing is displayed. I find no errors" - I think that means that .NET Framework is installed or how could he debug?
Yaroslav Yakovlev
+2  A: 

You say "nothing is displayed." But does the application show up on the Windows Task Bar?

It's possible that the form IS displaying - but that the position is off-screen. For instance, the upper-left-hand corner might be at (1300,1100) or at (-1300,-1100).

Try running it again, but then (when the form OUGHT to be visible) try pressing ALT + SPACE. If your window really does exist, you'll see a system menu (Restore, Move, Size, etc.). In that case, select Size - you ought to be able to use the mouse and/or keyboard arrow keys, to make the window visible.

On the other hand, if the application is supposed to show up in the Windows Task Bar, but it doesn't, then something is happening in (or right after) form_Load that is making the application exit. To double-check if this is happening, try adding this code:

    Private Sub Form1_FormClosed(ByVal sender As Object, _
        ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
    MsgBox("Form is closing")
End Sub
Allan Woloshin
+1  A: 

Make sure it is not crashing on launch.

Nick Brooks
A: 

If nothing is displayed because the application is terminating, it may be due to an unhandled exception. You can tell if the application has terminated by going into Task Manager and seeing if the application is running. If it has terminated, check the Windows Application Event Log. If you're lucky, you'll see an error entry and maybe even a stack trace in that log.

Jacob