I am working on a custom vb.net application which uses Microsoft Word embedded in it. As the users are restricted to what kind of formatting they are allowed to do while modifying documents, we are using a template which contains custom ribbons and menus.
In the past we have also captured the right-click event to suppress the display of the built-in shortcut menu and mini toolbar.
We would now like to re-activate the right-click to bring up a modified shortcut menu. This we can do through macros and templates. However, we are not able to keep the mini toolbar from appearing on the right-click event. We have turned off the Word Option which automatically brings up the mini toolbar when one selects text, however, that does not affect the behavior of the right-click event.
I have created a application in vb.net 2017. I am parenting another application made in vb.net 2017 to my main application's tab control.
When I am parenting notepad I can access its menu. But when I am parenting self made vb.net another application, Menu is showing but drop down is not showing.
Try to set the AllowDrop property of ContextMenuStrip to True
I'm creating a UI editor for a control I made. Basically the user can double click to open a dialog to set properties like color, text, etc. I would like to add a way to set the images. In the control's properties it will open the resource dialog. Is there a way to open this dialog from an event, button click, in design mode?
I'm using VS2017, vb.net.
I am using the asp.net web forms and whenever I want to edit the MyWebPage.aspx.vb file to add something in the Page_Load subroutine, I have to add a temporary asp button or something like that and double click it. Is there a shortcut to open it??
Thanks for your answer!
If you hover over the buttons at the top of the Solution Explorer pane, one of them is "Show all files". Click that, and you will be able to expand MyWebPage.aspx to show the MyWebPage.aspx.vb file.
Alternatively, you can use "View" menu -> "Code" if you have MyWebPage.aspx showing in the designer.
How do I set form number four as the default form that will run when I press on f5 in visual studio 2008. Because form 1 will always be the first to start
Right-click on your project in solution explorer.
Choose properties.
Select the Application Tab.
Select your form from the dropdown under 'startup form'
In the Project Properties, there's a field called "Startup form" - select your form in there.
Right-click your Project within the Solution Explorer.
Choose Properties.
Select the Web tab on the left-hand side.
Under the Start Page section, define the Specific Page you would
like to default to when the application is launched.
Save your changes.
Right-click your Project within the Solution Explorer.
Choose Properties.
Select the Web tab on the left-hand side.
Under the Start Page section, define the Specific Page you would like to default to when the application is launched.
Save your changes.
The other solutions work, but they will disable the use of ApplicationEvents like Startup, because the startup object has to be Sub Main for those to work.
To change the form started by Sub Main, do the following:
Close your project in Visual Studio.
Open your project's folder in explorer.
In it, open folder My Project.
Open Application.myapp with any text editor.
Change the form between the <MainForm> tags to your (new) main forms name.
Save and close.
Open ApplicationDesigner.vb with any text editor.
Find the following line and change YourMainFormsName to your (new) main forms name:
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.YourProjectsName.YourMainFormsName
End Sub
Save and close.
Open your project again and start it up. The startup form should have changed.
In my case, it doesn't work immediately from project properties. I have to close the solution and re-open it in order to see the latest form you have created and if you intend to make a startup object.