Results 1 to 7 of 7

Thread: Rotate Captions or Text boxs?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Posts
    127

    Rotate Captions or Text boxs?

    I know its been asked before, but all the previous threads about it pointed to a link that doesn't exist anymore.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    VB Code:
    1. Private Sub Form_Load()
    2.  
    3. Me.Caption = "This is a scrolling caption     "
    4. Timer1.Interval = 400
    5. Timer1.Enabled = True
    6. End Sub
    7.  
    8. Private Sub Timer1_Timer()
    9.  
    10.     Me.Caption = Right$(Me.Caption, Len(Me.Caption) - 1) & Left$(Me.Caption, 1)
    11.    
    12. End Sub

  3. #3
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    1. By using a .OCX.

    2. By using API.



    Bruce.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Posts
    127
    Martin, thanks but I want something to rotate, like going around in a circlular manor.

    Bruce, are you sure you have to use one of those two things to do it?

  5. #5
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Bob,

    I wouldn't expect it will be too simple.


    Suggestion: Can us use a Rotaing Image?


    Bruce.

  6. #6
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    This example rotates TEXT, not the TextBox/Label, however, it
    may be an option for you



    Bruce.

  7. #7
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    I was playing with the following. If you adopted the lookup table idea above,
    you could manipulate the X, Y co-ords (below) to do something similar
    without the overheads:


    VB Code:
    1. Option Explicit
    2.  
    3. 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
    4.  
    5. Private Sub Form_Paint()
    6.  
    7.     TextOut Me.hdc, 100, 100, "A", 1
    8.     TextOut Me.hdc, 120, 120, "B", 1
    9.     TextOut Me.hdc, 140, 140, "C", 1
    10.  
    11. End Sub


    The above will yeild A, B, C diagonally down the Form.


    EDIT: The above refernce to the .OCX has been updated, here it is.






    Bruce.
    Last edited by Bruce Fox; Nov 20th, 2003 at 10:34 PM.

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