Solved

VB.net Migration Questions

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Specific format 21 181
When i run adoquery my application freezes 26 150
Apps blocked by Java 9 60
Q2. How to run DAX query from SSMS. I don’t see any DAX query type. 1 46
RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now