|
-
Nov 21st, 2003, 06:56 PM
#1
Thread Starter
New Member
PictureBox Scaling - conversion problem from VB6 to VB.NET
Hi Folks,
We have a function like PictureBox.Scale(x1,y1)-(x2,y2) which scales the picturebox between the specified coordinates. Can any one tell me what is the equivalent of this in VB.net?
My VB6 code is
FrmTestData.DefInstance.Picture1.Scale (0, 1024) - (2048, 0)
What is its equivalent in VB.NET?
Thanks in advance
Ken
-
Nov 22nd, 2003, 06:18 AM
#2
Fanatic Member
in .Net, there is uitility called 'Upgrade Visual Basic 6 code' in Tools section. Type ur code in code editor and use this tool.
I hope it helps
regards
prakash
-
Nov 22nd, 2003, 09:46 AM
#3
Lively Member
Originally posted by pvbangera
[B]in .Net, there is uitility called 'Upgrade Visual Basic 6 code' in Tools section. Type ur code in code editor and use this tool.
I hope it helps
B]
it won't help at all.
there is no exact equivalent to that very line, like there is no equivalent to the c# 'continue'. your just going to do what you were trying to do by using your own written dependencies.
DannyJoumaa
Advanced VB6 Programmer
Intermediate-Advanced VB .NET Programmer
Intermediate C# Programmer
Intermediate Win32 Developer
Beginner Mac OS X Developer
Contact: [email protected]
Favorite Sayings:
"Every time you open your mouth, you prove your an idiot."
"God is a programmer. Satan is a bug. Life is debugging."
-
Nov 22nd, 2003, 10:40 AM
#4
I wonder how many charact
The equivalent in .Net is to use an overloaded version of Graphics.DrawImage. Search the Vb.Net forums or google for more complete examples:
VB Code:
Dim g as Graphics = PictureBox1.CreateGraphics
Dim srcRect = New Rectangle(XVal_From, YVal_From, Width, Height)
g.DrawImage(PictureBox1.Image, XVal_To, YVal_To, srcRect, GraphicsUnit.Pixel)
And the VB-equivalent for C# continue is quite irrelevant, since you simply construct another if not -end if statement to skip code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|