Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making session active while dialog box is up

Status
Not open for further replies.

jonnavarra

Programmer
Mar 18, 2008
3
0
0
US
How do you make the mainframe session get control without closing the dialog box? Sess.Activate doesn't do it.

Thanks
 
Use a dialgbox function and do an oSess.Activate when action = 1? This works for me...

Code:
Dim Sess As Object
Function FileDlgFunc(identifier$, action, suppvalue)
  FileDlgFunc = True
  Select Case action
    Case 1
      DlgVisible "BtnQuit", 0
      Sess.Activate
    Case 2
      FileDlgFunc = False
  End Select
End Function

Sub Main
'Code to set Sess variable
  Begin Dialog ThisDlg 250, 30, "Test", .FileDlgFunc
    CancelButton  0, 0, 1, 1, .BtnQuit
    PushButton  5, 5, 40, 15, "OK", .BtnOK
  End Dialog
  Dim MyDialog As ThisDlg
  On Error Resume Next
  Dialog MyDialog
  On Error Goto 0
End Sub
 
HI,

Has anyone managed to get this to work? I keep getting an error message when compiling...."CALL Syntax error".

Any help would be appreciated.

Thanks
 
You could do an AppActivate instead...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top