Как передать параметр value для system.int64
Всем Привет,
Мне трудно передать параметр в нижнюю строку.
'myEncoderParameter = New EncoderParameter(myEncoder, CType(20L, Int32)) myEncoderParameter = New EncoderParameter(myEncoder, CType(xx, Int32))
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Dim xx As System.Int64 xx = 20 & "L" Try If Not IO.Directory.Exists("C:\Folder\") Then IO.Directory.CreateDirectory("C:\Folder\") 'Dim bit As Bitmap = CaptureScreen(0, 0, Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height) Dim myImageCodecInfo As ImageCodecInfo Dim myEncoder As Encoder Dim myEncoderParameter As EncoderParameter Dim myEncoderParameters As EncoderParameters Dim bit As Bitmap = CaptureScreen(0, 0, Screen.AllScreens.Sum(Function(s As Screen) s.Bounds.Width), Screen.AllScreens.Max(Function(s As Screen) s.Bounds.Height)) myImageCodecInfo = GetEncoderInfo(ImageFormat.Jpeg) myEncoder = Encoder.Quality myEncoderParameters = New EncoderParameters(1) 'myEncoderParameter = New EncoderParameter(myEncoder, CType(20L, Int32)) myEncoderParameter = New EncoderParameter(myEncoder, CType(xx, Int32)) 'myEncoderParameter = New EncoderParameter(myEncoder, Fix(EncoderValue.CompressionLZW)) myEncoderParameters.Param(0) = myEncoderParameter 'myBitmap.Save("Shapes025.jpg", myImageCodecInfo, myEncoderParameters) bit.Save("C:\Folder\" & Format(Now, "yyyyMMdd hhmmss") & ".jpg", myImageCodecInfo, myEncoderParameters) bit.Dispose() Catch If Err.Number = "-2147467261" Then Exit Sub End If End Try End Sub
Что я уже пробовал:
'myEncoderParameter = новый EncoderParameter(myEncoder, CType(20L, Int32))
myEncoderParameter = новый EncoderParameter(myEncoder, CType(xx, Int32))