farshad Posted July 25, 2003 Posted July 25, 2003 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 Quote Farshad
Leaders dynamic_sysop Posted July 25, 2003 Leaders Posted July 25, 2003 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() '////////////////////////////////////// Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.