Is there a way to get something to start AFTER the Form has been displayed other than using a Timer.
Example: - I want to display a Form then play a tune. If I put it in Public Sub Form_Open() it will not show the Form until the tune has played.
Starting items
Re: Starting items
Try adding Wait before the play.
If Delay is not specified, the function processes all pending events and returns immediately. In that specific case, input events (keyboard and mouse) are ignored.
- cogier
- Site Admin
- Posts: 1118
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Starting items
Ahh. So simple, why didn't I think of that? BUT it doesn't work!!
The attached uses a Timer to get the result I am looking for. Simply change 'bWait As Boolean = True' to
'bWait As Boolean = False' to see that it doesn't react as expected.
Please note the software is in the VERY early stages of development..
The attached uses a Timer to get the result I am looking for. Simply change 'bWait As Boolean = True' to
'bWait As Boolean = False' to see that it doesn't react as expected.
Please note the software is in the VERY early stages of development..
Re: Starting items
Hello
Can be put the code in:
Public Sub Form_Arrange ()
or in :
Public Sub Form_Show ()
Have a good day
Can be put the code in:
Public Sub Form_Arrange ()
or in :
Public Sub Form_Show ()
Have a good day
Re: Starting items
I've tried did's solution.
This works:
However, the Arrange event is not good for this.
This works:
Code: Select all
Public Sub Form_Show()
playStuff("4C2,3C2,2C2,1E2,1D2,1C8,\n") 'Send Intro string of notes to playStuff
End
Re: Starting items
Btw., '28.wav' is missing
- cogier
- Site Admin
- Posts: 1118
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Starting items
Well done Didier that did the trick, I used Form_Show()
The missing note has been recaptured!
The missing note has been recaptured!
- cogier
- Site Admin
- Posts: 1118
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Starting items
UPDATE:
Form_Show() only shows the form immediately with gb.gui
Form_Arrange() does not show the form until the the routine has finished
Form_Open() does not show the form until the the routine has finished
Form_Active() shows the form immediately with gb.gui and gb.qt4
You need one Label on a form for this to work
Form_Show() only shows the form immediately with gb.gui
Form_Arrange() does not show the form until the the routine has finished
Form_Open() does not show the form until the the routine has finished
Form_Active() shows the form immediately with gb.gui and gb.qt4
You need one Label on a form for this to work
Public Sub Form_Activate()
Dim siCount As Short
Dim siNotes As Short[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
For siCount = 0 To siNotes.Max
Label1.text &= siNotes[siCount] & " "
Wait 0.25
Next
Re: Starting items
Oooohh! I like the colours