473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

'Print' is not a member of 'System.Windows.Forms.Panel'

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
Oct 21 '08 #1
6 3310
r035198x
13,262 8TB
What are you trying to do with that Print then? As you can see there is no Print method in the Panel class.
Oct 21 '08 #2
Plater
7,872 Expert 4TB
Throw a Label control on their and append text to it?
Or use the Graphics object to DrawString() onthe control itself
Oct 21 '08 #3
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
Oct 22 '08 #4
r035198x
13,262 8TB
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?
Oct 22 '08 #5
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:========
Expand|Select|Wrap|Line Numbers
  1. Private Sub manualload()
  2.  
  3.   Dim Data As Single
  4.    Dim QTY As Double
  5.    Dim QTY1 As Double
  6.    Dim QTY2 As Double
  7.    Dim Totalquantity As Single
  8.    Dim criteria As String
  9.    Dim ColumnTotal As Double
  10.    Dim Cum As String
  11.    Dim Count As Single
  12.    Dim ds As Recordset
  13.  
  14. Dim LLL As Single
  15. Dim Strlength As Single
  16. Dim StrBreadth As Single
  17. Dim STRDEPTH As Single
  18. Dim LENSTR As Single
  19. LLL = 32
  20. STRCOUNT = 6
  21. Strlength = 6
  22. StrBreadth = 6
  23. STRDEPTH = 5
  24.  
  25.  
  26.    FFN = FreeFile
  27.    Open repnam For Output As #FFN
  28.  
  29.    Header
  30.    criteria = "Select * from WSSDefin order by Description  asc"
  31.    Set ds = CurDb.OpenRecordset(criteria, dbOpenDynaset)
  32.  
  33.    Rep_Col1 = ""
  34.    REP_COL2 = ""
  35.  
  36.    ''MSGBOX repnam
  37.    While Not ds.EOF
  38.  
  39.  
  40.       If cpsharma Then
  41.         cpsharma = False
  42.         Dstair.MoveLast
  43.         cpS = ds.RecordCount
  44.         ds.MoveFirst
  45.         Pre = Format(50 / cpS, "0.00")
  46.    End If
  47.     percent = percent + Pre
  48.     If percent >= 100 Then
  49.         percent = 100
  50.     End If
  51.     Main_frm.STATUS_BAR.Panels(1) = "Processing Complete " & Format(percent, "0.00") & "%"
  52.  
  53.           No = ds(1)
  54.          length = ds(2)
  55.          Breadth = ds(3)
  56.          Depth = ds(4)
  57.  
  58.          Count = ds(1)
  59.  
  60.  
  61.        If (ds(3) <> 0) And (ds(4) <> 0) Then           'No * Length * Breadth *Depth
  62.         Cum = "CuM"
  63.         QTY = ds(1) * ds(2) * ds(3) * ds(4)
  64.          Totalquantity = Totalquantity + QTY
  65.          ColumnTotal = ColumnTotal + Count
  66.          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")
  67.          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
  68.  
  69.          End If
  70.  
  71.         If (ds(3) = 0) Then        'No * Length * Depth
  72.          Cum = "SqM"
  73.          QTY = ds(1) * ds(2) * ds(4)
  74.          Totalquantity = Totalquantity + QTY
  75.          ColumnTotal = ColumnTotal + Count
  76.          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")
  77.          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
  78.  
  79.         End If
  80.  
  81.          If (ds(4) = 0) And (ds(2) <> 0) And (ds(3) <> 0) Then 'No * Length * Breadth
  82.          Cum = "SqM"
  83.          QTY = ds(1) * ds(2) * ds(3)
  84.          Totalquantity = Totalquantity + QTY
  85.          ColumnTotal = ColumnTotal + Count
  86.          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")
  87.          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
  88.  
  89.         End If
  90.  
  91.         Rep_pic(num).Print
  92.         REP_COL2 = REP_COL2 + Crlf
  93.         Lcount = Lcount + 1
  94.         Checkpagelimit
  95.         QTY = 0
  96.         length = 0
  97.         Breadth = 0
  98.         Depth = 0
  99.  
  100.         ds.MoveNext
  101.    Wend
  102.    Checkpagelimit
  103.    ReportFooter ColumnTotal, Totalquantity, Cum
  104.    Page.Caption = "Page: " & 1 & " of " & num + 1
  105.    Print #FFN, REP_COL2 '+ Chr(12)
  106.    Close #FFN
  107. ds.Close
  108. End Sub

please help to convert in vbdotnet
Oct 23 '08 #6
Plater
7,872 Expert 4TB
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.
Oct 23 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
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...
0
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,...
2
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...
0
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...
1
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...
24
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...
5
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...
1
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...
9
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
Oralloy
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,...
0
jinu1996
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...
0
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...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.