Rep_pic(num).Print(LSTR & VB6.Format(Description, "00") & Crlf & "BOTTOM", TAB(38), VB6.Format(Count, "00") & " " & VB6.Format(MLEN, "0.00") & " " & VB6.Format(MWID, "0.00"), TAB(71), VB6.Format(QTY9, "0.00"))
Error 10 'Print' is not a member of 'System.Windows.Forms.Panel'.
print is not use in vbdotne
please help
6 3310
What are you trying to do with that Print then? As you can see there is no Print method in the Panel class.
Throw a Label control on their and append text to it?
Or use the Graphics object to DrawString() onthe control itself
What are you trying to do with that Print then? As you can see there is no Print method in the Panel class.
sir
i want to print report in txt formet
sir
i want to print report in txt formet
Do you want to send a report to a printer or do you want to display some text on a Panel?
Do you want to send a report to a printer or do you want to display some text on a Panel?
sir
actully i want to convert vb6.0 project in vbdotnet.
vb6.0 code as follows:======== - Private Sub manualload()
-
-
Dim Data As Single
-
Dim QTY As Double
-
Dim QTY1 As Double
-
Dim QTY2 As Double
-
Dim Totalquantity As Single
-
Dim criteria As String
-
Dim ColumnTotal As Double
-
Dim Cum As String
-
Dim Count As Single
-
Dim ds As Recordset
-
-
Dim LLL As Single
-
Dim Strlength As Single
-
Dim StrBreadth As Single
-
Dim STRDEPTH As Single
-
Dim LENSTR As Single
-
LLL = 32
-
STRCOUNT = 6
-
Strlength = 6
-
StrBreadth = 6
-
STRDEPTH = 5
-
-
-
FFN = FreeFile
-
Open repnam For Output As #FFN
-
-
Header
-
criteria = "Select * from WSSDefin order by Description asc"
-
Set ds = CurDb.OpenRecordset(criteria, dbOpenDynaset)
-
-
Rep_Col1 = ""
-
REP_COL2 = ""
-
-
''MSGBOX repnam
-
While Not ds.EOF
-
-
-
If cpsharma Then
-
cpsharma = False
-
Dstair.MoveLast
-
cpS = ds.RecordCount
-
ds.MoveFirst
-
Pre = Format(50 / cpS, "0.00")
-
End If
-
percent = percent + Pre
-
If percent >= 100 Then
-
percent = 100
-
End If
-
Main_frm.STATUS_BAR.Panels(1) = "Processing Complete " & Format(percent, "0.00") & "%"
-
-
No = ds(1)
-
length = ds(2)
-
Breadth = ds(3)
-
Depth = ds(4)
-
-
Count = ds(1)
-
-
-
If (ds(3) <> 0) And (ds(4) <> 0) Then 'No * Length * Breadth *Depth
-
Cum = "CuM"
-
QTY = ds(1) * ds(2) * ds(3) * ds(4)
-
Totalquantity = Totalquantity + QTY
-
ColumnTotal = ColumnTotal + Count
-
Rep_pic(num).Print ds(0); Tab(38); Format(ds(1), "00"); Tab(44); Format(ds(2), "0.00"); Tab(53); Format(ds(3), "0.00"); Tab(63); Format(ds(4), "0.00"); Tab(70); Format(QTY, "0.00")
-
REP_COL2 = REP_COL2 + ds(0) + Space(LLL - Str$(Len(ds(0)))) + Format(ds(1), "00") + Space(STRCOUNT - Str$(Len(ds(1)))) + Format(ds(2), "0.00") + Space(Strlength - Str$(Len(ds(2)))) + Format(ds(3), "0.00") + Space(StrBreadth - Str$(Len(ds(3)))) + Format(ds(4), "0.00") + Space(STRDEPTH - Str$(Len(ds(4)))) + Format(QTY, "00.00") + Crlf
-
-
End If
-
-
If (ds(3) = 0) Then 'No * Length * Depth
-
Cum = "SqM"
-
QTY = ds(1) * ds(2) * ds(4)
-
Totalquantity = Totalquantity + QTY
-
ColumnTotal = ColumnTotal + Count
-
Rep_pic(num).Print ds(0); Tab(38); Format(ds(1), "00"); Tab(44); Format(ds(2), "0.00"); Tab(63); Format(ds(4), "0.00"); Tab(70); Format(QTY, "0.00")
-
REP_COL2 = REP_COL2 + ds(0) + Space(LLL - Str$(Len(ds(0)))) + Format(ds(1), "00") + Space(STRCOUNT - Str$(Len(ds(1)))) + Format(ds(2), "0.00") + Space(Strlength - Str$(Len(ds(2)))) + Space(StrBreadth + 3) + Format(ds(4), "0.00") + Space(STRDEPTH - Str$(Len(ds(4)))) + Format(QTY, "00.00") + Crlf
-
-
End If
-
-
If (ds(4) = 0) And (ds(2) <> 0) And (ds(3) <> 0) Then 'No * Length * Breadth
-
Cum = "SqM"
-
QTY = ds(1) * ds(2) * ds(3)
-
Totalquantity = Totalquantity + QTY
-
ColumnTotal = ColumnTotal + Count
-
Rep_pic(num).Print ds(0); Tab(38); Format(ds(1), "00"); Tab(44); Format(ds(2), "0.00"); Tab(53); Format(ds(3), "0.00"); Tab(70); Format(QTY, "0.00")
-
REP_COL2 = REP_COL2 + ds(0) + Space(LLL - Str$(Len(ds(0)))) + Format(ds(1), "00") + Space(STRCOUNT - Str$(Len(ds(1)))) + Format(ds(2), "0.00") + Space(Strlength - Str$(Len(ds(2)))) + Format(ds(3), "0.00") + Space(StrBreadth - Str$(Len(ds(3)))) + Space(STRDEPTH + 3) + Format(QTY, "00.00") + Crlf
-
-
End If
-
-
Rep_pic(num).Print
-
REP_COL2 = REP_COL2 + Crlf
-
Lcount = Lcount + 1
-
Checkpagelimit
-
QTY = 0
-
length = 0
-
Breadth = 0
-
Depth = 0
-
-
ds.MoveNext
-
Wend
-
Checkpagelimit
-
ReportFooter ColumnTotal, Totalquantity, Cum
-
Page.Caption = "Page: " & 1 & " of " & num + 1
-
Print #FFN, REP_COL2 '+ Chr(12)
-
Close #FFN
-
ds.Close
-
End Sub
please help to convert in vbdotnet
What type of object is Rep_pic?
And more specifically, you are using it as an array? (Rep_pic(num)), so what type of object is returned by Rep_pic(num) ?
Based on the error message it looks like its a Panel. So you have an array of Panels?
.Print() in vb6 I *thought* was used to just print text directly onto the form/control. That was a silly process, just use a label.
I will never understand how I once thought VB was a good language.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: swb |
last post by:
Hi - I have a simple project that manipulates Adobe Illustrator that works
fine at home on Windows XP Pro (with admin login), but gives me an error
(error message and source code below) at work...
|
by: hesing Qiang |
last post by:
In Print Process,I use the code,but it is not run
correctly On WINDOWS 98 .
I didn't know why ...?
this.Font = new System.Drawing.Font("宋体", 10.5F,
System.Drawing.FontStyle.Regular,...
|
by: David Sabo |
last post by:
Hi all...
I having trouble printing on Win98. I cannot print more than once if I'm
lucky in win98, when the printdocument.print() is executed the following
Exception is raised. It doesn't start...
|
by: lumazi |
last post by:
Hello all,
I'm having an issue printing to a network printer. The line of code
is fairly simple
printDocument1.Print();
When you select print from a local printer it works fine, when you...
|
by: Adrian |
last post by:
hi
I'm attempting to build an app then sends a request to a URL and reads the
response it works fine on my test site but when I connect to a real system I
get the text below, I guess its...
|
by: Tony Girgenti |
last post by:
Hello.
Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a
windows XP Pro, SP2.
Before printing a document, i want to set the font to a font that is only
available...
|
by: Henry Stock |
last post by:
I am trying to understand the following error:
Any thing you can tell me about this is appreciated.
Security Exception
Description: The application attempted to perform an operation not allowed...
|
by: radhikabista |
last post by:
my windows application form is divided into 3 split containers or split panels now what is my problem is i need to print the contents of the middle one container even if it is not seen full. but i...
|
by: Scott Stark |
last post by:
Hello,
I'm *just* delving into Windows forms-based programming without the benefit
of any books, etc. I have a background in light ASP.NET work, so forgive me
if this is a really basic question...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |