WinCC Flexible; switching to another app

MartinW

Member
Join Date
Apr 2008
Location
UK
Posts
70
Hi,

I have WinCC Flexible 2008 Advanced.

I am creating an HMI for a PC RT environment. I would like to call another application from the WinCC Flexible HMI. I can only, so far, make it launch an instance of a program, not switch to an instance already running.

So I decided to minimise instead, revealing the other application (written with VB6) behind it. I've found that I don't seem to be able to make vb6 change the state of the WinCC app from minimised back to maximised.

Is there a way of doing this or am I screwed?

Thanks,

Martin
 
Not sure if this will work.
Source: http://www.eggheadcafe.com/software...-a-running-application-to-the-foreground.aspx

Code:
Set WshShell = CreateObject ("WScript.Shell")
Set objWMIService = GetObject ("WinMgmts:root\cimv2")
 
Set colProcesses = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = " & _
 
If colProcesses.Count > 0 Then
For Each objProcess In colProcesses
If objProcess.CommandLine = strCmdLine Then
WshShell.AppActivate objProcess.Handle
 
WshShell.SendKeys ("% x")
 
Exit For
End If
Next
End If
 
Actually I could use this myself.

I would check for if an application is running, if it does - switch to it, and send an "F5" to it (it will update the application).

If you go this way, let me know the result.
 

Similar Topics

Hi everyone, thank you for reading my HelpMe post. I found this site by google. //Description of the problem: I've been trying to change screens...
Replies
5
Views
2,912
Hi, We have upgraded our laptop which includes Windows 11. It appears that WinCC flexible 2008 advanced does not support Windows 11. What...
Replies
11
Views
266
Hello everyone I Have an Issue with the usage of recipes in Wincc Flexible 2008, I create the recipe to change the values in a fast way The...
Replies
0
Views
106
Hi colleagues.We do data logging system.We want to record three temperatures under a certain condition. We prepared the project as follows. We do...
Replies
1
Views
755
Hello to everyone. I change the value of a "PQW" with a button in Wincc flexible. The code of the button is defined as M102.0. Value reset...
Replies
10
Views
4,577
Back
Top Bottom