Forms :: Question Controlname (checkbox) From Variable ?
Oct 14, 2010
I'd like to refer to 12 checkboxes on my form, "CBOX_mnth1....CBOX_mnth12", by a variable. So I'd like to loop through 1..12 and assigning the number after the text "CBOX_mnth". This together would make the controlname, like CBOX_mnth7 in case of x=7.I hope this is a bit understandable, for Englisch is not my native language.
I wanna do something like this:
(the {..} are from another language and used to assign a variable as controlname, which is axactly what I'm after in VB.net)
[code]...
View 11 Replies
ADVERTISEMENT
Sep 5, 2010
Using Visual Basic 2008 Express. I need to pass a variable to another form. Or else make the variable visible to both forms.
View 4 Replies
Oct 20, 2009
I have a secondForm that determines whether a checkbox.checked = true/false and I want the firstForm to verify whether the secondForms checkbox.checked = true/false in a function
View 1 Replies
Apr 8, 2010
I'm reading in a RTF file that I want to search by either using WholeWord or MatchCase search options.
atm I have this:
If (chkWhole.Checked = False) And (chkMatch.Checked = False) Then
'ERROR - MUST SELECT A SEARCH OPTION
[code].....
View 1 Replies
Jan 16, 2010
Ok im using an image as checkbox. so when i click the label next to it it will change from Uncheck image to Check image...
Ive tried:
If checkInj.Image = My.Resources.unchecked Then
checkInj.Image = My.Resources.checked
Else
[Code].....
View 10 Replies
Feb 17, 2011
I have a VBA form in Microstation I am using to try and help automate a task. The only problem I am having is I am reading a textbox (Filebox.Text) and setting it as the variable (FN). It works, because I used Msg.Box (FN) to test it. However, in two of the lines of code, I am trying to use (FN) to pass the typed in filename to the command to run in Microstation. Unfortunently, it gets passed on as (FN).dgn instead of the actual filenale typed into the textbox. Is there a way I can make the variable actually seen as a variable? Code on Pastebin: url....Also, not sure if this is the right section, 100% new to VBA, coming from a world Bashed together.
View 3 Replies
Apr 5, 2012
Here is my code:
number = 1
If chkFN.Enabled = True Then
If ProgressBar1.Value < 100 Then
number += 1
lblFN2.Text = number
[Code]...
View 1 Replies
Apr 22, 2010
This is my first Windows app to create since VB6. I've been in the world of ASP and ASP.NET for many years. However, now I have been asked to create a simple app that needs to be windows based.
[Code]...
View 4 Replies
Jun 20, 2011
I have a datagrid that is populated by a user starting and ending value. Each record has two check boxes. Here is an example;
Starting: ABC001
Ending: ABC004
Datagrid;
[code]....
The second problem; The user can move between different forms (forms that do not display the datagrid). Now what I did is create a class;
Public Class Class1
Public userData As DataGridView
End Class
View 1 Replies
Aug 13, 2010
Any example of checking the status of a CheckBox via a Thread.
View 2 Replies
Oct 27, 2009
I would like MyProcess() to fire when I click on any of several checkboxes. I could do it like this. [code]I have alot of checkboxes, and anyway, this method isn't very scalable.Is there any other way for a form (or panel maybe) to detect mouse events on child controls kind of like the way the KeyPreview property of a form allows it to detect key events of it's child controls?
View 3 Replies
Apr 5, 2009
I need to make the text value of a checkbox appear on a listbox when I check it and when make it disappear when I uncheck it. However, I need to do this with 100 checkboxes, and doing it per checkbox, I need a code that for any checkbox checked and unchecked, the text value will be listed or cleared on a listbox.
View 4 Replies
May 6, 2009
I added a tooltip control in my form and set a tooltip for a checkbox. The tooltip shows fine until I check the checkbox... If I check the checkbox once and uncheck it, the tooltip never shows up when I hover the mouse over it... How to make the tooltip to show on mousehover no matter the checkbox is clicked or not?
View 3 Replies
Aug 31, 2011
I have a checkbox as a control in a datarepeater object. I have an event handler function which handles the checkchanged event for this checkbox and sets the visibility of other fields based on it. However, the problem I am having is that the event handler function is getting fired when I set the datasource for the datarepeater - hence when the data is being populated. So the event handler function ends up trying to set the visibility of a field that has not been created yet and bombs out with a NullReferenceException error. Is there a way to stop this event handler being fired when the datarepeater is being populated? I only want this function to be called if that checkbox is changed by the user after the form has loaded.
View 2 Replies
Jan 4, 2011
I need to make a program (or if someone wants to make it for me, feel free to do so) that has a starter form with a combobox where you can select different sizes, like 2x2, 4x4, 6x6 and so on. When i then press the button to choose size, a new form would pop up , with 4 different grids of checkboxes, (white, red, green, blue).Do i have to make each form (frm2x2, frm4x4) and make each individual checkbox, or is there some other much greater solution?Because, in the end, i don't feel like naming 576 different checkboxes for just 1 form.
After all that has been made, it would be saved to a text file, with 0 being anything thats unchecked, 1 is white, 2 is red and so on. And it would look something similar to this:
[Code]...
View 3 Replies
Apr 15, 2010
Wow, didn't know that it takes a Master in Computer Science to figure out a simple Checkbox databind to a Boolean column. But anyway, I have spent two days trying to fion how I can properly display and update a Boolean type field in a Checkbox
View 6 Replies
May 7, 2011
I have 5 checkboxes in total.I want to check how many checkboxes have been checked.I dont want to write checkbox1.checkstate,checkbox2.checkstate and so on...How do I accomplish this effectively?
View 1 Replies
Aug 30, 2009
I'm trying to use checkboxes to show and close child forms.I'm using MDI. I want to try and make the child form show inside of the parent form like it should.This is the code I was using:
[code]...
And that works, but if I close the window instead of using the check box and then try to use the checkbox to open the new window again i get an error:Object reference not set to an instance of an object.Also I have more than one checkbox (each one serves a child form) and I would like to be able to open and close any of the child forms at any time.
View 2 Replies
Oct 23, 2009
I have two windows forms in my application, and I want to have variables that work between them. How would I do this?
View 2 Replies
Oct 28, 2009
I want to calculate the score on one form and display the score on another form
View 7 Replies
Sep 11, 2009
i have a dialogbox (dialog1) i will assign the input from textbox a variable to the from1 but i cant do that.the variable in form1 is Dim get_from_dbox As Long i try to assign to it from dialog1 like below it fails form1.get_from_dbox = Textbox1.Text but i can assign to textbox??like that which works well
form1.RichTextBox1.Text=Textbox1.Text I am new programing i know i am wrong .don't know where?
View 1 Replies
Sep 20, 2010
I am struggling to find out how to use a msg box to display the value of a variable.
I've tried a number of permutations, and searched for hours to find a tip.
My code is currently:
Private Sub btnShowTotalCost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowTotalCost.Click
If (radCorpTravel.Checked) Then
[Code].....
View 10 Replies
Jun 15, 2010
i have 2 forms -> form 1 and form 2
in form 1 -> 1 button
in form 2 -> 1 textbox and 1 button
when I click button in form 1, it will show the form 2..how can i pass the variable (data from textbox in form 2) into a variable in form 1 after clicking the button in form 2 ?
View 8 Replies
Jul 31, 2009
When I declare a variable as public, shouldn't it be available in another form? I am trying to write a windows mobile prg with 12 static mileage points, form1 has the 12 buttons for start point, but when I call form2 with the destination points, my start variable value is not carried over. I intend to then assign a mileage based on the two points and write to file on mobile device. We support 12 schools, and I want my employees to track mileage easily.
Public Class main
Public start As String = "start"
Public dest As String = "dest"
Public miles As Decimal = 0
[Code] .....
View 4 Replies
Apr 20, 2009
I want to create a variable to be used by multiple forms, so I created a module that looks like this:[code]I expected the title of that specific form to be "(Name)'s Settings"But instead, it just says "'s Settings," as if the variable had never been assigned a value.
View 4 Replies
Feb 7, 2010
Variable readable from all forms?
View 14 Replies
Jun 26, 2010
In my previous knowledge of programming, i used to use global.variable = true how could i achieve this so the variable could be used across all forms?
View 1 Replies
Jun 8, 2011
I have one form, which the user enters upto 5 websites then clicks go - I have on the second form, the one with the webbrowser. A timer which checks if the web browser is busy then either a green light or black image will be shown along side the assocaited input box on the first form.I am finding it impossible to feed variables into the clock through ByVal, like I would a subroutine or function.
Private Sub ActiveMe_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ActiveMe.Tick
If ((WebBrowser1.IsBusy)) Then
Hey.BackColor = Color.Black[code]....
'Error message says Hey is not declared, as i can't pass it through to timer
The variable Hey is determined by the first form - Which picturebox.I have an if statement which simply says if inputbox one has url enter then Hey = Picturebox1, If input box2 has url entered then Hey= Picturebox2 etc.What I want is the timer to check the page has completed loading or is still loading or refresing and the appropriate green or black to be shown aside url input box on first form.I considered using a sub or procedure to act as a clock (a large for loop with another for loop within it, acting as a delay). But found this slowed down theapp to the point of crashing it.
View 1 Replies
Sep 3, 2010
I have the following form: Imports System.Data.SqlClient Public Class Form1 Dim ReturnValue As Object = Nothing
[Code]...
View 12 Replies
Jul 27, 2009
I have a label in my Form which on loading, displays the contents of a text file. The contents of the text file may change and if so, the number of lines also will. I would like the Form to automatically resize itself based on the number of lines in the file. If there are more lines that the size of the label can take, I would like it to either resize or show scroll bars.
View 2 Replies