VS 2008 Disable Editing A Combobox?
Mar 20, 2009Is it possible to disable editing a combobox. With a textbox you have the option readonly. Is there something like that for the combobox?
View 7 RepliesIs it possible to disable editing a combobox. With a textbox you have the option readonly. Is there something like that for the combobox?
View 7 Repliesi'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 RepliesI want to disable the clock so no one can edit the time.
View 6 RepliesOn my form i use binding source bound to fields.. if a user starts to change something then hits cancel (i set all the fields to "" to clear them) and then if they choose that record again it shows nothing in the bound fields..
is there a way to reset/cancel from editing without loosing original values?
I don't want to allow user edit a text in the combobox. How do I do that?
View 3 RepliesI have a combobox and I want to disable to contextmenu. I tryed button1.focus() when the right mouse button is pressed on the combo but it doesn't work (it makes the focus and then the menustrip appears), I also put a msgbox but that's not a solution.Maybe something when the form is loaded? or globally disable the right click ability....
View 1 RepliesIs 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.
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 RepliesLets say have i have 5 items in the combobox
1
2
3
4
5
can i disable a specific item for example just #2?
how to hide or disable items in one combobox on the basis of selected item in another combobox in vb.net?
View 3 RepliesI 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 RepliesDoes anyone know of a way to disable the mouse scroll wheel when a control such as a ombobox or listbox has focus? For my purposes, combobox is all I need the answer for.I have a combobox set to trigger a SQL query on SelectedIndexChanged, and accidentally scrolling the wheel while the combobox has focus causes about six SQL queries to fire off simultaneously.
View 3 RepliesIs there a way to disable the user's ability to edit the text in the combo-box, so that they can ONLY choose from the options in the drop-down list?
View 2 Repliesi m doing project in vb and database is microsoft accessin my form i have 3 radiobuttons and 3 combobox when i select radio button then respective combobox enable and remainig disable i load all the data in combobox through data reader the problem is user can select different radio button so as query also changes to fetch the data from databse whenever i select 1 rasio buttons its work whenever select it not work
[code]...
im trying to edit an existing excel file. some cells were merged but after saving the file, all merged cells were unmerged again. Here's my code
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim xlApp As Excel.Application
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet
[code]....
I am confused what will happen, when I disable a timer. Will it finish the process and then disable or will it immediately disable without completing process? for example
[Code]....
I want to run getMessage from somewhere else, so I need to disable timer during that time to be asured not to override anything and also before timer disable it should complete that function code.
I have created a program in vb2008 that when first run will make all the required regisry changes it requires by creating a path in the registry.
View 10 RepliesUsing vs2008 9.0.30729.1 SP. Inserting a new record works but editing a record doesn't. Tried databindingsource but no joy as well.
Private Sub Gr1A_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Gr1D.CheckedChanged, Gr1C.CheckedChanged, Gr1B.CheckedChanged, Gr1A.CheckedChanged
sAns1 = ""
If Gr1A.Checked = True Then
sAns1 = "A"
ElseIf Gr1B.Checked = True Then
[Code] ......
I have a datagridview, 3 textboxes, 1 NumericUpDown and a button.What I want is that when the user clicks the button, the current row that is selected in the datagridview will change to the values in the textboxes and NumericUpDown.
View 4 RepliesIt gets some links in a listbox, And i had to create a new ListBox for because i only want to keep some items, So i got this.[code]But i had to do a new listbox for it, I dont mind that, But the problem is, It creates duplicates, I've tried making it delete the item from the first listbox after it was added to the new listbox, But it is not edible during the process structure so i thought i could get some help here because im getting so many Duplicates of 1 item.
View 8 RepliesI can add new data to the database and have it saved and everything (though my method not be great, but it works) but I'm having a hard time figuring out how to edit existing data and save it. assume it would be better to have it check whether or not the row exists, and if it does, just update it rather than trying to insert new rows? This is the code I have right now to
Dim newRefractiveRow As EyeBaseDataSet.Spectacle_RxRow
newRefractiveRow = EyeBaseDataSet.Spectacle_Rx.NewSpectacle_RxRow
With newRefractiveRow
[code].....
I have one CheckedListBox called cListBox, and I have one ListBox called ListBox.In my cListBox I have, for example:IDS_PROPITEM_TXT_011131Space Cadet Set for male characters comes complete with hair piece, Space Fleet Uniform, hands, and boots.IDS_PROPITEM_TXT_011141Space Cadet Set for female characters comes complete with hair piece, Space Fleet Uniform, hands, and boots.It is ALWAYS the case that you have IDS_PROPITEM_TXT_somekindof6longvalue (TAB seperator) some kind of text.
View 2 RepliesI have this code here:
Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Integer, ByVal lpValueName As String, ByVal Reserved As Integer, ByVal dwType As Integer, ByVal lpData As String, ByVal cbData As Integer) As Integer
Public Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyExA" (ByVal hKey As Integer, ByVal lpSubKey As String, ByVal Reserved As Integer, ByVal lpClass As String, ByVal dwOptions As Integer, ByVal samDesired As Integer, ByVal
[code]....
But when I execute it it doesn't correctly change the value of the DWORD from 0 to 1, it creates an invalid value.
I have problem, when i click on save it gives me an error.'Cannot perform '=' operation on System.Int64 and System.String.'My code looks as follow....
vb.net
Private Sub ItemsBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ItemsBindingNavigatorSaveItem.Click
[code].....
I've been searching in google for some time now and i've just found answers like "Resources are embedded in the exe so you can't retrieve the path" and other answers which are complicated and not even explained how to use the code. ~~However my problem is that i have a .txt resource file in my resources and i want to edit the content of the file so i triedIO.File.WriteAllText(My.Resources.MyTextFile, "some string")but that didn't work out since [My.Resources.MyTextFile] retrieves the content/value of the resource so what i want to do is edit the resource file simply, from within my application, not by going to My Project > Resources and from there, edit the file
View 1 RepliesNot sure if I'm posting this in the right area, but here goes anyway. I've been working with sql databases for practice, but can't seem to get around one thing; after I add it as a data source, I can't go back and add tables.
I start off by going through the project, then add item, choose the service-based database, and go from there. I add the tables, then go in and add it as a data source.
After I've added it as a data source, I can go back into the .mdf form and add lines and edit properties, but it wont update in the data sources. So, I can't add it to the form.
I must change the textbox value of a form a thread that is located on an other module. I've already tried with the CheckForIllegalCrossThreadCalls to False on the onLoad event of the textbox's form but it doesn't seems to work because everytime the thread executes the lines that should change the textbox value nothing happens at all (not even a warning). I really don't want to use that "safe cross threading" with delegates and stuff because it's too much trouble for me, I don't know how to use it and I just have one thread on my project and it's the only control that is accessing those textboxes.
View 2 RepliesI reopened my project to edit it but it is only showing the code not the design I cant get it back how do I do it?
View 3 RepliesCan VB 2008 use the system variable %1 that contains what filename a program was opened with? I am making a new app that when you click a .exe file and select the right option, it will edit the registry but I need to be able to keep the filename that I right clicked on so that I know what registry value to edit, is this possible?
View 1 RepliesWhat im trying to achieve is editing the value of this key; But I've tried everything i can think of.. I've tried just entering the name and type etc. but nothing..I've decalred:
Imports Microsoft.Win32
and the code im attempting to use:
Dim regKey As RegistryKey
[code]....
What i want it to do is create a key from the Drive Selection box i.e. 'H' then create two sub keys called 'DefaultIcon' and 'DefaultLabel' and assign values to their (Default) key but its not working.