Hi guys!
i'm flash.tato a young developer.
I have a problem to convert this code from VB6 to C# and VB.NET.
Can anyone convert this code from VB6 to C# and VB.NET
rivate Sub cmdBIN2GIF_Click()
Dim sInput As String
Dim iIndex As Integer
Dim lPos As Long
Dim lLen As Long
Dim Fine As Boolean
Dim sDestinazione As String
On Local Error Resume Next
If cdlBrowse.FileName <> "" Then
Label2.Caption = "Estrazione GIF in corso..."
Open cdlBrowse.FileName For Binary As #1
sInput = Space(FileLen(cdlBrowse.FileName))
Get #1, 1, sInput
Close #1
PB1.Max = InStrRev(UCase$(sInput), "GIF89")
PB1.Min = 0
PB1.Value = 0
iIndex = 0
sDestinazione = Mid$(cdlBrowse.FileName, 1, InStrRev(cdlBrowse.FileName, ".") - 1)
MkDir (sDestinazione)
While Not Fine
DoEvents
lPos = InStr(2, UCase$(sInput), "GIF89")
PB1.Value = PB1.Value + lPos
If lPos <> 0 Then
iIndex = iIndex + 1
Open sDestinazione & "\GIF" & iIndex & ".gif" For Binary As #2
Put #2, 1, Mid$(sInput, 1, lPos - 1)
Close #2
sInput = Mid$(sInput, lPos)
Else
Fine = True
End If
Wend
iIndex = iIndex + 1
lPos = InStr(2, UCase$(sInput), "GIF87A")
PB1.Value = PB1.Max
Open sDestinazione & "\GIF" & iIndex & ".gif" For Binary As #2
If lPos = 0 Then
Put #2, 1, sInput
Else
Put #2, 1, Mid$(sInput, 1, lPos - 1)
End If
Close #2
MsgBox "Estrazione GIF Completata!" & vbCr & "Estratte " & iIndex & " immagini!", vbInformation, "GIF Info"
End If
End Sub
Thanks :D

Can anyone convert a code from VB6 to C# and VB.NET?
AxeldraX
Hello
So what make a VB project of that and send it to me I will send you the Code. Can you create a project from that single file
jwize
OniShiro
HI
I am sorry, I cant help u right now but you can find a solution on http://www.gotdotnet.com/codegallery/codegallery.aspx id=07c69750-9b49-4783-b0fc-94710433a66d by psoting ur problem
bk13
Josh Smith
I think that you didn't understand.
I haven't got VB6 and VS2003/VS2005. :(
nabeelfarid
I haven't got VS2003 :( but Visual Basic Express Edition and Sharp Develop.
For this i asked here if anyone can convert that code. ;)
Espriella
Hi
I don't have the VB6 Intsalled so If you send me the whole project Then I can Convert it for you. at akbarbuneri[at]gmail.com. A single file cannot be coverted it needs a coplete VB project. Or you can search for an online convertor to convert.
Rafet
Hi
There is an option in VS2003. If you have installed VS2003 then Click File ->Open ->Convert
Here you can convert a VB6 Project To VB.NET Project
I don't know that this option is avalable in VS2005 or not