invalid procedure call or argument?
whenever i try to run a second instance of my App i get this error
mycode is:
VB Code:
Let App.Title = App.Title & " V" & App.Major & "." & App.Minor & "." & App.Revision
Let Caption = App.Title
If App.PrevInstance Then
Call AppActivate(App.Title)
Call Unload(Me)
Exit Sub
End If
Re: invalid procedure call or argument?
its the appactive function nyone kno whats wrong?
Re: invalid procedure call or argument?
Maybe it is because there are two programs with the same caption.
Try to change your caption, so there will only be one program with the same caption.
eg
Code:
App.Title = App.Title & " V" & App.Major & "." & App.Minor & "." & App.Revision
Caption = App.Title
If App.PrevInstance Then
Me.Caption = "Closing.."
Call AppActivate(App.Title)
Call Unload(Me)
Exit Sub
End If
Re: invalid procedure call or argument?
i cant get my previous app get focus can any help?
Re: invalid procedure call or argument?
Are you sure that your previous application has the same windowcaption as the argument you pass to AppActivate?
I noticed that AppActivate produces the 'invalid procedure call or argument' error when no window is found with that caption.
Do you change the window's caption somewhere else in your code?
Re: invalid procedure call or argument?
it dint give the error anymore it just doesnt give focus to my previous app