Two Radionbuttons In A Form - Assign Them With A Value ?
Jan 31, 2012
i have two Radionbuttons in a form and i want them to assign with a value so that i can take that value and tomultiple with other value.The numbers i want to mulitple is decimals.My code look like this:
Private Sub btncalc_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btncalc.Click
Const BandA As Decimal = 16.5[code].....
View 21 Replies
ADVERTISEMENT
Mar 9, 2010
Admin assigns the authority and get a new form to the new assign in with vb.net & access. I am not sure about this,I need a way to do the new form assigned? How?Actually, this project is the admin will assign the authority to a manager, and the manager will get the password to log in. Then, the manager once log in and will get a form to set the rooms who is going to use and date, etc, this is multi-manager to handle the room setting jobs.But, I think, I got stuck, I am not sure how to do the new form, HOW DO YOU ASSIGN THIS NEW FORM FOR EACH NEW MANAGER?????? THIS IS VB.NET WITH ACCESS.
View 3 Replies
Mar 20, 2012
I am trying to assign values to controls in another form and I created a procedure(sub) to do this I was using myOtherForm.Label1.Text = "Value" but it is giving me an error saying expression does not produce a value
View 1 Replies
Oct 15, 2011
I have an problem to assign a startup form in vb.net. I have three forms:
1) Registration Form
2) Login Form
3) Main Form
Firstly i have set set startup form as registration in properties =>Application after registration completed or saved i am displaying the Login form by hiding the registration form. and entering username and password it displays the Main form. Now the twist when i exit from application next time i started to run my project where i can check if their is entry in registration form it will directly goto login form.
View 3 Replies
Aug 5, 2009
I looked at another thread to see how to assign the ESC key to clear my form, but it does nothing.
Private Sub frmBookingForm_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case Keys.Escape
InitialiseForm()
End Select
End Sub
Do I need to IMPORT anything before this code works.
View 6 Replies
Feb 14, 2012
I want to give a form two designs, one design on application startup and another when a button is pressed. Can I do this with another designer?
View 3 Replies
Dec 5, 2009
How can i do that in vb.net . I saw this in my designer but i cant file that icon in my resource. How did it store and where [cod]e....
View 3 Replies
Jun 19, 2012
I've got a class where I pass in a panel reference and in that panel I'm then required to draw multiple other panels that represent my objects. The issue is that when I go to bind dynamically click events to these panels I don't have reference to the Form of which I want to popup on the click event.
The reason for this structure is so that I can redraw my class dynamically and reattach certain events to each object.
Is there any way to do this without moving my classes logic outside of the Assembly or is there any way to attach my click event to a piece of code logic to a sub in my WinForm?
View 1 Replies
Mar 3, 2009
think i have 2 form & one module..
form1 (has one button name button1)
form2 (also has one button name button1)
[Code]....
View 2 Replies
Jan 19, 2011
I am new to visual basic and wondering on how to assign an access key to the close button in my form. It is in VB2010 and wanted to have an access key like x on the keyboard.
View 4 Replies
Nov 15, 2011
I have a bunch of text boxes that get created on form load depending on a value in a combo box. The text boxes get named in the fasion txtBx1, txtBx2, ect. Then I want to assign values to those text boxes with a button click. However when I try to write the txtBx1.text = "Blah" code under button click, I get 'txtBx1' is not declared. [code]...
View 3 Replies
Jan 16, 2010
I am trying to assign a button to let a resource ( JPEG image ) become the background of my form. But instead, the background becomes blank. Here is what I wrote:
Public Class Choose_Background
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.BackgroundImage = My_Project.My.Resources.african_lion
[code]....
View 2 Replies
Aug 4, 2009
Im using a dataset to display data in a datagrid from a sql server DB. One of the colums I have in my datagrid is "Status" the table adapter sql statment selects certain items based on whether there open or closed e.g "where = Open ". I want to remove this row entirely and instead of displaying open or closed for status column, display the open/ closed results in colour on the datagrid. Im really not sure how to go about this whether i need to do it in the table adapter or some sort of property. I presume i need to write a sql statement and selct the identity of the row where x= open etc , is there a way of assigning a colour in sql statement so it displays on my vb form ?
View 2 Replies
Apr 29, 2012
Consider following code:
Dim S1 As String = "a"
'this is the string in a file
Dim StringFromFile As String = "S1=hello"
[code]....
how to assign value to S1?I have declared a string named S1. Now I want to assign new value to S1. The new string value is stored in a file using following format: [variable name][= as separator][string value]. How do I assign the value to S1 after retrieving the string variable name and value that stored in a file?
NOTE:
temp(0) = "S1"
temp(1) = "hello"
It should be noted that the string with the data comes from a file that may change from time to time! When the file changes, I want the variables to change as well.
Further clarification I need a piece of code that when processing a string like this "S1=hello", the code will first find a declared variable (i.e. S1), and then assign the S1 variable with "hello" string. The "=" just acted as separator for variable name and variable value.
UPDATE:
My attempt to use Mathias Lykkegaard Lorenzen's EDIT 2 example but failed with "NullReferenceException" on this line "Field.SetValue(Me, VariableValue)". Please help me fix the problem. Following is my code based on Mathias Lykkegaard Lorenzen's EDIT 2 example:
Public Sub Ask()
Try
Dim S1 As String = "a"
Dim StringFromFile As String = "S1=hello"
[code]....
View 7 Replies
Apr 27, 2011
I have a file txt file that holds 3 values each seperated by a space how can i assign each value to its own variable and use that for other things?
View 4 Replies
Jun 2, 2011
assign hot key for textbox?
View 13 Replies
Jan 9, 2012
how to assign Hot Key? like F2, F3 and F5 from form?i am created two forms. if press F5 key. then goto to the Second form?
View 3 Replies
Aug 24, 2010
Does Visual Basic arrays have the possibility to assign values in one line?i.e. No need to have a loop to assign a value for the whole array.for example,
Dim Array1 (1000) As Integer = 478
Dim Array2 (1000, 1000) As Integer = 852
this means that all values of array1 will be 478 and the other is 852.
View 6 Replies
Jun 22, 2011
I have a label, lblmessage, which I want to assign 4 different values. It should show up like this:
[Code]...
I know this: lblmessage.text = "5" and to assign it another value lblmessage.text = lblmessage.text + "4". This just puts them next to each other, but how can I get them to show up underneath each other?
View 2 Replies
May 22, 2012
I have the String and integers to which some values are assigned. now i need to read the string and integer values and assigned them to the datatable which i have created using VB.Net.
[Code]...
View 1 Replies
May 2, 2011
How can i assign a value in the Gridview to a label?
Dim Command3 As New SqlCommand
Adapter = New SqlDataAdapter("Select [Parking_Cost] FROM Parking Where [Parking_ID] = @Parking_ID2", myConn)
Adapter.SelectCommand.Parameters.AddWithValue("@Parking_ID2", Parking_ID2)
Adapter.Fill(Dataset)
[code]....
Tried binding did not work
View 1 Replies
Aug 10, 2007
I have developed an applcation using vb.net, its a windows based or Desktop Application. In one of the Form i am displaying the new complaints in a DataGrid With Employee Names.
Now, Each employee has a prority set for him, so depending upon the priority I want to assign a different color to Datagrid row.
View 8 Replies
Sep 22, 2009
How do I assign a dynamic fontstyle? I tried this but all I get is normal and not an italic or normal fontstyle depending on the columns value.
[Code]....
View 6 Replies
Jun 30, 2010
I want to build in the functionality so that when eg, the Key "1" is pressed it can trigger an event like eg. set the counter to zero.
I have used the following code to test the function but it doesn't seem to work. I don't know if I have placed it in the correct area or it is doing what I want it to do as there is no message box that appears.[code]...
View 2 Replies
Feb 22, 2011
At the moment i'm working hard to better understand aspnet (VB), still learning and still enjoying, but at the moment i'm struggling with (i think something realy easy) but can't find out how to fix it,what i need to do is: assign the propperty Weekday() of CSlot Dim CSlot As New timeslotParamTO I have to assign te propperty weekday to Cslot but the propperty must be 1 or more items from the Public Enum WeekdayEnum. i just can't figure out how to assign 1 or more weekday's to CSlot.weekday().
[code]...
View 2 Replies
Apr 2, 2010
I've been making this BlackJack program for a school project
I have 52 image files, labelled from '_1' to '_52' in my resources folder, each number corresponds to a card.
My question is, how do I get a picture box to assign the correct resource according to a variable
So, say I have
"pictDealerCard1" -> picture box which displays the first of the dealers card
DealerCard1 = 37 -> random number generated through INT(RND() * 52)
and resource '_37'
[Code].....
View 3 Replies
Oct 8, 2011
I'm doing binary serialization and want to know if its possible to assign the type of the serializable object in the serializer method at runtime by passing the type as a parmeter. Is it also possible to assign the return type?
View 6 Replies
Feb 29, 2012
I have an application in VB.Net that displays the results of a math operation to a listbox. For example I have the 12345 + 12345 = 24690. What I'm trying to do is to have the first 2 numbers (12345 and 12345) copied to 2 different textboxes when listbox item is selected. Here's the code I have so far:
'Make sure that we have a selected item before continuing
If listBox1.SelectedIndex = -1 Then
Return
[Code]....
During runtime it only works with index 1 when it gets selected. I have 10 records being displayed (0 to 9). None of other indexes are being shown at the textboxes.
View 6 Replies
Apr 24, 2011
I am experiencing aproblem in my VB.NET App. The salary form is a databound form in my app to a linq data source. There are several text boxes to enter and calculate different salary fields. e.g. Basic Salary, Budgetary Allowance and Adjusted Basic Salary...
all the above three controls are bound to the datasource. now on the Leave events of the Basic Salary and Budgetary Allowance there is a function to calculate Adjusted basic salary.
The problem is i dont see the calculated amount in the adjusted basic salary but i see only the underlying data in the database instead of the programmatically calculated amount.
View 4 Replies
Jul 7, 2010
I want to assign a value programatically to a field in current DataSet which is not bound to any control on the form. I am using the following method but it does not save the value "F" in DB on calling UpdateAll command.
Me.WorkOrderDataSet.Orders.status1Column.DefaultValue = "F"
My update command:
Try
Me.Validate()
Me.OrdersBindingSource.EndEdit()
[Code].....
View 9 Replies