|
-
Nov 29th, 2010, 06:55 AM
#1
Thread Starter
Addicted Member
Help with Context Menu
I've searched but unable to find what I am looking for.
I want to change the default context menu with my own. That will only have a print option, I don't need any of the others.
How do I go about doing that?
Also, how do I change the header/footer?
Last edited by TrickyNick; Nov 29th, 2010 at 07:17 AM.
-
Nov 29th, 2010, 09:02 AM
#2
Re: Help with Context Menu
 Originally Posted by TrickyNick
I've searched but unable to find what I am looking for.
I want to change the default context menu with my own. That will only have a print option, I don't need any of the others.
How do I go about doing that?
Also, how do I change the header/footer?
What type of control?
-
Nov 29th, 2010, 05:25 PM
#3
Thread Starter
Addicted Member
Re: Help with Context Menu
 Originally Posted by kevininstructor
What type of control?
Wow, I thought I put that in, I am sorry.
It's a Webbrowser control.
I've managed to disable it, but I would rather replace it to give the user the option to print, but only if I can figure out how to change the header/footer. Reason of rthat, is because when it prints, it says it's printing the URL "about:blank" since I am changing the text it doesn't change that.
-
Nov 29th, 2010, 07:52 PM
#4
Re: Help with Context Menu
Add a context menu to the form, create menu item(s), then assign the context menu to the webbrowser.
Dismiss the WebBrowser's default context menu
Code:
WebBrowser1.IsWebBrowserContextMenuEnabled = False
Code:
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
WebBrowser1.AllowNavigation = True
WebBrowser1.Navigate("http://www.google.com")
WebBrowser1.IsWebBrowserContextMenuEnabled = False
End Sub
Private Sub PrintToolStripMenuItem_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles PrintToolStripMenuItem.Click
MsgBox("Your print code goes here")
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|