VS 2005 One RadioButton Check Change Doesn't Effect Others
Sep 3, 2010
I have 3 RadioButton on the form, and a button. in button click event i have the following line RadioButton1.Checked = False when the rb1 checked is set the false, none of the other two rb's are set to true.Which should happen by default (atleast i happens when i set the checked using mouse or keybd)
View 6 Replies
ADVERTISEMENT
Apr 9, 2011
i am having a problem with a calculator that i am making. i am using radio buttons as selectors for the operations (+-*/). i have two input-boxes. i want to do some error checking. for example if the user want to find the mod of a number, i want them to only use inputbox1 to enter the value. [Code] the problem is that when other radio buttons are clicked the effect doesn't change. how can i fix it so that other radio buttons don't have the same action. i am using visual studios 2008 professional.
View 3 Replies
Oct 9, 2010
When filling controls on a form, I want to check the DB value of a Field, if it Yes one RB is set to checked, if it is No the other one is set. I know I have doen this before but can't remeber how or find a sample.
vb.net
If Not dsSearch.Tables(0).Rows(dbCursor).Item(12) Is DBNull.Value Then
If dsSearch.Tables(0).Rows(dbCursor).Item(12) Is "Yes" Then
Me.rbtActive.Checked = CBool(CheckState.Checked)
[code]....
View 4 Replies
Oct 24, 2010
I have a field on my form for Check Number if a bill was paid by check, if not it should be blank. When I run the query in Access it returns the right records.the query loads all current customers, 99 out of a possible 107, when I navigate through the records as soon as I hit one where a Check was used, the Check Number field stays filled in for all records displayed after.
vb.net
If Not dsForm.Tables(0).Rows(dbCursor).Item(1) Is DBNull.Value Then
Me.txtRentalID.Text = CStr(dsForm.Tables(0).Rows(dbCursor).Item(1))
Me.intRentalID = CInt(Me.txtRentalID.Text.Trim.ToString)
[code]....
View 4 Replies
Feb 28, 2009
Hi, I have a project that works with a database. It groups al my films per category. I use this code to group everything by category. The categories are chosen in the combobox cboCateogorie.
Private Sub cboCategorie_SelectedIndexChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboCategorie.SelectedIndexChanged
If Not cboCategorie.SelectedValue Is Nothing Then
cboCategorie.DataBindings.Clear()
cboCategorie.DataBindings.Add(New Binding("Text", objDtsMuziekcollectie.tblCategorieen, "CategorieID"))
Dim dtvDVDInhoud As DataView
dtvDVDInhoud = objDtsMuziekcollectie.tblDVDInhoud.DefaultView
dtvDVDInhoud.RowFilter = "CategorieID = " & cboCategorie.SelectedValue.ToString
dtvDVDInhoud.Sort = "DvdID ASC"
objTblDVDInhoudBindingSource.DataSource = dtvDVDInhoud
Me.objTblDVDInhoudBindingSource.MoveFirst()
End If
End Sub
Now I've made a textbox and a button which I can search with. But I want that my category in the combobox changes when a film is selected with that search. Now I already have this code to search with a joker sign.
Private Sub btnZoek_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnZoek.Click
Dim dtvZoeken As DataView
dtvZoeken = objDtsMuziekcollectie.tblDVDInhoud.DefaultView
dtvZoeken.Sort = "DvdID"
objTblDVDInhoudBindingSource.DataSource = dtvZoeken
dtvZoeken.RowFilter = "Titel like '" & txtZoekveld.Text & "*'"
End Sub
Ok, so what I want is the opposite off what I do when I select a category in a combobox. Now I actually select a film and this film also has an ID, namely DvdID and with that I want that the combobox shows the category where the film belongs to.
View 8 Replies
Feb 28, 2009
I have a project that works with a database. It groups al my films per category. I use this code to group everything by category. The categories are chosen in the combobox cboCateogorie.
category
Private Sub cboCategorie_SelectedIndexChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboCategorie.SelectedIndexChanged
If Not cboCategorie.SelectedValue Is Nothing Then
[code]....
what I want is the opposite off what I do when I select a category in a combobox. Now I actually select a film and this film also has an ID, namely DvdID and with that I want that the combobox shows the category where the film belongs to.
View 9 Replies
Aug 18, 2010
I have a VS2005 utility that I'm working on that has an Access 2003 backend. A couple of days ago, my boss asked that I change one field in two tables from TEXT to MEMO, to allow more information to be put in. In doing some final pre-deployment testing, I find when I hit my button to pull up the list of tickets, I get the error
"System.Data.ConstraintException was unhandled
Message="Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.""
The datagrid is based on a query I have in the database. The query runs fine, and when I go through the XSD and go into Query Builder, the QB is also returning data. I have made the various changes to the utlity as suggested by Microsoft, but no luck. When I put the two columns back to TEXT, the Grid works fine.
How the heck do I set it up so that the grid will recognise the new data format? The number of characters for the individual columns is set to 37,627 (I believe, it's whatever the default is). I only have 200 characters in my test data. I need to rebuild the whole dataset - this deployment has to be done by the end of the day tomorrow and I have a whole pile of other stuff left to do.
View 4 Replies
Aug 11, 2010
I have group of radio buttons, each group ranges from 5 - 27 radiobuttons. And if any radio button in a group is checked I store 1 in db else I store 0. Now I'm checking each radiobutton using if loop to see if they are checked and set database value. I'm also trying to use the code below. Is there a good/better approach to check if they are checked or not?
Current code:
'rname is radiobutton prefix for a given group
'cnt is number of radiobuttons in the group
Private Function RadioIsChecked(ByVal rname As String, ByVal cnt As Integer) As Integer[code]....
Note: I cannot use radio button list. I know this can be achieved easily using this but i want to get solution for radiobutton
View 5 Replies
Oct 4, 2009
How do I check a CheckBox/RadioButton in a webbrowser?
View 2 Replies
Jun 12, 2011
I am trying to change the background color of a tooltip
I am using tooltip.backgroundcolor = color.colr
No errors but thecolor doesn't change
View 5 Replies
Sep 26, 2010
How to paint controls such as change color of circle in radiobutton .I want to change color of circle in radiobutton
View 2 Replies
Aug 18, 2011
How to change wallpaper with fade?
View 1 Replies
Aug 15, 2009
I have fields with " monday, tuesday,wed, thu, fri, sat and sun". I am trying to add the hours of each day on a separte field " week total hours "..Everything works fine but say if i make any changes again to "monday hours" it does not take effect on " tot hours "
eg.. mon 2hrs, tues 1 hrs, wed 1 hrs, thur 0, fri o, sat 0 and sun 0, then the total hours is 2+1+1 = 4 and it displays well ....but if i change ( mon= 1 ) then it should be 1+1+1 = 3 but it remains 4
[Code]...
View 30 Replies
Aug 13, 2011
I used this:
Dim i1 As Bitmap = owall.Clone
Dim i2 As New Bitmap(ChangingWP)
Dim g As Graphics = Graphics.FromImage(i1)
Dim cm As New Imaging.ColorMatrix(New Single()()
[Code]...
View 1 Replies
Jan 13, 2010
I've made an Aero-style form header (see signature) and I wanted to speed it up, so I used LockBits, and it had a different effect. These two methods should do the same thing, right? Well, it doesn't. Image 1 is before LockBits, Image 2 is after. Using LockBits gives a streaking effect that I don't like.[code]
View 5 Replies
Mar 20, 2009
Ive been using this code for a user to pickup a picture box basicly, but if a form exceeds a certain size When you drag the picturebox it will warp around instead of smoothly being dragged, what is causing this?
Dim offset As Point
Dim bDragging As Boolean
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
[code]....
View 2 Replies
Mar 23, 2009
I am writing a custom control which is a textbox currency control. What is the best way if I make changes to my control to have my main project use the changed control?
View 9 Replies
Feb 9, 2011
Ok, so I know I have to change the labeledit to true but that doesn't change the selected node to be able to edit, so how does that work?
Along with renaming I have it set to that a user can add a node. So once the node has ben added how do I let them rename it as it is being added and without being a prompt or inputbox? So lets say I cam clicked on a parent and they click add node, it adds it to parent but I have it so it is default "New" but I want them to edit it as it is added. I think it will be along the same lines as clicking on one and rename but I have to start some place.
View 3 Replies
Jan 13, 2010
I'm working on a simple base form in which all the other forms in the project will inherit. This base form only adds 5 properties (at the moment) dealing with painting a gradient background. The problem I'm facing right now is when I change a property on Form1 (the test form) and click run it doesn't show that change. I also checked the .designer.vb file and when I make a change it's not added to the code behind file, I'm at a loss right now to why.
[Code]...
View 5 Replies
Oct 4, 2009
Im trying to check a "male" radiobutton. Heres my code, and the debugging error
[Code]...
View 1 Replies
Jul 24, 2011
Im having some really simple problems. whenever i click a button its supossed to disable another button and write text into a label that has words in it. for some reason it doesnt work
If move1 = "TL" Then
lblBL.Text = "O"
btnBL.Enabled = False
[code].....
View 2 Replies
Jun 5, 2009
Why this line doesn't change the value of my datetimepicker using me.gatepassbindingsource.addnew():
Me.GatepassDataSet.gpheader.gpdateColumn.DefaultValue = Now()
Implementing BindingNavigatorAddNewItem executes above line correctly. I don't want this because the bindingnavigator items are active. Coding me.gatepassbindingsource.addnew(), I can make my bindingnavigator items inactive/disabled while adding record.
View 4 Replies
Jan 3, 2010
I've got a page which has 5 images on, 5 FileUpload controls, 5 buttons and in the code behind 5 on click events. The page shows the images and lets users change each individual image if they'd like and it's all working well....except. When the upload is done and the new image has been uploaded to the ftp server, how do I then re-display the same page the user has just used, but this time with the new image image in place of the old? Do I need to call an instance of the page_load event again?
View 14 Replies
Jun 21, 2010
My vb app uses an icon which is 128x128, which looks fine on the desktop. But when viewed in a folder with View set to Extra Large Icons its size doesn't change - it is too small (smaller than 128x128). Any ideas how I can rectify this?
View 1 Replies
Jul 29, 2010
This Module doesn't work on Windows 7 x64.What I should change?The module is : Runpe.
vb.net
Imports System.Runtime.InteropServices
Imports System.ComponentModel
Public Class rp
[Code]...
View 11 Replies
Mar 18, 2012
I have a DropDownList in a MultiView2:View2, and if the selected index of the DropDown is 5, then the view should change to View3, but doesn't work, I have AutoPostBack property of the DropDown set to True, the two views both have UpdatePanels within them. I have this within an IF statement obviously, and everything else fires, besides the MultiView2.ActiveViewIndex = 1.
This is my code so far...
This is under the SelectedIndexChanged event
If drpDownSecurityQuestion.SelectedIndex = 0 Then
[code].....
View 1 Replies
Nov 12, 2010
I have an editable datagridview that's been databound with dataadapter and datatable, and a normal button on a form. When i edit the dgv's cells and click the save button it fires the datagridview_cellvalidating event and if the cell validation is correct it updates and saves the current record to the datasource. Also, before save it commits change in any cell under editing. But when I use a toolstripbutton to do the same work, though it saves the dgv records but doesn't update the current change i.e. it saves the old records that are being fetched when the dgv was populated first during form load. Also, clicking the toolstripbutton doesn't fire datagridview_cellvalidating, datagridview_rowvalidating etc events. What it seems to be is it's not committing the change in any cell under editing. [Code]
Why isn't it happening and how can I make it work? how can I fire datagridview_ cellvalidating, datagridview_rowvalidating and other events; and commit cell value change by clicking toolstripbutton.
View 2 Replies
Jun 1, 2010
I have a form that asks the user for certain search criteria. Based on this it goes and searches Active Directory for computer accounts. Whilst this search is happening I want the cursor to change to the hourglass but I've tried
Application.WaitCursor=true
Me.Cursor=Cursors.WaitCursor
me.UseWaitCursor=True
Nothing works. The cursor stays firmly as the default cursor.This is the code that calls the form
Dim inputform As New MachineSearchInputForm
If inputform.ShowDialog = System.Windows.Forms.DialogResult.OK Then
Dim PropertiesToLoad As String() = New String() {"name", "distinguishedname", "objectclass"}
[code]....
View 4 Replies
Dec 3, 2009
i am using file system watcher for service when a xml file is come in i processed the xml file and set Processed = True but this variable value doesn't change untill all file created..
View 2 Replies
Mar 23, 2012
I have a WinForms app built with VB.Net in VS 2010, and I'm scratching my head over the following issue.I have a form with a combobox which gets bound to a datasource when the form is loaded:
With Me.cboCompany
.DataBindings.Clear()
.DataSource = Me.m_dsBidResults.Tables("Company")
.ValueMember = "company_id"
[code].....
This seems to work fine, as long as the user doesn't switch focus to some other control and then go back to the combobox. After switching focus, if the user then changes the combobox selection to the first item in the dropdown list (SelectedIndex = 0), the SelectionChangeCommitted event fires, but the SelectedValue remains set to the previously selected value. I've verified this by adding a message box in the above event handler, displaying SelectedIndex and SelectedValue side-by-side.
'add this to SelectionChangeCommitted event handler MsgBox(String.Format("Selected Index: {0}, Selected Value: {1}", cboCompany.SelectedIndex, cboCompany.SelectedValue))
This does NOT happen if the user changes SelectedIndex to anything other than 0; everything behaves as expected. I've verified that the table I'm binding to contains unique values for company_id and company_name.Do I need to use some other event to verify that the SelectedValue has actually changed?
View 1 Replies