Starting the App

papa_k

Regular
Joined
Jun 12, 2003
Messages
77
Location
UK
My app. has no errors but when i go to run it i have the following problem and it litterally flashes on the screen with first form and then dissapears.


'DefaultDomain': Loaded 'c:\winnt\microsoft.net\framework\v1.0.3705\mscorlib.dll', No symbols loaded.
'TestDatabase': Loaded 'C:\Documents and Settings\kendj2\Desktop\Local Working\bin\TestDatabase.exe', Symbols loaded.
'TestDatabase.exe': Loaded 'c:\winnt\assembly\gac\system.windows.forms\1.0.3300.0__b77a5c561934e089\system.windows.forms.dll', No symbols loaded.
'TestDatabase.exe': Loaded 'c:\winnt\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll', No symbols loaded.
'TestDatabase.exe': Loaded 'c:\winnt\assembly\gac\system.drawing\1.0.3300.0__b03f5f7f11d50a3a\system.drawing.dll', No symbols loaded.
'TestDatabase.exe': Loaded 'c:\winnt\assembly\gac\microsoft.visualbasic\7.0.3300.0__b03f5f7f11d50a3a\microsoft.visualbasic.dll', No symbols loaded.
'TestDatabase.exe': Loaded 'c:\winnt\assembly\gac\accessibility\1.0.3300.0__b03f5f7f11d50a3a\accessibility.dll', No symbols loaded.
'TestDatabase.exe': Loaded 'c:\winnt\assembly\gac\microsoft.visualbasic.compatibility\7.0.3300.0__b03f5f7f11d50a3a\microsoft.visualbasic.compatibility.dll', No symbols loaded.
The program '[308] TestDatabase.exe' has exited with code 0 (0x0).

I have tried to step through it using F10 and it doesn't help explain what the hell is going on...

This was a VB6 app that has been converted to a .Net app.

What have a missed?
 
Yeh it does, i have included what it does when i use F10 to step through the code.







Option Strict Off
Option Explicit On
Friend Class frmSplash
Inherits System.Windows.Forms.Form
#Region "Windows Form Designer generated code "
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
If m_InitializingDefInstance Then
m_vb6FormDefInstance = Me
Else
Try
'For the start-up form, the first instance created is the default instance.
If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
m_vb6FormDefInstance = Me
End If
Catch
End Try
End If
End If
'This call is required by the Windows Form Designer.
InitializeComponent()
End Sub



THEN.............




Private Sub frmLogin_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Dim strMethod As String
Dim strMessage As String
Dim strLogin As String

On Error GoTo ErrHandler '*****************goes to here and stops (i have a break point)

strMethod = "Login Load"
strLogin = GetSetting("SRDB", "UserName", "UserName")

frmLogin.DefInstance.txtUserName.Text = strLogin

Exit Sub

ErrHandler:

strMessage = "Error occured in " & strMethod & vbCrLf & Err.Number & " : " & Err.Description
basSRDB.Error_Logging(strMessage)

End Sub









Private Sub tmTimer_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles tmTimer.Tick
lblWarning.Text = "Connected"
frmSplash.DefInstance.Close()
frmLogin.DefInstance.Show() '*****************It then jumps to here
End Sub '******* At this point the app. just closes!




hope this helps, i haven't a clue!
 
For the small amount of code you have, you can easily re-write it in .NET. (without using the VB6 compatabilty library, a much better learn)
 
I have a lot of code, it took over two and a half hours to convert to .net from vb6 on a 1Ghz and half a gig ram.

the thing works fine in VB 6.
 
Enough is enough...

i thought that converting to .Net would be a good idea but at the moment i think..

"If it aint broke....don't fix it"

I think i am going to have to keep it as a VB6 program.

:(
 
There are any number of threads here on the evils of upgrading code automatically. The general concensus is, don't do it.
 
If it's a large complex application I would recommend leaving it in its' VB6 environment.

Perhaps when you feel your skills are at a level adaquite for the upgrade, you can then re-code the app youself. (Instead of using the wizard)
 
Back
Top