Results 1 to 11 of 11

Thread: [RESOLVED] Marquee Text in VB 6.0

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2014
    Posts
    30

    Resolved [RESOLVED] Marquee Text in VB 6.0

    Hi All,


    I have created one vb program, the purpose of this program is to display marquee text. It's working in my system.

    i have one input box, in that input box when i say message to display..it display's message in label box using timer control....
    But i have placed this program in network path......when i say to display message it display's only in my system..but at same time this program is running on another machine through the network path "That message is not showing in another system....please give any suggestion to display message in all machines through the runtime....
    Code:
    Private Sub Command1_Click()
    Dim ans As String
    ans = InputBox("Enter something to be displayed in the label")
    If ans = "" Then
    Label1.Caption = "No message"
    Else
    
    Label1.Caption = ans
    Timer1.Enabled = True
    
    End If
    End Sub
    
    Private Sub Timer1_Timer()
    Static i As Integer
    
    For i = 1 To 3
    
    Label1.Caption = " " & Label1.Caption
    Next i
    
    End Sub

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Marquee Text in VB 6.0

    If you are saying the font of the message is not the same as when you run the project on your computer you need to make sure that the font you are using is installed on the other computer too.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3
    Hyperactive Member
    Join Date
    Jun 2014
    Location
    Lahore, Pakistan
    Posts
    450

    Re: Marquee Text in VB 6.0

    Yes, the font should be installed on all the systems on which this app is running.

  4. #4
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Marquee Text in VB 6.0

    Quote Originally Posted by rajmohan View Post
    "That message is not showing in another system....
    I'm a little confused here. Does the message not show at all, I mean absolutely nothing, or is it showing garbage of either the same font you used on your system or some other font


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  5. #5
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Marquee Text in VB 6.0

    Also confused....not quite sure what your issue is...however, the code below is, IMHO, a better way for a marque......
    See if THIS works on your system, and whatever system you have it installed on...
    Code:
    Option Explicit
    Private Sub Command1_Click()
    
    label1.Caption = "Hello World. Sams's Example of a Marquee."
    label1.Alignment = vbRightJustify
    Me.Font = label1.Font
    label1.Width = Me.TextWidth(label1.Caption) + 3
    Timer1.Interval = 100
    Timer1.Enabled = True
    End Sub
    Private Sub Form_Load()
    Timer1.Enabled = False
    End Sub
    Private Sub Timer1_Timer()
    Static i As Integer
    If Timer1.Interval = 100 Then
    i = i + 1
    label1.Move label1.Left - 100
    i = 1
    If label1.Left + label1.Width < 0 Then
    label1.Left = Me.Width
    End If
    End If
    End Sub

  6. #6
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Marquee Text in VB 6.0

    If you're inputting the 'message' via an InputBox it will be private to the instance of the program running on that Computer. You could create a shared textfile contining the 'message' and each instance could read it. Failing that, you could use just about any of the Interproceess Communictions methods.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jul 2014
    Posts
    30

    Re: Marquee Text in VB 6.0

    Quote Originally Posted by hamza.saleem View Post
    Yes, the font should be installed on all the systems on which this app is running.
    Font is not a matter, the message is not itself showing in all the system, the main concept is i have one exe and i loaded into in network path, using that EXE file everyone is having shortcut on that in their desktop and i input one message in input box that message is showing only in my system....but it's showing in other's system..please advice on this issue..........

  8. #8
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Marquee Text in VB 6.0

    Quote Originally Posted by rajmohan View Post
    Font is not a matter, the message is not itself showing in all the system, the main concept is i have one exe and i loaded into in network path, using that EXE file everyone is having shortcut on that in their desktop and i input one message in input box that message is showing only in my system....but it's showing in other's system..please advice on this issue..........
    I think you mean ....not showing.....


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  9. #9
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Marquee Text in VB 6.0

    I remember something such as this pointing to a network issue! Whether or not it was read/write access on the server I can not remember. However why are you running the program off the server instead of each machine locally?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  10. #10
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Marquee Text in VB 6.0

    Quote Originally Posted by rajmohan View Post
    using that EXE file everyone is having shortcut on that in their desktop and i input one message in input box that message is showing only in my system....but it's showing in other's system..please advice on this issue..........
    See Post #6

    If you put a program on a shared drive and it is executed by multiple users on multiple computers, each user will have a copy of the program in their virtual storage. All the data associated with each instance of the program is private to that instance. So, basically if you and I are running the same program from a shared drive and you input something into your instance, I will not be able to see that data, because it resides in your Virtual Storage and not mine.

    To do what you're looking to do you will have to 'send' the message you want to display, to all the running instances of the program. (actually you'd probably implement it so that when each instance starts up it requests the message from your machine) To do this you would probably use one of the many Interprocess Communications facilities offered by Windows. I personally would use Winsock.
    Last edited by Doogle; Jul 26th, 2014 at 03:50 AM.

  11. #11
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: Marquee Text in VB 6.0

    Quote Originally Posted by Doogle View Post
    If you're inputting the 'message' via an InputBox it will be private to the instance of the program running on that Computer. You could create a shared textfile contining the 'message' and each instance could read it. Failing that, you could use just about any of the Interproceess Communictions methods.
    I would create a file and make the program look if any information changed in it, if it did change then load it into your program.
    This would be the easiest method, but as your program gets more controls, it will get more complicated.

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