How To Show Roles Based Menu
Dec 9, 2009How to show menu according to their roles in vb.net2.0
View 8 RepliesHow to show menu according to their roles in vb.net2.0
View 8 RepliesHow to enable / disable menu items based on allowed security roles specified for an item.
View 6 Repliesi've created toolstripmenuitems in design time.I named it to mnuUser,mnuKaryawan and form menu based on it too..I create a table that holds the data like this
position menu
admin mnuUser
admin mnuKaryawan
I'm wondering how to achieve suppose the admin logged in,then the menus will be shown?
I am wanting to create a menu based on items in my MS SQL database i have 3 tables
FormTbl
FormID - Int Eg (1)
FormName - nvarchar(50) Eg (Form1)
[CODE]...................
I can get the form names to be populated in to the menu and can open it my question is how do i set where the menu items will be placed. Eg File with FormHierarch 0 will be the very first one. Exit with FormHierarch 0.1 will be the very first one under File
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim menu As New MenuStrip()
Dim dst As DataTable = User.MenuItems(Me.ToolStripStatusLabel1.Text)
[CODE].....................................
i want to show context menu on drop down menu item right click...As an example,Suppose we add bookmark in mozilla & when we right click on that item..context menu is showing
Code:
Private Sub MenuAddToFavorites_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MenuAddToFavorites.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
[Code]......
I want to show a context menu on right click on a menu, but the menu disappears every time it is right clicked and I dont get the right coordinates for my menu.
Here is my code:
Code:Private Sub colMenus_MenuContextMenu(ByRef Sender As Object, ByRef e As clscolMenus.MenuContextEventArgs) Handles colMenus.MenuContextMenu Dim p As Drawing.Point Dim tm As ToolStripMenuItem
[Code].....
I know that I can populate a menu using a .INI file but I was wondering if it can be done using an XML file. I would like to be able to add parent and children menu items.
Below is a sample of what I want my XML to look like.
<?xml version="1.0" encoding="utf-8" ?>
<!--
MENU only needs an ID
[Code].....
I've been trying to figure out the easiest way to populate a menu to allow for easy updating in the future. I would like to add anything to a specific folder and when the program runs it would be populated by the contents of the specific folder. Is this possible? What should I look into to do this? Not sure of the process to use to do this, that is if it is even possible.
View 8 RepliesI'm trying to make a menu based off of an asp.net sitemap. How do you nest the sitemap nodes so that they all appear on the same level. Here is what I have:
<siteMap xmlns="[URL]" >
<siteMapNode>
<siteMapNode url="~/Default.aspx" title="Home" description="link to Home" />
<siteMapNode url="~/about.aspx" title="About" description="abot" />
</siteMapNode></siteMap>
Here is what the code for the Menu control looks like:
<asp:Menu ID="Menu1" runat="server" BackColor="#E3EAEB"
DataSourceID="SiteMapDataSource1"
</asp:Menu>
They both appear as 2nd tier elements underneath an arrow.
i have 2 context menu strip and the wont show when i run debugger
View 4 RepliesI have created a test app that contains a NotifyIcon and two ContextMenuStrip components.[code]...
View 2 RepliesI am a beginner to Visual Basic.I have only created the menu items. show the code for open and copy?
View 6 RepliesIf my form does not have focus and I click on a menu item (think File, Edit, View) the sub-menu does not appear. All it does it return focus to the form. I have to first click to give the form focus and then click on the menu. Most other programs do not behave this way. Is there anything that can be done to change it.
View 2 RepliesI have a login page and I am capturing not just user's username and password, I am also capturing whether the user who has visited us has voted or not.I have put all of this into session variables:If the user is successfully logged in, the user is taken to a menu page.So far so good.On the menu page, I have a link that says, Please click here to register.I have been asked to show the link only if the user has not registered.So, my initial approach is to have this bit on the page_load() event of menu page.If session.Item("voted") = "1" Then 'User has voted Show the user the message that says, Thanks for your vote" Else 'otherwise show the user the registration link end if?
View 1 RepliesI want to open a form when the start button is pressed.
View 5 RepliesI has been looking for the codes which it avoid the system menu to be showing on title bar when you click on your right mouse button. The only one I found is removemenu method. I don't want to use removemenu as it would disable the title bar close button. I only needs the code to avoid me to click the right mouse button on the title bar so I still has no luck.
View 2 RepliesI am trying to show a context menu when i click on the tray icon (mnuLeft for left click and mnuRight for right click)[code]...
View 2 RepliesI drag menu strip on the form..Now I add two menu items...I want that when the user right click on Item1, ContextMenuStrip1 should be shown.
Sir with your code,Contextmenu is shown,when i right click on toolstip..
I have tried the foll. Code
Code: Private Sub Item1ToolStripMenuItem_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Item1ToolStripMenuItem.MouseUp ContextMenuStrip1.Show(DirectCast(sender, ToolStripMenuItem).GetCurrentParent.PointToScreen(e.Location)) End Sub
But the probs is that when i right click on Item1ToolStripMenuItem(drop down menu),context menu is shown...but drop down menu is diappeared,I dont want the drop down menu to be disappeared..
I have created a menu item called "Windows", I want to list all open documents within that menu. This is the code I have so far.
'This sub routine lists all the open documents from a menu item
Private Sub WindowsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WindowsToolStripMenuItem.Click
MenuStrip1.MdiWindowListItem = WindowsToolStripMenuItem
My problem is that my "Windows" menu item does not show New Documents, it only lists saved documents that I open.
I would like to know how I can show and hide data based off of a value in a column.
Example. My table has 3 columns Name, Password, and Tel#
:Pseudo Code
if Name or Column(0).Row(0) = "Shawn" then
. Column(1).Row(0).Forecolor = System.Highlight
. Column(2).Row(0).Forecolor = System.Highlight
[Code].....
I placed my code in the rowprepaint event of the datagridview and on start up I get the results I am looking for. However, if the user selects the row or a cell in the row then the value will display.
I don't want the value to show even if the row is selected.
here im trying to show values based on a starttime and endtime in another column in the same row
what am i doing wrong in this statement
[Code]...
How to show a context menu strip at caret postion (not cursor or pointer postion)Example: If the control is in a text area at 10th line 5th word then context menu strip should display there at caret postion.I am looking for kind of auto prompt that we use to get near caret when we click "Ctrl+Space" in any IDE like Eclipse, VB 2010, VS etc
View 2 RepliesI added a new application recently and I find there is no Configuration Manager. I went to Tools-->Settings and checked Expert Settings, but Configuration Manager does not show up in the Build Menu. It only shows Build Project and Publish Project. I also tried to add Configuration Manager to the tool bar - it was added, but it is grayed out.
I'm trying to get the compiler Configuration Manager to show up. By the way, all of my 8 other VB 2010 Express projects have a Configuration Manager option in the build menu. However, none of those 8 projects were started as a new application in VB2010 - they were all conversions of old VB6 applications (first converted with VB2008, and then with VB2010).
When I right click on the Forms header it was showing the default windows menu with Items (Restore, Move ,Resize , Maximize..). I need to display the Context menu which we have created instead of display Windows menu. We want to hide the windows default.
View 8 RepliesI want to show contextMenu on Menu Item Right click..But probs is dat when i right click on menu Item,Context Menu is popping up..But menu disapper..I want that menu should not be disappered...
See in Attachment
Private Sub MenuAddToFavorites_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MenuAddToFavorites.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
[Code].....
i have an mdi form with a menustrip.. File Edit View i have an mdi child with a menustrip... Tools Actions i want to be able to add the Tools Actions to the menu in my mdi and not show them in my mdichild.
View 13 RepliesI'm calling some data from my Oracle table and I have a field which is called 'image1' which is a BLOB field.
Sometimes an image is input into the field and others it's not. I need a way to read the BLOB field to see if its a blank and then show/hide my label based on its contents.[code]...
im trying to show values in row/column based on the selected time
Public
Sub Btnplanner_Click(ByVal
sender As System.Object,
[code].....
How does one get the context menu to appear when right clicking a "custom" windows title bar? I want the default context menu (the one that appears when clicking a forms caption bar) to show when clicking a control on a form... generally i want to make my own title bar (caption bar) for a form...the code that fails is "formTitleContext"also any suggestions to writing more concise code for this task will be greatly
View 4 RepliesI've a VB.net 2005 desktop application, and i'm using crystal reports. In one report i've abt 6-7 sub reports. is it possible to show/hide a sub report based on some condition. i'm new to crystal reports , please suggest what is the best possible way to achieve this.
View 1 Replies