none
Openning multiple Graphics Windows at the same time RRS feed

  • General discussion

  • I just stumbled upon this idea while doing one of the monthly challenges and thought someone might want to explore it further.

    Opening multiple Graphics Windows simultaneously using a "multi threading loop" and native SB. I don't know if such a loop exists, I had to call it something.

    Its worked perfectly 1 out of 3 times when I've run it. So you may need to run it a couple of times to get it to work. Could be a time waster, but you never know. I not sure exactly how it works and there's probably heaps of issues with it.

    Timer.Interval = 10
    
    Timer.Tick = FirstWindowThread
    
    While "true"
      If flagNext = 1 Then    
        Timer.Tick = SecondWindowThread
        flagNext = 0
      EndIf
      Program.Delay(18)
    EndWhile
    
    Sub FirstWindowThread
      GraphicsWindow.Left = 5
      GW1_message = Shapes.AddText("First Window")
      flagNext = 1
    EndSub
    
    Sub SecondWindowThread 
      Shapes.HideShape(GW1_message)
      GraphicsWindow.Left = 500
      GraphicsWindow.DrawText(10, 10, "Second Window")
    EndSub

    Saturday, November 9, 2013 11:43 AM
    Moderator

All replies

  • Your timer.interval is rather small (10 ms = 0.01 second) Changing the intervall to 1000 seems to work better.

    Jan [ WhTurner ] The Netherlands

    Saturday, November 9, 2013 12:23 PM
    Answerer
  • Jan, I think that's your fast computer and my slow computer again.

    I'm not going to explore this anymore but posted because someone might spot a way to make it work. Too complicated for me atm.

    I got 3 gw and a tw opened before at once, and was thinking that by using controls on each window this could make the windows useful.

    Thanks for your fb. I hope nobody does their head in trying to make this work. But there could be a way.

    Saturday, November 9, 2013 8:07 PM
    Moderator