Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Can you convert this vb 6 code to vb.net 2003 ?

I tried it but the system can not upgrade the picturebox

Thank you

 

Dim sFileName As String, resID As Long, ret As Boolean

Picture1.Cls

Command1.Enabled = False

Command3.Enabled = True

If Option1(0).Value = True Then

sFileName = Text1.Text: resID = 0

Else

sFileName = "Shell32.dll": resID = Mid(Combo1.List(Combo1.ListIndex), 10)

End If

If Option2(0).Value = True Then

ret = PlayAviCtrl(Picture1.hWnd, sFileName, resID, Check1.Value, Check2.Value, Check3.Value)

Else

ret = PlayAviMCI(Picture1.hWnd, sFileName, resID, Check1.Value, Check2.Value, False)

End If

If ret = False Then

Picture1.Print "Unable to play this AVI"

Command3_Click

End If

Farshad
  • Leaders
Posted

regarding the picturebox stuff here's some changes that may help you :

hwnd's :

'/// in vb6 :
picturebox1.HWnd
'///
'/// in .Net :
picturebox1.Handle.ToInt32()
'///
'//////////////////////////////////////

 

print ( text to picture box )

'/// in vb6 :
picturebox1.Print " some text "
'///
'/// in .Net :
       Dim g As Graphics = picturebox1.CreateGraphics()
       g.DrawString(" some text ", New Font("Tahoma", 10), New SolidBrush(Color.Red), 0, 2)
       g.Dispose()
'//////////////////////////////////////

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...