VS 2008 Writing Control Values From XML To Controls Within Group Boxes?
Nov 28, 2010
So basically what I'm trying to do is write data from an XML file (a "save file") back into the form. My controls are in all different group boxes (makes it much easier for showing and hiding groups of controls dynamically). I thought about and am putting each control's Parent name into the file, but can't figure out how to get that parent name back into the DirectCast within a For...Next loop so it will actually cast the data into the control.
[Code]...
View 1 Replies
ADVERTISEMENT
Aug 25, 2011
Im attempting to loop through all the text boxes inside of a group box, and add the text into a list box to later be written to a text file. Here is the code I am using.
Dim cControl As Control
Dim FILE_NAME As String = "Tester.efw"
Dim Group As GroupBox
[code]....
Now instead of locating only the text boxes, apparently it is still trying to identify the labels as text boxes, because I am getting this error:Unable to cast object of type 'System.Windows.Forms.Label' to type 'System.Windows.Forms.GroupBox'.
View 12 Replies
Jun 30, 2011
A toolbox in my project uses text boxes to hold the paramaters of some useful tools.[code]...
View 2 Replies
May 29, 2011
I'm working on my very first VB 2008 Express program, having a little bit of experience with VB 6.For my first VB 2008 program, I'm starting out simple. I have two text boxes, named Title and Director.You input text into each text box.I also have a button named GENERATE, which generates a text file named c.est.txt and stores the text box material.[cod]I know how to do this with VB 6, but not with VB 2008, and my research hasn't come up with an explanation of how to format this correctly.So how do I revise this code so that there is a line for each text box string, how do I get rid of the System.Windows.Forms.TextBox stuff and replace it with my own headers, and how do I double-space between lines?
View 13 Replies
Jan 1, 2011
I am writing an application and I do not know how to reference a group of controls inside a group box. I will include the code I have written so far and a picture with a detailed explanation as to what I am trying to do. Feel free to comment on any discrepancies that you may notice in my code.
Code:
Public Class Form1
' The following class-level constants are used
' to calculate the price of the model
Const decCOUPE As Decimal = 18000
[code].....
View 3 Replies
Jan 15, 2010
i want to implements users control. i have the same informations in a group box in a lot of forms. i would like to insert the same group box in all my forms.how would i do?
View 2 Replies
Nov 10, 2010
I'm writing some VB2008 code to control four 7-seg LEDs I bought from Velleman. They came with some example code in VB 5.0, and with instructions telling me to input 5 bytes at a time in the format Chr$() & Chr$() & etc. for the rest of the 5 bytes. When I try to do this using VB2008, it rejects the $ sign, so I've tried it using the Chr() format, which VB2008 allows. However, it doesn't work. Is Chr() the new version of Chr$() or are they different entities? In sending data to the LEDs, I'm using LiveComPort.WriteLine() as my command. (My serial port is called LiveComPort) I also tried it with LiveComPort.Write() asthe command. I know that my serial port and the LEDs are working, because they respond to the demo program provided by Velleman.
View 7 Replies
Feb 27, 2009
I used this code to created 2 combo boxes General and Specific...and Only show Specific (Combo when Combo A is chosen.....What i need now is to know how to assign specific values to the items in combo b (Specific).??? If i chose a sode, Fanta, i want the total price to be $10.00 (this price will show up in the finial price box..
View 4 Replies
May 22, 2012
I am developing a program that makes it easier for users to log on to a website and search for specific data. I have the first portion finished in which I have a form with the Ax Web Browser control.
The web browser control navigates to a local website and automatically logs in for the end user. This is done by using code which automatically fills in the username and password and then submits the form to logon using something similar to this: WebBrowser1.Document.Forms.Item(, 0).elements("txtUsername").value = "user"
Once logged on - there is a search page which contains a combo box and list box. I am trying to set specific values for the combo box and list boxes.For example - the combo box on the website is titled: cbxDate and contains the following values: Today, Yesterday, This Week, This Month.
A list box titled: lstArea contains the following values: Zone A, Zone B, Zone C, All.I am trying to figure out if there is a way through code to select, in this example, "Yesterday" in the cbxDate and "Zone B" in the lstArea on the webpage.If anyone knows of a solution, please feel free to let me know. Be advised that I am using the Ax Web Browser Control.
View 2 Replies
May 9, 2012
I have a groupbox with 12 checkboxes(containing months of the year). I need to calculate and display the value in a text box.
For example if one check box is checked then on clicking the button calculate, it should be able to display the value 500 in the text box, if two checkboxes is checked then the total should be 1000, if three check boxes then total should be 1500 and so on[code]...
View 1 Replies
Feb 24, 2010
I am trying to get 2 group boxes with radio buttons. I would like to check a radio button in group box 1 and have a corresponding radio button in group set 2 get automatically checked based on what I check in group box1. I am trying to do this in VB.
View 4 Replies
Apr 26, 2009
The other day I needed to know how to handle a group of form items in one function, specifically speaking I needed to uncheck all ListBoxes in a group of a MenuStrip when any other was checked. Now I need something similar, except this time it's just a group of check boxes on a panel. heres the code I used for the other purpose.
[Code]...
View 1 Replies
Mar 26, 2012
I have a form that has group boxes of various controls for data input. One of the group boxes contains a user control. This user control can be 1 of 7 I have depending on the type of data I wish my user to load. The 7 user controls are all of various size. My form is a fixed size, and i have allowed room for the user control to fit the largest. However, the smallest one has a lot of space obviously. The resizing of the form itself I am struggling with. It has to be the size it is at now as there is a tab control,
View 1 Replies
Mar 9, 2010
Glad to see some of the great minds are still here. I'm going to be frequenting this plethora of knowledge for the next couple of weeks as I attempt to complete my capstone software engineering class and finally get my undergrad. As usually I will typically need information or guidance. Since this is homework based. I have found my first issue. Allow me to digress....
The task given to my team is to create a checkers game which will have the capability to pay either player vs player or player vs cpu. Before I can begin to work on logic I need to cross the hurdle of detecting mouse movement. I have created the board which consists of 64 panels inside a groupbox. Each panel will have 4 images layers on top with the .visible property set to false. I am familiar with mouse click events to a degree but apparently lack some of the know how required.
[Code]....
View 8 Replies
Jun 4, 2011
I am trying to change the button colors, in different group boxes,(Buttons and group boxes are in the same form). How can I change it?
View 1 Replies
Mar 10, 2012
I am currently trying to allocate a number of group boxes dynamically. Previously (in other languages) when I have carried out something like this I have used the '&' to substitute the contents of the variable direct into the code I.E
For I = 1 to 20
Groupboxname = "GroupBox"+I
Weatherstates.&groupbox.controlls.add(obutton)
next
This would then have the result of creating a button in all the group boxes, however this does not appear to work in VB .net 2010
I have looked at Directcast, but i am a even more confused. Is there a simple way to substitute the contents of a variable into the code ?
View 12 Replies
Nov 9, 2009
New user here using VB .Net 2008
I seem to be having trouble getting group boxes to appear when I click a radio button.
For example:
If radiobutton1.Checked Then
Groupbox1.Visible = True
Groupbox2.Visible = False
Groupbox3.Visible = False
Groupbox4.Visible = False
End If
This indeed brings up the first radio button however I have other groupboxes underneath which with the same code will not appear when the radio button is checked.
Eg:
If radiobutton2.Checked Then
Groupbox2.Visible = True
Groupbox1.Visible = False
Groupbox3.Visible = False
Groupbox4.Visible = False
End If
The second groupbox does not appear and is directly behind the first groupbox.
The .Top code doesn't seem to be working either.
View 7 Replies
Oct 7, 2009
I put some group boxes on a user interface and now labels and pictures that are set to visible can't be seen even when the group box is set to visible = false. (I have the group box and the pictures and labels in the same place on the form and was planning on using buttons to make them visible and invisible but the pictures and labels stay invisible no matter what while being in the same place as the group box.)
Does anyone know why group boxes do a sound job of making things invisible and how to correct it?
View 24 Replies
Mar 28, 2011
I am having trouble coming up with a way to add a selected radio button in a selected group box together.I have 3 group boxes each accessed by a checkbox within each group box there is 3 to 4 radio buttons. I would like to know how to add the selected radio buttons in each group box together and display them in a textbox by clicking a button "calculate". I believe I would have to make a global variable but I dont know where to start.
Private Sub Calculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calculatebtn.Click
Dim answer As String
[code]....
I know this code is wrong but I was just trying to remember the calculate function.Is there a command that uses the selected radio button from the group boxes then I would be able to input that into my calculate button sub?
View 7 Replies
Jun 21, 2012
I understand because it has to be ON/OFF it won't go through to any other radio buttons in the group box. Would the best way is to use a hidden radio button that would switch control between the two? There's only two radio buttons i need to tab through, what's the best way to tackle this?
View 7 Replies
Nov 15, 2011
I am trying to write a program that will have different group boxes,
each representing a question, and each one has radio button choices
I am trying to write the program so that a while loop will go through each group box and check answers of radio button choices
the codes I want to know is the command to access different group boxes
and also how to keep each group box "seperate" enough that i can use same radio button names for all the group boxes...
View 3 Replies
Mar 25, 2011
It appears to me to be right but always returns true.
vb
Private Function ValidateAllFieldsAreNotEmpty() As Boolean
Dim groupboxes = Me.Controls.OfType(Of GroupBox)()
Dim textboxes = groupboxes.SelectMany(Function(groupbox)
[code]....
View 5 Replies
Jul 23, 2011
I have written a code and tried linking up groupboxes from my input form called input.vb and the output form called results.vb.
[Code]...
I have used the above codes to access groupboxes from both forms. However, at run time I get errors saying "InvalidCastException was unhandled" and below that it says "Conversion from string to DOuble is not valid". This error points to a value in a group box that is actually hidden or disabled.
View 9 Replies
Feb 3, 2011
I'm fiddling around with trying to make a sort of map/world. I'm using 16 x 16 pictureboxes named PictureBox1, PictureBox2, etcThe issue is that when I put the images into all the pictureboxes, I have to have a line for each picturebox (so say I have 100 boxes, I have 100 lines).The only difference in each line is the picturebox number, the rest is identical. I'm basically telling it to set that picturebox's image based on the number that a variable I've created has stored.I've got a game idea, and I'm just trying to figure out how to do the map. I want it to work like the old school RPG games like Dragon Warrior, or the more recent Dwarf Fortress. I'm still not sure if I want to use graphics or letters. At this point, I'm just trying to figure out how I can create the main screen where the user moves around. This is what I've come up with, as it works with what I know. I'm pretty new to this, although I've messed around with VB6 a lot.
Dim tile(30) As Integer
Dim tilelocation(3) As String
Dim x As Integer
[code]....
View 7 Replies
Feb 10, 2012
I have created a winform with a text box on.The localization of form is True and the language is Urdu. I want to type urdu language in the text box. he RightToLeft has also been set. But when I type, text flows from right to left but it is in english.
View 3 Replies
Aug 8, 2011
I am facing an important problem with the LineShape control (installed with the Visual Basic Power Pack) . The problem is that in design time once I have "Sent to back" some controls (other controls, like text boxes), I can no longer select them! The controls get stuck on the form and I can't select them anymore! Even if I select those controls from the Properties window, I still can't do anything with them (like move them over the form etc). Right now I am using VS 2008. However maybe this problems doesn't appear on VS 2010?
View 19 Replies
Nov 17, 2009
How do I start writing a program that has 6 text boxes. A person would enter a member number if they have one, number of movies rented at $1.80 a piece. A Text box should then display Total Rental Price, and if a member number was entered, a 10% discount is given (the total of the discount shows up in another text box) and after there discount is applied the Amount Due is displayed in yet another Text Box.
My boxes are named:
memberNumberBox
moviesRentedBox
rentalPriceBox = $1.80
totalPriceBox
discountBox
amountDueBox
This is all supposed to happed when the customer clicks on a calculation button named: Button1
This is what I have so far, but I don't even know if this is correct, as I am getting 1 error relating to a name not being declared. Please help and clue me in to where to start!
Public Class Bonanza
Private Sub memberNumberBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles memberNumberBox.TextChanged
[CODE]...
View 3 Replies
Feb 8, 2011
How can I group controls in my Form?
I don't need groupbox or panels, just something in the code...
To make it clear:
I have one form, Form1.
I have 3 buttons: Button1, Button2 and Button3, and I have 2 labels, named Label1 and Label2.
I have 2 "groups", in group1 there is Button1, Button2 and Button3. In group2 there are the two labels (Label1 and Label2).
But how can I program that, that if I write (for example) "Group1.Hide()", then everything In Group1 hides (visible = false). And so on with group2.
View 4 Replies
Mar 12, 2009
I programatically add a group of UserControls to a flowLayoutPanel control.
sometimes I need to destroy that group of controls, but have no idea on how to do it.
assigning the flowLayoutPanel variable to nothing only erases the pointer, but the controls remain in the window.I have found a page in MSDN saying that the best way to destroy a control is to call the DestroyWindow API, to destroy the container window. But I don't want to destroy the container window.
View 2 Replies
Jul 13, 2009
I have 53 text boxes in my windows forms application. I need to save the "text" of all the textboxes into a single file. Is there a way, I can control all the textboxes as a single textbox group and use its properties.
For example: Can I write something like :
For i As Integer = 0 to 52
Textboxgroup.text = TextBox(i).Text
Next
??
View 5 Replies