I'm creating a web browser in PowerShell Studio, which works with no issues. I'm trying to use a loading bar when using the search functionality, but it has been to no avail. Below is what my browser looks like. The ideas is to only show the loading bar (using the marquee animation) only while it's loading.
This is what I currently have for the loading functionality:
$Search_Click={
#TODO: Place custom script here
$url = $txtSearch.Text
$webbrowser1.Navigate($url)
while ($webbrowser1.IsBusy)
{
$loadingBar.MarqueeAnimationSpeed(50)
$loadingBar.Visible = $true
}
}