I am very new to VB.net I am not look for someone to just do it for me just send me in the Right direction I want to learn but I keep tripping up on Conversion from string "C:\Users\Zach\Desktop" to type 'Integer' is not valid. Please shed some light on my error.
Imports System
Imports System.IO
Imports System.Text
Imports System.IO.Directory
Public Class Form1
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Me.Close()
End Sub
Private Sub PictureBox1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseEnter
PictureBox1.Image = My.Resources.Exit_2
End Sub
Private Sub PictureBox1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
PictureBox1.Image = My.Resources._Exit
End Sub
Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox2.Click
Process.Start("FILE NAME")
MsgBox("Downloading Arma 3 Mods")
End Sub
Private Sub PictureBox2_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.MouseEnter
PictureBox2.Image = My.Resources.Download_2
End Sub
Private Sub PictureBox2_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.MouseLeave
PictureBox2.Image = My.Resources.Download
End Sub
Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox3.Click
Call Console.WriteLine("GetFolderPath: eclipse", Environment.GetFolderPath(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)))
Dim path As String = "eclipse"
Dim path2 As String = "C:\Program Files (x86)"
Try
If File.Exists(path) = False Then
' This statement ensures that the file is created,
' but the handle is not kept.
Dim fs As FileStream = File.Create(Path)
fs.Close()
End If
' Ensure that the target does not exist.
If File.Exists(path2) Then
File.Delete(path2)
End If
' Move the file.
File.Move(path, path2)
Console.WriteLine("{8} moved to {1}", path, path2)
' See if the original file exists now.
If File.Exists(path) Then
Console.WriteLine("The original file still exists, which is unexpected.")
Else
Console.WriteLine("The original file no longer exists, which is expected.")
End If
Finally
End Try
End Sub
Private Sub PictureBox3_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox3.MouseEnter
PictureBox3.Image = My.Resources.Move_File_2
End Sub
Private Sub PictureBox3_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox3.MouseLeave
PictureBox3.Image = My.Resources.Move_File
End Sub
Class Sample
Public Shared Sub Main()
Console.WriteLine()
Console.WriteLine("GetFolderPath: {0}", Environment.GetFolderPath(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)))
End Sub 'Main
End Class 'Sample
End Class