CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: Multiple Forms

  1. #1
    Join Date
    May 2004
    Posts
    249

    Multiple Forms

    IS it possible to print data from one form on to the next form...i mean printing on the form itself rather than using labels

  2. #2
    Join Date
    Aug 2003
    Location
    India
    Posts
    81

    Question Re: Multiple Forms

    u mean the print "Message" command?

  3. #3
    Join Date
    May 2004
    Posts
    249

    Re: Multiple Forms

    no i meant actually printin the data on the next form... i tried to print it on labels but i guess i made mistake somewhere

    so please hava look at the code n say soemthing
    Attached Files Attached Files

  4. #4
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,901

    Re: Multiple Forms

    ' In a module
    Public DataToPrint as String


    'In Form1

    Public Command1_Click()
    DataToPrint = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    Load Form2
    End sub

    'In Form2

    Private Sub Form_ACTIVATE()
    Print DataToPrint
    End Sub

  5. #5
    Join Date
    May 2004
    Posts
    249

    Re: Multiple Forms

    can that b done some ways using loops

  6. #6
    Join Date
    Jun 2002
    Location
    West Virginia
    Posts
    131

    Re: Multiple Forms

    create a property on form2:
    Public Property Let PrintStatement(ByVal strValue As String)
    Print strValue
    End Property

    on form1 do:
    Private Sub Command1_Click()
    Dim x As Integer
    Form2.Show
    For x = 1 To 10
    Form2.PrintStatement = "Data " & x
    Next
    End Sub

    Form2 has to be showing before printing to it.
    Wayne

  7. #7
    Join Date
    May 2004
    Posts
    249

    Re: Multiple Forms

    so in this case there will b nothing declared inthe module

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured