Thanks jvierra.
That was a big help.
I have some problems now.
1. How do I change the background color off $webbrowser1?
2. How do I insert 1 button center screen in the box when clicked open in normal PC browser.
3. How do I Insert 1 text link open in normal PC browser.
<a href="https://www.google.com">test google</a>
GUI Forms MessageBox How to insert html
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: GUI Forms MessageBox How to insert html
Okay thanks
I have found a solution for color part a test:
<body style="background-color:red;">
I do have a 1-2 second delay, for some strange reason.
Where the box is
I have found a solution for color part a test:
<body style="background-color:red;">
I do have a 1-2 second delay, for some strange reason.
Where the box is
before it takes the red color."white"
Re: GUI Forms MessageBox How to insert html
Great that help whit css now.
Then I have the issue whit Links.
My Default browser is Chrome in Windows 10.
Will unly open in Internet Explorer
----------------------------------------------------------------------------------------------
Pop-up message in Internet Explorer, that ask me if I will open and APP: Microsoft Edge.
If I click Allow button in Internet Explorer Window, Chrome browser open whit the link.
But now I have 2 browsers open Internet EI and Chrome.
Is there a solution for that?
Then I have the issue whit Links.
My Default browser is Chrome in Windows 10.
Will unly open in Internet Explorer
<a href="https://www.Google.com" target="_blank" title="message">Visit Google.com</a>
----------------------------------------------------------------------------------------------
Pop-up message in Internet Explorer, that ask me if I will open and APP: Microsoft Edge.
<a href="microsoft-edge:https://www.Google.com" target="_blank" title="message">Visit Google.com</a>
If I click Allow button in Internet Explorer Window, Chrome browser open whit the link.
But now I have 2 browsers open Internet EI and Chrome.
Is there a solution for that?
Re: GUI Forms MessageBox How to insert html
You question has nothing to do with scripting. You have allowed Chrome to alter the system settings. Post in Chrome forums to find out how to fix this.
Uninstalling Chrome will likely also fix this.
Try setting the default browser to IE.
Uninstalling Chrome will likely also fix this.
Try setting the default browser to IE.
Re: GUI Forms MessageBox How to insert html
Okay I have found a Way in Powershell.
But I have at problem getting Button in front off $webbrowser1
----------------------------------------------------------------
#webbrowser1
$webbrowser1.Location = '30, 13'
$webbrowser1.Margin = '4, 4, 4, 4'
$webbrowser1.MinimumSize = '20, 20'
$webbrowser1.Name = 'webbrowser1'
$webbrowser1.ScrollBarsEnabled = $False
$webbrowser1.Size = '317, 279'
$webbrowser1.TabIndex = 2
$webbrowser1.BackColor = 'blue'
----------------------------------------------------------------
# button
$button01 = New-Object 'System.Windows.Forms.Button'
$button01.text = "test button"
$button01.Location = New-Object Drawing.Point 100, 90
$button01.ForeColor = 'Red'
$form1.Controls.Add($button01)
$html += @'
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
'@
Here it needs to be placed the button inside the webbrowser1 form
$html += @'
<hr>
<br>
</body>
</html>
'@
But I have at problem getting Button in front off $webbrowser1
----------------------------------------------------------------
#webbrowser1
$webbrowser1.Location = '30, 13'
$webbrowser1.Margin = '4, 4, 4, 4'
$webbrowser1.MinimumSize = '20, 20'
$webbrowser1.Name = 'webbrowser1'
$webbrowser1.ScrollBarsEnabled = $False
$webbrowser1.Size = '317, 279'
$webbrowser1.TabIndex = 2
$webbrowser1.BackColor = 'blue'
----------------------------------------------------------------
# button
$button01 = New-Object 'System.Windows.Forms.Button'
$button01.text = "test button"
$button01.Location = New-Object Drawing.Point 100, 90
$button01.ForeColor = 'Red'
$form1.Controls.Add($button01)
$html += @'
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
'@
Here it needs to be placed the button inside the webbrowser1 form
$html += @'
<hr>
<br>
</body>
</html>
'@
- Attachments
-
- button.jpg (8.27 KiB) Viewed 2271 times
Re: GUI Forms MessageBox How to insert html
Thank you so much now, I can get the button in front now.
Re: GUI Forms MessageBox How to insert html
Here are some examples of how to call the form from the HTML code and how to call the HTML code from the forms.
PSF and PS1 files.
PSF and PS1 files.
- Attachments
-
- Demo-WBCallsForm.Export.ps1
- (6.26 KiB) Downloaded 100 times
-
- Demo-WBCallsForm.psf
- (26.59 KiB) Downloaded 92 times