Results 1 to 11 of 11

Thread: Users getting an error when starting my application

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    26

    Users getting an error when starting my application

    Hello !

    Just wrote a small console application which converts images into other image file formats.
    When I am running it on my computer it doesn't give any error messages but when users run it then the application gives out this message:


    And the code is here:
    Code:
    Imports System.Drawing
    Imports System.IO
    Module Module1
    
        Sub Main()
            Console.WriteLine("Converting images")
            Try
                command()
            Catch ex As Exception
                Console.WriteLine(ex.Message)
            End Try
            Console.WriteLine("Done")
            Console.ReadLine()
        End Sub
        Private Sub command()
            Console.WriteLine(My.Application.Info.DirectoryPath)
            Dim di As New IO.DirectoryInfo(My.Application.Info.DirectoryPath & "\")
            Dim diar1 As IO.FileInfo() = di.GetFiles()
            Dim dra As IO.FileInfo
            For Each dra In diar1
                Dim path1 As String = dra.ToString
                Try
                    Dim bmp As New Bitmap(path1)
                    Dim file_path As String = Path.GetDirectoryName(path1)
                    Console.WriteLine(file_path)
                    Dim name As String = Path.GetFileNameWithoutExtension(path1)
                    Dim new_file_path As String = My.Application.Info.DirectoryPath & "\" & name & ".dds"
                    DevIL.DevIL.SaveBitmap(new_file_path, bmp)
                    Console.WriteLine(new_file_path)
                Catch ex As Exception
                    Console.WriteLine(ex.Message)
                End Try
            Next
        End Sub
    End Module
    Also I will attach a dll file and compiled exe file.
    Application should be build with 3.5 framework and as 86x bit (32x), in the attachment exe file was compiled with VB2008 .Net version.
    Where might be a problem ... ?
    Thank you
    Last edited by Joacim Andersson; May 11th, 2013 at 09:03 AM. Reason: Removed attachment

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width