Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27344

Users getting an error when starting my application

$
0
0
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

Viewing all articles
Browse latest Browse all 27344

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>