Add Menus To Projects?
Jan 28, 2010I want to start learning how to add menus to my vb.net projects. how to code and design them.
View 4 RepliesI want to start learning how to add menus to my vb.net projects. how to code and design them.
View 4 RepliesRemoving projects from VB2008 start page recent projects list. The above list is getting clogged. How do I remove items from this list?
View 3 RepliesThe situation is that I have a menu strip on the form from which the user can select an item, which opens a sub-menu, which opens another sub-menu which contains a combo box listing some options.
Eg. File>Project>Load>combo-box control
When the item is selected in the combo box, the code executes and modifies values on the same form, but the menu system does not collapse by itself.
I have to click on the form and then the menu system collapses.
I tried setting the focus to the form, but that does not collapse the menu system.
Does anyone know how to get the menus to collapse automatically?
I was wondering if ToolStripMenus and ContextMenus support icons? (e.g having an icon next to the text), please tell me that they do because I cant find any property like that and if they don't that's a real shame :)
View 4 Replies calculator similar to the Standard Windows Calculator. Your calculator should perform the same operations as the standard calculator.
I JUST WANT TO KNOW HOW MAKE Context menus
- FOR THESE Memory buttons: MC, MR, MS, M+
Which control should I use to create menus in vs.net 2008?
View 1 RepliesIm a Noob at this this is my first creation, i want a step by step guide like if anyone can manage that i want to create drop down menus where the url goes like IE8 , also wanna create Tabs For Web Browser. I want To Also Make Favorites and history and thats it for now like IE8 Please Can Someone Help Me ill paste my code below
[Code]...
All of my pages are built dynamically in code behind pages (I think thats the correct terminology (?), I load a series on HTML files then builld the page).
I want to use drop down menu (which will be in my header file). I tried this one: [URL]
When building the menu in frontpage in the html file it was perfect. So I added the ref to the css file in my aspx page but rather than allowing for the drop down option is just displayed all options (although the formatting remains as per the stylesheet).
Is there a script or a well known method out there for HTML drop down menus that will work when loaded into an aspx page?
I have a problem and that is related to Menus in VB.NET. The problem is as follows: I have created a menu called "Test" and sub menus in that called "Test 1", "Test2","Test 3", "Test 4" and "Test 5".The property "NAME" of these sub menus are "M1","M2", "M3", "M4" and"M5".All these menus are disabled at runtime and in the MDI form, i have called a procedure to get the rights of a user and sore these in a list box in the MDI Form.Assume that the List Box contains "M1" and "M5". I need to activate only these menus.
View 1 RepliesI have a vb.net 2005 application that I inherited. It is about a 250 screen app, and I am having trouble. Some quick background: There is a form called Mastermenu that every screen in the application inherits from. Inside this form, a dynamic menu is built from an XML file using a custom class called clsMenu. Here is part of the
Private Sub loadmenu(Optional ByVal strAppraisalType As String = APPRAISAL)
Dim objMenubuilder As New clsMenu(New clsMenu.MenuEventHandlerDelegate(AddressOf HandleMenuClick), MyController, FORM_NAME)
[code].....
Does anyone know how to open IE7 from within a VB.Net Windows Application without menus or an address bar? I'm currently opening IE like this:
Dim myProcess As New Process()
myProcess.StartInfo.FileName = "iexplore.exe"
myProcess.StartInfo.Arguments = "http://kronos/wfc/logon"
[code].....
I'm using VB 6 and have a strange problem with popup menus that I can't figure out. Outline of the problem: I have two forms, say A and B. Form B is launched as a modal dialog from form A. If I use a command button on form A to launch form B (using code below),
[Code]...
I am using VS 2008.I am creating a xml with which now i need to attach the name of the mdb file.I dont know if i need to write a query or function.My current database name is Menus.mdb. I have an api which has a ExecuteSql(sqlQuery) Function which automatically connects to the database and returns a dataset.What type of query should I pass here to get the Database Name (Menus.mdb).The name of mdb is not fixed depends upon client to client.
View 2 RepliesI want control of tabcontrol Attached project contains 2 From first like the second i need Control of tabcontrol Under the Menus and Toolbar the code Public Class Form2
[Code]...
I'm trying to construct a database driven VB.Net app that pulls a list of registered accounts from a database and displays the usernames of throes accounts in menu, so the user can select one and a new form open (where they work with it).what I have so far is the constructor for the MDI parent window.[code]What I want to happen is when a user clicks on the context menu a new MDI child form is created and the data in user is passed, however because AddressOf doesn't like passing data this doesn't work.I've looked at delegates and landa expressions but don't think either of them do what I need, the other option is to make my own subclass of the ContextMenuStrip class, which 1) handles the clicks the way I want to and 2) sounds like a nightmare.Before I launch into what I think will be a hell of a lot of work, am I missing something? is their a simple way to do what I want to do? or if not will sub-classing ContextMenuStrip work and if not any ideas as to what will (and if it will, any ideas as to how to start learning how to do that)
View 1 RepliesI am new to .NET. How i can use include files for my menus? I am used to do with php is I make one php file with menu and I include it in all PHP files so that it can be changed in all pages when I would change it basic file. I dont know what is the concept of it in .NET?
View 1 Repliesi am trying to insert context menus in my web browser (not context menu strips because context menus look better) but can't get the to appear either by code or design here is my code below:
Note: don't tell me to use context menu strips because they look like crap.
Note: I am not a big techy so try to use small words as much as possible.
code:
If E.Button = MouseButtons.Right Then
Dim x As Integer
Dim y As Integer
[Code].....
I have a form that is a mdi parent. In this form I have a menustrip the allow merge is set to true. I then have another form which is a child form. In this form I have a menustrip, I have the first menuitem merge action set to MatchOnly, then the rest of the menu items merge action are all set to insert. I then have a context menu in the child form, where which has the same menu items as the menustrip.
When i run the app, and show the child form, the menu items get added to the parents menu just how I expected. but the context menu does not display in the child form.
I am working on a project that requires me make a MDI, which I did. The problem that I am having is that none of the menus like the cut and paste work in the MDI Child. I have tried different types of code and still can't get it to work. All I am trying to do is copy or paste text using MDI parent menu controls, rather then creating menu controls for all the MDI children
Private Sub CutToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CutToolStripMenuItem.Click
' Use My.Computer.Clipboard to insert the selected text or images into the clipboard
[CODE]...
I know there is a problem with these stupid treeview nodes and getting the ACTUAL node that user clicks on, so I am not surprised by this problem. I have a context menu, and it is assigned to only a certain level of nodes. Also the functions in the context menu execute correctly, the problem is they don't execute on the correct node. It is always the previously selected node, so if I want it to work correctly I have to left click on the node, then right click on it and it everything is peachy-keen.Alright, here is the code I have for one of the context menu strips:[code]However that is not a viable option as i am not getting the variable e as a TreeNodeMouseClickEvenArgs.
View 7 RepliesI need to list all the menu and sub menus i have in my form
Master
---Customer
---Supplier
---Item
[code]....
I need the name of each menu and its parent name
How Can I create Menus at run time? as
MainMenu1 MainManu2 MainMenu3
SubMenu1 SubMenu1
SubMenu2 SubMenu2
ChildMenu1 SubMenu3
ChildMenu2 SubMenu4
SubMenu3 ChildMenu1
SubMenu4 ChildMenu2
SubMenu5 ChildMenu3
ChildMenuA
ChildMenuB
Etc.....
I am using Visual Studios 2005 and I am creating an application for our IT Security.Part of the program is for documents and procedures. What I am trying to do is automatically create a menu based on the folders and files. So far I have it taking into account the base folder and one subfolder level and files within it, but I want it to automatically also take into account any subfolders and files that may be added at a later date without having to replicate the code below for each new level. My code is as follows, it is very messy as I am not a programmer.
Code:
Public Sub ISMSMenus()
Dim clsMenuName As ToolStripMenuItem = CType((My.Forms.FrmMainScreen.TSMISMS), ToolStripMenuItem)[code]....
In VB.NET Tutorials I was following the tutorial Customize your toolbars and menus with a custom renderer and with the folowing code I get an error 'Declaration expected'
[CODE]...............
What am I missing?
I am using VB net 2005.I am also using the ActiveX Control DSOFramer.ocx supplied by Microsoft (url...).I would like to either not show or disable the right-click menus (context menus I think they may be called).If that is not possible, is it possible to replace the menu with my own, maybe just one choice like "Exit"?If that is not possible, can I somehow disable the right-click on the mouse when over this control?I am using the control to view PowerPoint and Excel documents.View only, I've removed Menu and Tool bars.Now just to disable the right-click menus.
View 14 RepliesI am using the "Adobe Acrobat 7.0 Browser Control Type Library 1.0" control to view PDF's in my vb.net application. I want it to show just the PDF with no menus and toolbars.
I have used the following code:
AxAcroPDF1.LoadFile("C:ShippingForm.pdf")
AxAcroPDF1.src = "C:ShippingForm.pdf"
AxAcroPDF1.setShowToolbar(False)
AxAcroPDF1.setView("fitH")
AxAcroPDF1.setLayoutMode("SinglePage")
AxAcroPDF1.setShowScrollbars(False)
AxAcroPDF1.Show()
I am still getting the Navigation Panel on the left side of the panel. Does anybody have information on which method would disable this or maybe a list of all the methods?
I have the Immediate window option available in my menu, but when I click it or do the keyboard shortcut, nothing happens. It's quite difficult to debug an application without an Immediate window.I've tried resetting my settings to general developer and all of the other suggestions I found on the web, but still, no immediate window shows up when I click it or do the keyboard shortcuts..
View 1 RepliesI'm trying to bring up a simple right-click menu on a listbox and I'm having little luck with it. I created a basic ContextMenuStrip named "ContextMenuStrip1" and I'm trying to call it in the ListBox's Mouse Click method:
Code:
Private Sub ListBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListBox1.MouseClick
If (e.Button = Windows.Forms.MouseButtons.Right) Then
ContextMenuStrip1.Show(MousePosition)
End If
End Sub
So here's what it's actually doing. The right mouse button doesn't seem to activate MouseClick at all for this object. It is caught in MouseDown, but when I try to call this from that method, the ListBox Index doesn't change. How can I get a right-click to be called from the MouseClick (Not imperative) and how do I get the ListBox to change the index with a right-click?Also, the menu looks like one of Office's right-click menu that can have an image to the left of the text. When I don't have an image the text is about 50 pxls or so away from the left edge. This looks weird. Can I change that?
Is there a way set the spacing of menuitems in the drop-down menus of the MainMenu (MenuStrip)?
View 9 Repliesthis is probably a bit tense and I'm not sure if this is possible at all. But basically, I'm trying to create a small application which contains alot of PowerShell-code which I want to run in an easy matter.
I've managed to create everything myself and it does work. But all of the PowerShell code is manually hardcoded and this gives me a huge disadvantage. What I was thinking was creating some sort of dynamic structure where I can read a couple of text files (possible a numerous amount of text files) and use these as the source for both the comboboxes and the richtextbox which provovides as the string used to run in PowerShell.
I was thinking something like this:
Combobox - "Choose cmdlet" - Use "menucode.txt" as source
Richtextbox - Use "code.txt" as source
But, the thing is, Powershell snippets need a few arguments in order for them to work. So I've got a couple of comboboxes and a few textboxes which provides as input for these arguments. And this is done manually as it is right now. So rewriting this small application should also search the textfile for some keywords and have the comboboxes and textboxes to replace those keywords. And I'm not sure how to do this.
So, would this requre a whole lot of textfiles? Or could I use one textfile and separate each PowerShell cmdlet snippets with something? Like some sort of a header?
[Code]...
Now, this snippet above lets me either use a text file as a source for each username used in the powershell snippet. Just so you know :) And I know, this is probably coded as stupidly as it gets. But it does work! :)