Solved

VB.net Migration Questions

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
userCompare  challenge 3 61
find a node in VST 2 47
countHi challenge 25 85
stringclean challenge 26 57
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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 …
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…

760 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