RSView32 and "appstart"

jrexrode

Member
Join Date
Mar 2005
Location
Upstate, South Carolina
Posts
106
I'm using the "appstart" command in RSView to start and pull forward the windows calculator program. It works fine with the exception that if the calculator isn't closed before the RSView screen in the background is clicked on, the calc program goes to the background.

If the calc program goes to the background and the calculator start button is pressed again, then I now have 2 copies of calc running. I tried to avoid this by having calc already running in the background and using the "appactivate" to pull it forward. That works fine until someone closes it down and I'm left with no way to re-start it.

I'm thinking about setting an internal tag based on whether or not the calc program is running. I've looked through what functions are available, but I don't see one that I think will work.

Is this best handled with VBA code?

Can anybody point me in the right direction?
 
Try using this bit of VBA code. I have used it to get around the situation you describe.

Public Sub Calc()
On Error GoTo Cal
AppActivate "Calculator"
Exit Sub
Cal:
Ret = Shell("C:\Windows\System32\Calc.exe", vbNormalFocus)
End Sub



If Calc is running it will be activated, if not, an error is generated and Calc is loaded and started.

One more thing: to get it to come forward you'll need to set the registry key "foregroundlocktimeout" to zero.
 

Similar Topics

In RSView32, If I use a button to start a DOS program, and if the action is AppStart it starsts it at the bottom of the screen only. How do I getb...
Replies
1
Views
2,304
I'm importing an RSView32 project into FTView SE. I'm using Legacy Tag Database Conversion on a virtual machine with Windows XP, I did the first...
Replies
0
Views
373
Hi everybody, I have a rsview32 application, when I try to run it it loads upto 80% system settings and the crashes saying Rsview32 Project...
Replies
3
Views
1,911
Hi Guys I'm having trouble assigning a tag to an activex label on a Multipage Tab. I can assign the tag to an active x label on a normal display...
Replies
0
Views
596
I have followed the procedure below to convert RSView32 project to FactoryTalk View...
Replies
5
Views
1,431
Back
Top Bottom