Solved

VB.net Migration Questions

Posted on 2006-10-24
3
1,563 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 85

Accepted Solution

by:
Mike Tomlinson earned 250 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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

772 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