Results 1 to 4 of 4

Thread: "Dynamically" make text appear on the form!

  1. #1

    Thread Starter
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    "Dynamically" make text appear on the form!

    I thought about loading multiple labels but that would consume a lot of memory. I think there used to be a print function in VB but now there isnt!!!

    Do any of the lost programmers out there possess this knowledge?
    (Do you guys know?)
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    You sure there isn't a Print function? I've never used it but I thought there was.

    You can get the DC of the form and use GDI functions to do it.
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    Zaei
    Guest
    There is a print function, but its hidden (like Line). Form/PictureBox/Printer/Debug.Print "blah blah". It uses "CurrentX" and "-Y" to tell where to put it.

    Z.

  4. #4
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    Form.Print will still work...

    But you can also go fancy and use the API :

    Code:
    Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" _
        (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, _
        ByVal lpString As String, ByVal nCount As Long) As Long
    
    Form.AutoRedraw = True
    TextOut Form.hDC, 50, 50, "This is a form", Len("This is a form")
    Form.Refresh

    Offcoure the Print function will do just the same, it's just that I like the API ...



    the alien's are invading!!

    (sorry, but they won't let me put the img tag in my signature )
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

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