Hello
i want to start a software in background when i select the software tab
so i add this to my code
if ($tabcontrol1.SelectedTab -eq $tabpageSoftware) { Start-Process $env:windir\CCM\ClientUX\SCClient.exe -Windowstyle Hidden }
but it didnt work
the path of the software is ok
can you help me please
Tabcontrol
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Tabcontrol
"$tabcontrol1.SelectedTab" is an "TabPage" object. It is not a string.
See: https://msdn.microsoft.com/en-us/librar ... .110).aspx
See: https://msdn.microsoft.com/en-us/librar ... .110).aspx
Re: Tabcontrol
ok so what must i do
i write it like the sapien primal forms
https://www.sapien.com/blog/2011/10/28/ ... abcontrol/
if($tabcontrol1.SelectedTab -eq $tabpageProcess)
{
#We are on the process tab
}
else
{
#We are on another tab
}
}
sorry my english is not so good
i write it like the sapien primal forms
https://www.sapien.com/blog/2011/10/28/ ... abcontrol/
if($tabcontrol1.SelectedTab -eq $tabpageProcess)
{
#We are on the process tab
}
else
{
#We are on another tab
}
}
sorry my english is not so good
Re: Tabcontrol
sorry
but it didnt work
if ($tabcontrol1.SelectedTab.Name -eq 'tabpage4') { Start-Process $env:windir\CCM\ClientUX\SCClient.exe -Windowstyle Hidden }
but it didnt work
if ($tabcontrol1.SelectedTab.Name -eq 'tabpage4') { Start-Process $env:windir\CCM\ClientUX\SCClient.exe -Windowstyle Hidden }
Re: Tabcontrol
sorry but i dont understand what you mean with $1
you say the name is tabpage1 but i only want to start the app when the software tab will be activated
you say the name is tabpage1 but i only want to start the app when the software tab will be activated
Re: Tabcontrol
To perform an action when a page is activated use the "click event of the page.
Code: Select all
$tabpage1_Click={
# do something
}