Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Invalid file reference question


Reply
 
Thread Tools Display Modes
  #1  
Old 05-03-2012, 06:54 PM
pilotgil pilotgil is offline
Newcomer
 
Join Date: May 2012
Posts: 1
Default Invalid file reference question


Hi,

I got these messages (below) in a .log file and would like to ask for help. I'm afraid I just don't know enough about VB.

Line 8: Property Icon in FrmReadFS had an invalid file reference.
Line 15: Property ItemData in CmbSelRead had an invalid file reference.
Line 17: Property List in CmbSelRead had an invalid file reference.
Line 8: Property Icon in FrmReadFS had an invalid file reference.
Line 15: Property ItemData in CmbSelRead had an invalid file reference.
Line 17: Property List in CmbSelRead had an invalid file reference.
Line 8: Property Icon in FrmReadFS had an invalid file reference.
Line 15: Property ItemData in CmbSelRead had an invalid file reference.
Line 17: Property List in CmbSelRead had an invalid file reference.

The program runs within the development environment but I cannot make an .exe

First, how do I fix the "invalid file references" and or how do I create an .exe and ignore these? Or can I? Thanks!

Here's the form code:

Private Sub About_Click()
frmAbout.Show
End Sub


Private Sub CmdFSCUIPC_Click()
Dim Versie As Long
Dim FS As String
Dim dwResult As Long
' set VB "constant" :-) string refs dynamically now ready for result messages
ResultText = Array("Okay", _
"Attempt to Open when already Open", _
"Cannot link to FSUIPC or WideClient", _
"Failed to Register common message with Windows", _
"Failed to create Atom for mapping filename", _
"Failed to create a file mapping object", _
"Failed to open a view to the file map", _
"Incorrect version of FSUIPC, or not FSUIPC", _
"Sim is not version requested", _
"Call cannot execute, link not Open", _
"Call cannot execute: no requests accumulated", _
"IPC timed out all retries", _
"IPC sendmessage failed all retries", _
"IPC request contains bad data", _
"Maybe running on WideClient, but FS not running on Server, or wrong FSUIPC", _
"Read or Write request cannot be added, memory for Process is full")

Call FSUIPC_Initialization
' Try to connect to FSUIPC (or WideFS)
If FSUIPC_Open(SIM_ANY, dwResult) Then
'Call FSUIPC_Version
Versie = FSUIPC_FS_Version
Select Case Versie
Case 0
FS = "Unknown"
Case 1
FS = "FS98"
Case 2
FS = "FS2000"
Case 3
FS = "CFS1"
Case 4
FS = "CFS2"
Case 5
FS = "FLY 5"
Case 6
FS = "FS2002"
Case 7
FS = "FS2004"
End Select
'When connection is made show next text + FS version
LblFSUIPCcon = "Geconnecteerd met " & FS
Else
'if connection fails
'Sending a fault message from FSUIPC
MsgBox "Cannot make a connection with FSUIPC:" & ResultText(dwResult), vbExclamation, "Error Message"
End If
End Sub

Private Sub Cmdread_Click()
Dim SelRead As Integer
SelRead = CmbSelRead.ListIndex
Select Case SelRead
Case 0
Read_Land_Light
Case 1
Read_Flap_Pos
End Select

End Sub

Private Sub Form_terminate() 'When closing the form
FSUIPC_Close 'we need also to close FSUIPc otherwise its stays open.
End Sub

Private Sub Read_Land_Light()
Call Read_LightS
LblResult = " Landing light = " & All_LigHt
End Sub

Public Sub Read_Flap_Pos()
Call Read_Flap
LblResult = " Flap position = " & Flap_pos

End Sub

Public Sub Form_Load()
CmbSelRead.AddItem "Landing Light"
CmbSelRead.AddItem "Flap position"
FrmReadFS.Icon = LoadPicture("C:\Temp\VBtest\test read.ico")
frmAbout.Icon = LoadPicture("C:\Temp\VBtest\test read.ico")

End Sub
Reply With Quote
  #2  
Old 05-16-2012, 09:39 AM
ElderKnight ElderKnight is offline
Senior Contributor

Forum Leader
 
Join Date: Oct 2003
Location: Central Florida
Posts: 1,205
Default

I'm guessing that "C:\Temp\VBtest\test read.ico" may be a bad file name. Is that really supposed to be a space between "test" and "read", or is it supposed to be a backslash, or an underscore or dot? If it is an actual name, maybe it's not a valid icon file.

If it runs in the interpreter but won't compile, I'm thinking that you may have gotten these loaded correctly once while programming, and so they were available during your debug sessions, but that the program logic is incapable of loading the files on its own.

I'd suggest just commenting out those icon lines: all you'll lose is a little picture on each form's title bar. You can provide for these later on when the other parts are working.

Public Sub Form_Load()
CmbSelRead.AddItem "Landing Light"
CmbSelRead.AddItem "Flap position"
'FrmReadFS.Icon = LoadPicture("C:\Temp\VBtest\test read.ico")
'frmAbout.Icon = LoadPicture("C:\Temp\VBtest\test read.ico")
__________________
-- D.J.

I do not endorse any items advertised within this frame, and regret that the viewer is subjected to such.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->