Create Dropdown Boxes That Are Created From A Result?
Feb 25, 2009
Im trying to take a Listbox that I loaded an array from my mysql database. how to learn how to mask that result in the listbox?Second I want to create dropdown boxes that are created from a result. ie meaning if the array returns 4 results then 4 different dropdown are created one with each result. Im not sure what this is called and where to start.I can use either VS2005 and VS2008.
View 3 Replies
ADVERTISEMENT
Nov 3, 2010
So as the name states; I am a newer coder.
This is the code i have:
Public Sub RandomNumbers()
Dim s(4) As String
Dim RandomNumber As Byte
I don't know if you can tell what I am trying to do here, so I will try to explain. I what to create for random numbers and place them into for different text boxes. I also would like to do this with combo boxes and their selected indexes. So if the combo box has 10 items in it; the new selected index would be the random number generated above.
View 5 Replies
Jan 17, 2012
how to say it. Im going to be making a program for my work, something for our CNC programmers to use for referencing machine code. Basically what i want is to have 2 combo boxes. One of them will have some letters, the other will have some numbers. If the user selects "X" in the one combo box and "54" in the other combo box, i want a label that will output "5221". The output is a given number, it will never change. Everytime that combination of of combo boxes have those things selected it will output "5221". So now my question is what is the best way to do this? My first instinct was a select case. Is this the best way to do it? I was also thinking about possibly using textboxes and having the user manually enter values instead of a combo box with some 60 numbers in it. I marked this as a discussion also, thinking it is more of a discussion than a question.
View 8 Replies
Aug 13, 2010
I'm trying to lern VS 2010 from VB 6 and one of the things i'm hawing a problem whid is control array.In vb 6 if you create a text box it's named "Text1" and if you yust copy it and paste it it renames to "Text1(0)" and the new one's name is "Text1(0)" and the code would lock like this
[code]...
then it would print for each loop the random result in one of the text boxes corresponding to i.
How do i do this in VS 2010?
View 39 Replies
Feb 10, 2012
ive got code like the code below that creates textboxes dynamically. I want to be able to click a button and delete all of these textboxes i make, however im not sure how to do this. When i tell the program to remove the TBIndex control it does not do anything. The only way i get it to work is if i put the command in the same sub as this code. This code runs in a loop by the way.
So if the loop runs one time and creates the TBIndex control and i have a line of code right after to remove the textbox, then it does not show up on my form. But if i put the command in to remove the textboxes somewhere else and run the code the loop runs abunch of times and creates all teh textboxes and the loop is complete, then the remove control part is called and nothing happens. I just need a way to clear all the textboxes off my form with like a button. I also tried painting over the textboxes with a big grey rectangle but that dindt work.
TBIndex.Width = 54
TBIndex.Height = 20
TBIndex.Visible = True
[Code]....
View 2 Replies
Oct 30, 2011
Retrieve and set values from a runtime created text boxes. following code is what i wrote to create a textbox in my form.[code]...
View 3 Replies
Jan 31, 2010
With the following example of code, whenever the user clicks a menu item it will load up a new form. This form will then read from a database, and create text boxes throughout.
Private Sub allowances_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If mainMenu.currentSlic.ToString = "0" Then
[Code]....
View 3 Replies
Apr 5, 2010
i have a database created in access showing in multi text-boxes in visual basic 2008 express edition. the database is showing music information and sales (tune name, artist, sales, and year issued) there are a few processes i want to do but can not work out the coding.1. display the top ten selling tunes in a particular year in order ( the year needs to be selected from a list box and displayed in a list box)
2.display the total sales in a particular year ( year selected from a list box)3. display the tune with the greatest sales in a particular year ( year selected from a list box)
[Code]...
View 4 Replies
Oct 30, 2011
Public Class Form1
Private tb = New System.Windows.Forms.TextBox
Dim posx As Integer = 0
[code].....
View 6 Replies
Oct 7, 2010
I am trying to follow the book 'Sams teach yourself VB 2008'. It was going well until the end of hour 4. For exercise 1 I have created the form with a button and two text boxes, but cannot work out the code I need to move text between the two boxes. The Object Browser does not seem to help - am I reading it wrong?
View 14 Replies
Apr 7, 2010
I have to write an application that consists of mainly one main form, but several different things I wanna display. Pretty standard I guess. So there is a menu, some controls, and the main stuff below (ranging form graphs, tables, dropdown boxes, print preview, etc). I would like to use it like one would use frames in html, design an object that is limited to a box or panel that I define. The literature I have does not give me a clear idea of how to do this (yet). The most obvious seem to be the use of MDI, open a predefined form with no borders, maximize it before showing and remove all minimize/maximize options. But that does not work so well. The form inside the MDI parent does not fit the size that is given for it when it is loaded. e.g.
[CODE]:......................
So my main question is: Is MDI the way to go here at all or are there better/easyer ways to achieve this? If MDI is the way to go, how do I sucessfully restrict a child form inside another object, without giving the user any opportunity to resize (i noticed that I have minnimize/maximize/close buttons, even if I disable them on the child forms themselves)
View 6 Replies
Jan 5, 2012
I'm trying to rig up a ComboBox with a Datagrid dropdown in WPF. I need the the code to be done programmatically and contained in the codebehind. Here's what I've got so far:
[Code]....
This code produces a ComboBox that contains a DataGrid with two columns and seems to look fine. Although when you click on the ComboBox and select one of the rows in the DataGrid the selection in the ComboBox doesn't work properly. (It just shows the colum headers.) I want the value in the first column of the selected row to appear as the ComboBox selection.
View 1 Replies
Apr 18, 2009
is it possible to have a drop down menu from a button, somewhat similar to windows right click on a file, except, click/double click a button. if you do answer, can you provide a sample code, let's say, option1 (on the drop down menu) get's text to change to bold, option 2 to italic, and so on..
View 6 Replies
Apr 12, 2011
I am working on a program using VB.Net 2010 which will enable me to setup groups of files & folders for back up with syncing capabilities etc. I have a concept program which is based on some sample code I found out in one of the VB.Net forums. I have modified it from a command line based program to a form based program. At the moment I consider this code to be a "concept" program which once I have the various copy/sync routines developed and debugged will be integrated in to another program I wrote for
creating "Back Up" groups to automate the process. There are some 3rd party programs that do similar things that I want to do such as Microsofts Sync Toy, but none of them offer the grouping and exclusions options that I am going to program in to this backup/sync program.
So here is my problem, I have the included code taking two folders, a source and a destination, and copying everything from the source to the destination. It will skip over any unchanged files/folders and will delete anything found in the destination folder that is not found in the source folder and it will update all files in the destination folder that have a newer version in the source folder. In other words it will mirror image the source to the destination but will be smart enough not to copy unchanged items from the source to the destination thereby saving a lot of time. The sync part of the program is working fine, the displaying of the progress and results is not.
[Code]...
View 2 Replies
Oct 30, 2009
How to create the dropdown list that appears on right clicking on some component of a form in vb 08.
View 1 Replies
Jul 24, 2009
I have a datagridview which has a column formatted combobox type. Now I want to determine when I click to these comboboxs, My program will show a msgbox.
View 4 Replies
Jun 11, 2010
I like the dropdown/combobox of the latest Opera browser (10.53v). How can I implement something like that?
View 2 Replies
Jun 12, 2012
I need to create a sample question types web form in VB.NET which allow user to the following:he user selects the control type from dropdown (TextBox, RadioButton, ListBox etc). Generate controls dynamically based on the control type on the webform.It will always show the TextBox (where user writes the question) and (generated control - TextBox, RadioButton, ListBox etc) and save those values to the database.
View 3 Replies
Oct 26, 2009
I have seen it somewhere ages ago but cannot find the link... I want to create a custom drop-down "property page" like the one that pops out when you click on the down arrow in the property grid to set the anchoring.
View 5 Replies
Jan 8, 2010
I've created a custom user control that has several properties. One specifies which database I want the control to access. I want to be able to present the user of the control a drop down from which he can select which database the control will interact with. How do I get the dropdown to work? I can get default values, but have yet to figure out how to get the selectable list.
View 4 Replies
Jan 7, 2012
I am trying to create a dynamic string statement[code]...
View 7 Replies
Sep 3, 2009
I have a list of servers in the first dropdown. I want to get list of all databases in the second dropdown depending on the server selected in the first dropdown.
For this I need to query each server while selecting the server.
View 1 Replies
Jun 21, 2010
I'm just learning VB with the 2008 express edition.I'm trying to create a program that uses 3 list boxes.The first contains a list of products.After a search is preformed the second list box displays the products found.This is pretty simple, basic array stuff.My problem is moving items from the second list box into a third list box to purchase the product.I think I need to change the index numbers of the stuff I move into list box 3 because when I preform calculations with the stuff in list box 3, it seems to answer like its using the index numbers in list box1.So, how do you change the index numbers when you change list boxes?
View 3 Replies
Aug 6, 2010
I was wondering how to create my own minimize and maximize buttons. I would like a oddly shaped form, so my FormBorderStyle is set to None.
I still want the user to be able to minimize and maximize the form, and in vb6 it would have been like (I use commandbuttons on the form)[code]...
View 2 Replies
Mar 16, 2010
Here is my code, I cannot produce the output in the lstresults.Text box
Public Class Expense_Report
Const expenseDivide As Double = 50
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
[code]....
View 1 Replies
Jun 7, 2012
tell me why this code fails to programmatically create pictureboxes?
Imports System.Threading
Public Class Form1
[code]...
View 7 Replies
Mar 16, 2010
How can I create a socket created with programming
View 1 Replies
Mar 22, 2012
I know how to create textbox dynamically but the problem now is that I want it below my previous created textbox[code]...
View 2 Replies
May 3, 2012
First i am pretty new to coding and everything so yeah...I wish to make a distance and fuel calculator as my project. Included will be multiple combo boxes with different sets of information (The manufacturer of the vehicle, model of vehicle, the vehicles fuel use per 100Km, its transmission type, users choice of where they will depart from and arrive etc.) Is it possible to achieve this without using a lot of combo boxes? I've experimented using if statements for example:
if combobox1.selected item = "Holden" then
combobox2.visible = true (it's bad i know)
Then from this they would choose their model type in another combo box and then choose their transmission type etc..I don't want to use this because then it will mean i will have to do it for each and every combo box for each and every different set of data because making one 'visible = true' i will have to make the other 'visible = false' and this will cause problems when i start adding a lot onto it.
View 11 Replies
Jun 21, 2010
I have a form that needs to create textboxes based off the count of rows in my dataset table. The amount of rows could vary from 10 to 20, so I need a loop to add the textboxes to add the textboxes on load. Right now I have the loop down and other things shown below.[code]...
View 7 Replies