Back Again,
Wish I had more than a week to write this program(sigh, got 2 days left)
Here is my problem:
I created an application (runs off of CD) that looks in a directory and displays it in a listview. Depending on what file is clicked an action is taken.
I get the following error when I double click a file in the listview:
My code for the double click event is as follows:
I'm new so the error doesn't make sense to me (yet). Can someone explain the error in laymans terms to help me understand.
Could this be a problem with my xenocode program?
Thanks
Wish I had more than a week to write this program(sigh, got 2 days left)
Here is my problem:
I created an application (runs off of CD) that looks in a directory and displays it in a listview. Depending on what file is clicked an action is taken.
I get the following error when I double click a file in the listview:
It works on machines with the .net framework but not on this particular one that doesn't have it. I use Xenocode (www.xenocode.com) to wrap the exe so that it will work on machines that don't have the framework installed. Worked great in the past."The specified module could not be found. (Exception from HRESULT: 0x8007007E)
************** Exception Text **************
System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at setup.expl_Body.list_Files_MouseDoubleClick(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseDoubleClick(MouseEventArgs e)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
My code for the double click event is as follows:
VB.NET:
Private Sub list_Files_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles list_Files.MouseDoubleClick
filePath = ""
fileExtension = ""
fileName = ""
Dim indexes As ListView.SelectedIndexCollection
Dim index As Integer
If list_Files.IsHandleCreated Then
indexes = list_Files.SelectedIndices 'Get selected Item's in ListView
For Each index In indexes
fileName = list_Files.Items(index).SubItems(0).Text
fileExtension = list_Files.Items(index).SubItems(1).Text
filePath = list_Files.Items(index).SubItems(2).Text
Next
Select Case fileExtension
Case ".gif", ".jpg"
'Send image to PictureBox and show imageViewer Form
frm_imageViewer.pict_imageDisplay.Image = Image.FromFile(filePath)
frm_imageViewer.Show()
frm_imageViewer.Activate()
Case ".swf"
'Load Shockwave movie and show Clip Viewer
frm_clipViewer.AxShockwaveFlash.LoadMovie(0, filePath)
frm_clipViewer.Show()
frm_clipViewer.Activate()
frm_clipViewer.AxShockwaveFlash.Play()
Case ".pdf"
Try
Process.Start(filePath)
Catch ex As System.ComponentModel.Win32Exception
MsgBox("This document is in .pdf format so you will need the Adobe Reader" & vbCrLf & "or another program that can open this file type.", _
MsgBoxStyle.OkOnly + MsgBoxStyle.Information)
End Try
Case ".doc"
Try
Process.Start(filePath)
Catch ex As System.ComponentModel.Win32Exception
MsgBox("This document is in .doc format so you will need Micrsoft Word" & vbCrLf & "or another program that can open this file type.", _
MsgBoxStyle.OkOnly + MsgBoxStyle.Information)
End Try
End Select
End If
End Sub
Could this be a problem with my xenocode program?
Thanks
Last edited by a moderator: