Minimizing all PcVue windows after launch

4 Posts
2 Users
0 Likes
16 Views
ED
 ED
(@e-duvalarcinfo-com)
Posts: 138
Estimable Member
Topic starter
 

Hello All
Does somebody has the instruciton to miminize PcVue in the toolbar after it had been launched?
There must be some windows instruction one can use but if somebody has already reply to such requirment please let me know.

Thanks,

 
Posted : 21/01/2014 12:05 am
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Manu, in the shortcut properties you can select Run / Minimized.
But, unfortunately it is minimizing only the Event Viewer and not the main workspace 🙁

I would bet on a solution that PcVUe is minimizing itself by VBA on startup using a tricky instruction ...

 
Posted : 21/01/2014 11:49 am
ED
 ED
(@e-duvalarcinfo-com)
Posts: 138
Estimable Member
Topic starter
 

I was hoping that one of you had already used such instruction. 😉

 
Posted : 21/01/2014 5:12 pm
ED
 ED
(@e-duvalarcinfo-com)
Posts: 138
Estimable Member
Topic starter
 

I found this on the internet.
Maybe this could be applicable in either SCADA BASIC or VBA. Unfortunatly I don't have time to test it. Any volunteer 😉

Here is a VBA snippet...

private const int SW_SHOWNORMAL = 1;
private const int SW_SHOWMINIMIZED = 2;
private const int SW_SHOWMAXIMIZED = 3;

[DllImport("user32.dll")]
private static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
private void button1_Click(object sender, EventArgs e)
{
// retrieve Notepad main window handle
IntPtr hWnd = FindWindow("Notepad", "Untitled - Notepad");
if (!hWnd.Equals(IntPtr.Zero))
{
// SW_SHOWMAXIMIZED to maximize the window
// SW_SHOWMINIMIZED to minimize the window
// SW_SHOWNORMAL to make the window be normal size
ShowWindowAsync(hWnd, SW_SHOWMAXIMIZED);
}

 
Posted : 21/01/2014 8:55 pm