|
-
Dec 20th, 2004, 03:26 AM
#1
Thread Starter
Banned
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
-
Dec 20th, 2004, 04:08 AM
#2
Thread Starter
Banned
Re: invalid procedure call or argument?
its the appactive function nyone kno whats wrong?
-
Dec 20th, 2004, 04:24 AM
#3
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
-
Dec 20th, 2004, 06:47 AM
#4
Thread Starter
Banned
Re: invalid procedure call or argument?
i cant get my previous app get focus can any help?
-
Dec 20th, 2004, 07:37 AM
#5
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?
-
Dec 20th, 2004, 09:30 AM
#6
Thread Starter
Banned
Re: invalid procedure call or argument?
it dint give the error anymore it just doesnt give focus to my previous app
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|