Disable Menustrip Items If Username And Menuname Match?

Feb 27, 2010

I have a DB table with the names of my Menus and a User names. After a User is logging succesfully I go through the table with the Menuitem names and enable /disable the menuitems accordingly.

Can anybody kindly show me a workaround on how to do this. For example i have this table below and after succesfully loging in as username "aaaaa". Menustrip items with name accounts and finance should be enabled and the rest like billing will be disable.

Table Name
UserAndMenu

[code]....

View 4 Replies


ADVERTISEMENT

Disable MenuStrip Items Based On A UserAccess Table From Database?

Feb 15, 2011

each of the ToolStripMenuItems has more than 20 ChildItems and each of these ChildItems have more than 30 ChildItems.In my form I havea login form and each user must log in.I want to know that how can I check my UserAccess Table with these MenuItems and ChildItems names and if the user does not have the MenuItem or ChildItem name in UserAccess Table, the MenuItem or ChildItem must be disabled.

View 16 Replies

Cannot Disable The MDI Menustrip From The Login Form

Aug 16, 2009

I have a login form that opens during MDI form load event. What I want is during login process i want the MDI frm Menu strip to be disabled and can only be enbaled after succesful login. The login form is base on a table that I created with username and password and is working find. The only problem is i cannot disable the MDI menustrip from the login form. here is my code in login form that process the disabling of the menustrip1 from the MDI form

mainfrm.menustrip1.enable = false

View 4 Replies

How To Disable Menustrip Shortcut Keys

Jul 16, 2009

I have a VB 2008 form with about a dozen buttons that use ALT+key shortcuts, e.g. names beginning &S, &N, etc. I also have a menustrip with a couple of entries but I have not assigned shortcut keys to any of them. However, three of the entries on the menustrip begin with S, N, and E. The result is that the shortcut keys for those buttons don't work - instead the shortcut activates the menustrip item. For example, ALT+E brings up the Exit on the menustrip instead of activating the button with the &E... label. I even tried setting the shortcut for the menu item to something totally different, but it doesn't matter.Even though I have programmed something different, the menu strip takes precedence on the shortcut. is there any way to just disable shortcut keys on the menustrip? What I've done for now is alter the names of my menustrip items by numbering them, e.g. "5 Exit" instead of "Exit" so that ALT+5 does the exit and leaves ALT+E for the button I want it to be associated with.

View 3 Replies

MenuStrip Items Display ?

Jul 15, 2009

I'm using VB2008. In the IDE, menustrip text items to show the underbar for ALT key use are preceded by ampersand. The underbar displays on the form [design] tab while in the edit mode but does not show when program run in debug mode from the IDE.

View 2 Replies

VS 2008 Sub Items In A Dynamic Menustrip?

Apr 15, 2011

i have managed to add menu strip items and add a Click Handler to it fine But now i am going to remove the click handler, and want to add sub items in the menu instead the current code i have so far..

[Code]...

View 2 Replies

Playing Audio While MenuStrip Items Highlighted

Jul 5, 2011

I want to do a software for blind user. How to play audio while menustrip submenu item highlight (without using mouse hover)?

View 1 Replies

VS 2008 - Cannot Delete MenuStrip Items In Dropdown Box

Nov 11, 2009

I somehow lost a MenuStrip & StatusStrip from my form. Now I have all these MenuStrip items in the dropdown box of my properties window & I can't seem to delete them.

View 3 Replies

Menustrip Menu Dropdown Items Names Appear Blank In Msgbox?

Jun 9, 2012

I have on my form load to add items to a menu as a dropdown item.from within the same sub I try to output the menustrip dropdown items in a msgbox but I get a blank response for all my items.

Private Sub PopulateLoadChildMenu()
msItemLoad.DropDownItems.Clear()
Dim fi As FileInfo

[code].....

View 1 Replies

MenuStrip.Items.Remove - Add Item To Dropdown Menu Upon Creation

Feb 8, 2011

I have my program set up to read the contents of a Directory, and then populate a drop down menu with the names of the files in the directory. (I am using the MenuStrip). Inside my program, it is also set up to create a new file in that directory, and I wish to add this item to the dropdown menu upon creation. The list is entirely created and populated from the code, and the contents of the list depend entirely on what's in the directory.

I have tried using MenuStrip.Items.Remove(menuItem1). Now, when this command gets executed, it does remove the top level Menu, however when I go to repopulate the menu, I end up with duplicates of my files listed in the drop down. I am stuck with how to clear these out as well?

View 2 Replies

Drag The MenuStrip Control Onto Form And Use SmartTag To Insert Standard Items?

Aug 6, 2009

When i drag the menuStrip control onto my form and use SmartTag to insert standard items , i get only menu Items no Icons .. VB 2008 Express edition

View 7 Replies

Iterate Through Items In A Comobox To Match Values?

May 9, 2010

I am trying to match the values of a combo box which are typed inside a combo box with the comb box items, which are bind to a datasource. i can see the items in the combo box and if i get the selecteditem its working fine means nothing is wrong with the connection and other things. but when im trying to match the values im getting this error:System.Data.DataRowView and this error continues to display equal to the number of rows inside table. im using the following code:

[Code]...

View 1 Replies

Combo Box Items Match With Gridview Row And Display Only The Matched Row

Apr 24, 2012

The user will click the book name in the combo box.

Note: The combo box is separate from datagridview . It is not part of datagridview columns.

Then the datagridview for Issuing books i.e. with the columns bid,bname,aname,data of issue,date of return should be displayed.

The row that will be displayed in datagridview is such that the bookname selected by user in the combo box should match with bname row .

On the same datagridview there will be button with name "Issue" so once it is clicked then this whole data of datagridview should get stored in the database table name "Issue" and get deleted from the databse table name "MBA"

View 1 Replies

Items In List View Should Be Saved In This Template Username?

Dec 1, 2010

I have a listview and the list contains 2 columns.
first is Username
second is Password

I want the information under those columns to be save as a text file in this style:

username1 : password1
dowpkf : wateverpass

and so on .so basically the items in list view should be saved in this template username..

View 5 Replies

Unique Menu Items - Menustrip - Which Has A Category "Colors"

Apr 19, 2009

Let's say I have a menustrip, which has a category "Colors" for example, and in that category there is an option of 20 colors, but I want only 1 to be checked at any one time, now to do that with what I know, I'd have to check every other one of the check boxes and uncheck them in every single click event, is there no cleaner way to do this?

View 5 Replies

Disable Particular Items In A Combobox?

Nov 11, 2011

Is there any option to disable particular items in a combobox?? If No then how can i do that??

I have 4 items in Combobox. For each items( based on combobox selected index change) lots of other calculation is there. i need to display all items but in some cases second item should be disabled.

View 2 Replies

Disable Some Items In A Combobox?

Jan 27, 2009

Is it possible to disable some items in a combobox?Depending on the current mode that my application is in, certain items need to be enabled or disabled.I know that I could remove the items and rebuild the combobox but in this case I think that by showing the items greyed out it gives the user feedback as to what mode they are in and what options would be available to them if they decided to switch modes.

View 17 Replies

Manually Disable All The Items?

Mar 13, 2009

when running a process in a backgroundworker, do i need to manually disable all the items in my form to stop the user from any transactions while the backgroundworker is doing something and then enable them after

View 3 Replies

Menu Without Menustrip Or Menustrip Not Right Across Screen?

Mar 9, 2012

I want a menu with just two dropdown lists, the menustrip puts a strip right across the form, is there any way to change the width of the strip? Changing in properties does not work. Is there a different type of menu I can use?

View 12 Replies

Disable Multiple Items From DropDownList?

Jun 6, 2011

I would like to disable a specific items from DropDownList. I have below code but it does not working. DropDownList have 5 items.And,I'm getting error:Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index

Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
Dim X As Integer = 0 <> 1
DropDownList1.Items(X).Enabled = False
End Sub

But, if I add a different value for X, then it disable 1st and 2nd item.

Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
Dim X As Integer = 0 or 1
DropDownList1.Items(X).Enabled = False
End Sub

My goal is if I would have a 365 items in DropwDownList to disable items for example between 120 and 150.

View 1 Replies

Hide Or Disable Items In One Combobox?

Feb 25, 2009

how to hide or disable items in one combobox on the basis of selected item in another combobox in vb.net?

View 3 Replies

How To Disable ComboBox / ListBox Items

Nov 27, 2007

I need to extend a combobox to disable some listitems (i.e splits - "----------"). I reckon some APIs will be involved, and it could get complicated. That'll not put me off though. If anyone with usefull info on the subject could post it,

View 11 Replies

How To Enable And Disable Items Of Menu

Feb 6, 2010

In VB 6 I enabled and it incapacitated the items of the menu with the following expression. And in VB.net how to do to substitute this expression in my project?

View 7 Replies

Asp.net - Disable Each Items In Gridview According To The Textbox Text?

Dec 21, 2010

if booking closed column values is equal or more than textbox1 text then the book button in gridview will be disabled for each gridview item whose booking closed time is greater and equal to textbox1 time ..

How to do that ?

M using VS 2008 and vb

View 1 Replies

Asp.net - Disable Validation On All Items Inside A Panel?

Jul 22, 2011

is it possible to disable validation of all items inside a panel programatically in vb.net?

i can't seem to figure it out.

i disabled all fields inside a panel, but they still cause the page to validate on submit.

this is what i have now:

Public Sub DisableControls(ByVal parent As Control)
Dim cCon As Control
For Each cCon In parent.Controls

[Code]....

View 1 Replies

Disable Controls When Items Are Selected From A Combo Box?

Apr 30, 2011

How to disable other controls when an item is selected from a different combo box. When someone selects a specific item from the combo box provided, It should automatically disable other controls specified to be disable.

View 2 Replies

Disable Menu Strip Sub Items In An Application?

Jun 26, 2010

I am creating a user rights access to a menu. for example an administrtor account can access a sales report while a limited account cannot. What i mean is a customize menu for an administrator and limited user....

ex. administrator
Sales Report--->Daily sales-enable
limited account
Sales Report--->Daily Sales-disable

View 2 Replies

VS 2010 Disable Buttons While There Are Less Than 2 Items In A Listbox?

Feb 16, 2012

How do I disable buttons while there are less than 2 items in a listbox? I can't figure out how to do it. I'm a newbie in Visual Basic(programming at all)

View 7 Replies

Enabled Propreties To Disable Editing Combobox Items?

Sep 27, 2011

i've tried the enabled propreties to disable editing combobox iteam but it make it gray and it become unreadable.so i changed the combobox style to simple (it looks like a texbox) and i want to know how can i prevent user from changing the content.

View 4 Replies

Disable Multiple Items From DropDownList. Someone Need To Check Code?

May 15, 2011

I would like to disable a specific items from DropDownList. I have below code but it does not working. So, need someone to told me what I'm doing wrong. DropDownList have 5 items.And, I'm getting error:Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index

Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged Dim X As Integer = 0 <> 1 DropDownList1.Items(X).Enabled = False End Sub

But, if I add a different value for X, then it disable 1st and 2nd item. Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged Dim X As Integer = 0 or 1 DropDownList1.Items(X).Enabled = False End Sub My goal is if I would have a 365 items in DropwDownList to disable items for example between 120 and 150.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved