Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB.net Migration Questions

Posted on 2006-10-24
3
Medium Priority
?
1,616 Views
Last Modified: 2012-06-27
Hi,

I converted VB6 Project to VB.net (Visual Studio 2005), using Conversion wizard in VS 2005.

After converting its gave me 200 Errors, I am trying to solve those.. I have few doubts here, let mention here. I need Experts help to clear those errors..

Q1.

If App.StartMode = vbSModeStandalone Then
            x = InputBox("Please enter your ID", My.Application.Info.Title)
            strID = x
            If frmMax.SetupMax Then
                frmMax.Show()
            End If
        End If

in this its giving error as

Name 'App' is not declared.
Name 'vbSModeStandalone' is not declared.  

Q2. In VB6 Code i have.
Printer.PaperSize = vbPRPSLetter
Printer.PrintQuality = vbPRPQHigh
Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.Orientation = vbPRORLandscape
Printer.Font = VB6.FontChangeBold(Printer.Font, True)
Printer.PaintPicture(picForm.Image, 0, 1000)

for this Q2, its giving error as
Name 'Printer' is not declared

Q3. I have PictureBox in VB6, after converting.

picForm.ScaleMode = mTWIPS
Error: 'ScaleMode' is not a member of 'System.Windows.Forms.PictureBox'.

picForm.AutoRedraw = True
Error: 'AutoRedraw' is not a member of 'System.Windows.Forms.PictureBox'.

picForm.hdc
Error: 'hdc' is not a member of 'System.Windows.Forms.PictureBox'.

Most of Errors on Printer Side..

Please guide me solve these Errors, Please be Elobrate while Giving reply..

Thanks
Jen
0
Comment
Question by:netpicker9
3 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 1000 total points
ID: 17800969
There is no direct equivalent of AutoRedraw in VB.Net:

    picForm.AutoRedraw = True
    Error: 'AutoRedraw' is not a member of 'System.Windows.Forms.PictureBox'.

How are you using the PictureBox?  With respect to this error alone...a completely different approach may be necessary to accomplish the same thing in VB.Net.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this post we will learn different types of Android Layout and some basics of an Android App.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Screencast - Getting to Know the Pipeline

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question