am i allowed to call public subs in other forms from a timer? it seems not to be able to call them...
Call Form2.mysub
--> it never enters form2.mysub() !!!argh!
-------
Private Sub Timer1_Timer()
Dim mFileSysObj As New FileSystemObject
Form11.Text2.Text = Str$(promptCurrent)
If mFileSysObj.FileExists(App.Path & "\prompt" & Trim$(Str$(promptCurrent)) & ".rdy" Then
For I = 1 To Len(promptArray(promptCurrent)) 'send string, one character at a time (convert one char to ascii at a time)
PostMessage lwnhandle, WM_CHAR, Asc(Mid$(promptArray(promptCurrent), I, 1)), 0
Next I
PostMessage lwnhandle, WM_CHAR, 13, 0
If promptCurrent = promptStop Then
'Timer1.Enabled = False
Screen.MousePointer = vbDefault
Select Case doAfter
Case "nothing" 'do nothing
'----------
Case "form1cleanup"
Form1.Hide
MDIForm1.cmdfltrsyn.Enabled = True 'enables filter syn menu
MDIForm1.cmdfltrsyn1.Enabled = True
'----------
Case "form2block2"
Call Form2.mysub
Form11.Text1.Text = "form2block2 called"
Case "form2block3"
Call Form2.form2block3
Case "form2block4"
Call Form2.form2block4
Case "form2cleanup"
Form2.Hide
MDIForm1.cmdfltrsyn2.Enabled = True
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID1, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture) 'add checkbox to menu item
'----------
Case "form3cleanup"
MDIForm1.cmdfltrsyn3.Enabled = True
Form3.Hide
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID2, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture)
Call MsgBox("Synthesis results are saved at ./data/syn.dim", vbOKOnly, "Data Saved"
'----------
Case "form5cleanup"
MDIForm1.cmdfltrsyn4.Enabled = True
Form5.Hide
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID3, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture)
Call MsgBox("Frequency response result saved at ./data/response and overall s parameters at ./data/rgflt_s", vbOKOnly, "Data Saved"
Call MsgBox("check response and return to Bandpass Prototype Filter Analysis", vbOKOnly, "Re-synthesis"
'---------
Case "form6cleanup"
MDIForm1.cmdfltrsyn5.Enabled = True
Call Form6.Hide
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID4, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture)
Call MsgBox("Done - Goto Filter Response Analysis to get final frequency response", vbOKOnly, "Done"
'---------
Case "form8block2"
Call Form8.form8block2
Case "form8cleanup"
Call Form8.Hide
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID5, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture)
Call MsgBox("Data saved at ./data/yield.res", vbOKOnly, "Data Saved"
'---------
Case "form9cleanup"
Call Form9.Hide
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID5, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture)
Call MsgBox("Data saved at ./data/sen.res", vbOKOnly, "Data Saved"
End Select
Timer1.Enabled = False
Form11.Text1.Text = "timer disabled"
pauseit 500
End If
promptCurrent = promptCurrent + 1
checkExit
End If
End Sub
Call Form2.mysub
--> it never enters form2.mysub() !!!argh!
-------
Private Sub Timer1_Timer()
Dim mFileSysObj As New FileSystemObject
Form11.Text2.Text = Str$(promptCurrent)
If mFileSysObj.FileExists(App.Path & "\prompt" & Trim$(Str$(promptCurrent)) & ".rdy" Then
For I = 1 To Len(promptArray(promptCurrent)) 'send string, one character at a time (convert one char to ascii at a time)
PostMessage lwnhandle, WM_CHAR, Asc(Mid$(promptArray(promptCurrent), I, 1)), 0
Next I
PostMessage lwnhandle, WM_CHAR, 13, 0
If promptCurrent = promptStop Then
'Timer1.Enabled = False
Screen.MousePointer = vbDefault
Select Case doAfter
Case "nothing" 'do nothing
'----------
Case "form1cleanup"
Form1.Hide
MDIForm1.cmdfltrsyn.Enabled = True 'enables filter syn menu
MDIForm1.cmdfltrsyn1.Enabled = True
'----------
Case "form2block2"
Call Form2.mysub
Form11.Text1.Text = "form2block2 called"
Case "form2block3"
Call Form2.form2block3
Case "form2block4"
Call Form2.form2block4
Case "form2cleanup"
Form2.Hide
MDIForm1.cmdfltrsyn2.Enabled = True
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID1, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture) 'add checkbox to menu item
'----------
Case "form3cleanup"
MDIForm1.cmdfltrsyn3.Enabled = True
Form3.Hide
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID2, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture)
Call MsgBox("Synthesis results are saved at ./data/syn.dim", vbOKOnly, "Data Saved"
'----------
Case "form5cleanup"
MDIForm1.cmdfltrsyn4.Enabled = True
Form5.Hide
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID3, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture)
Call MsgBox("Frequency response result saved at ./data/response and overall s parameters at ./data/rgflt_s", vbOKOnly, "Data Saved"
Call MsgBox("check response and return to Bandpass Prototype Filter Analysis", vbOKOnly, "Re-synthesis"
'---------
Case "form6cleanup"
MDIForm1.cmdfltrsyn5.Enabled = True
Call Form6.Hide
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID4, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture)
Call MsgBox("Done - Goto Filter Response Analysis to get final frequency response", vbOKOnly, "Done"
'---------
Case "form8block2"
Call Form8.form8block2
Case "form8cleanup"
Call Form8.Hide
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID5, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture)
Call MsgBox("Data saved at ./data/yield.res", vbOKOnly, "Data Saved"
'---------
Case "form9cleanup"
Call Form9.Hide
lngRet = SetMenuItemBitmaps(lngMenu, lngMenuItemID5, 0, pictureholder.Image1.Picture, pictureholder.Image1.Picture)
Call MsgBox("Data saved at ./data/sen.res", vbOKOnly, "Data Saved"
End Select
Timer1.Enabled = False
Form11.Text1.Text = "timer disabled"
pauseit 500
End If
promptCurrent = promptCurrent + 1
checkExit
End If
End Sub