Combo Box As Read Only?
Nov 1, 20101) I would like to know how do define combo box as read only.
2) How do i cancel the focus on buttens while i press the arrows on the keyboard?
1) I would like to know how do define combo box as read only.
2) How do i cancel the focus on buttens while i press the arrows on the keyboard?
for starters not sure if this is the right place for the post considering that it includes MySQL and VB, its here.I'm trying to load data from one table into a combo box as the data you can select, this i have been able to do "tbl_Wind" using "WindDirID" and "WindDir"
also, I am trying to select (if it exists) a value from "tbl_date" "WindDirID" to select a value from the existing data in the combo box loaded from "tbl_wind"and finally, I want to be able to change the value in the "tbl_Date" depending on if a value is selected in the combo box.when a new record is created in tbl_date it uses default values, so there is always something in the field.below is about how far i got, and its the only part that works (extracted and edited of course to exclude the other queries)
[Code]...
I was following some code presented by another developer and for some reason the program is not reading the txt file that I created with the csv data.
Option Explicit On
Option Strict On
Imports System
Imports System.IO
[code]....
I have a text file to read. Each line of the file represents a CD with the title, the year, the artist name, the genre.My program should read the list of CDs and according to the genre selected in a combo box, it should output the list of CDs of the genre selected to a multi line text box.The stream reader is reading the strings properly but it only outputs the results if I use message boxes.How do I tell VB to display the "right" CDs all at the same time in a multiline textbox?
[code]...
I'm trying to learn how to write a data layer class to read in information and populate combo boxes, etc.
View 1 RepliesIs there a way to make a DataGridView's column a combo ONLY in the "new row", and a read only textbox in all other rows? I want the user to be able to make a selection from the combo box, and when the row is finished and the "new row" moves down one, I want the column to become a textbox containing the what the user selected. My grid will be bound to a table witch contains a "category" column, that is drawn from a seccond table that i want the combo box bound to.
View 1 Repliesi wanted to link options selected from Comb box A (general) to specific options in combo box B (specific). I want to pick a word in Combo box A that has specific words/phrases in Combo Box B show. But not all the words to show in the combo box B if they aren't associated with the Word picked in Combo Box A. Ex.When "Soda" is picked in A, only "Coke, Sprite, Fanta" should be visible in combo box b, not everything else.This is the code i used to make the boxes, but i don't know how to link them.
Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' fills the combo boxes with values
Me.xGeneralComboBox.Items.Add("Soda")
Me.xGeneralComboBox.Items.Add("Juice")
[code]....
How to use a databound combo box to display one field in the drop down, and another as the combo box text on roll up? Using VS 2005... For example, I have a datatable that has 2 fields. One called "ShortDesc" and one called "LongDesc". I want to be able to see the "LongDesc" column values in the drop down on the combo box. When I make a selection, I want the text in the combo box to read the corresponding "ShortDesc" value.
[Code]...
I am getting an error when i try to populate some combo boxes with a value, the combo box has values in and the right amount the code is getting the right number.
the error msg is "Object reference not set to an instance of an object."
Combo box 2 is filled based on a selection made in combo box 1 and a listview is populated based on the selection made in combo box 2.When the LostFocus event completes in combo box 1, it hits the LostFocus event in Combo Box 2 but it shouldn't. How do I prevent this from happening or if I can't prevent it, how do I work around it? The following is the code used.
Private Sub cboCategory_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboCategory.LostFocus
[code].....
I've got some code like the following. I want it so that when I chose an item in 'select 1' it changes the in the second combo box but I'm not sure of the best way to go about it. Does it have to be AJax or can it be done with just Javascript?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[code].....
is there a way to set a single cell as a combo box? it looks to me that you can only set the whole column.
View 5 Replieshow do i program by saying if a certain item is selected in a combo box then that item will not appear in a second combo box. i have this code for now but it does not work
[Code]...
I know how to add the items during design time but how do you add the items through code. I want to fill the combo box in the datagrid with the results of an SQL query?
View 3 RepliesOk so I have a combo box that lists a set of names. What I want to do is match a selected name to a text file and read from it. The text file contains the same name and has grades listed below:
ex.
Johnny Bravo
30
10
I have a form with 8 combo boxes and would like to disble certain combo boxes, depending on what was selected in another combo box. The reason is so the user will not have a blank return on a query. The first form I created like this worked great, no issues. This form only allows one combo box (Number_of_Lightheads) to disable any others. Below is the code I have for this Form. why the other combo boxes will not disable the ones that are called out in the code?
Option Compare Database
Private Sub High_Def_AfterUpdate()
If Me.High_Def = Yes Then
[Code]....
how do i program by saying if a certain item is selected in a combo box then that item will not appear in a second combo box i have this code for now but it does not work
j = 0
Do While j < cmbSession.Items.Count
If (j <> lesson) Then
[code].....
There are already multiple threads about this, but i don't have the knowledge about the different SQL databases/methods to make heads or tales from it.I am using an OleDbDataCommand, an OleDbDataReader and the following code
Dim Query2 As OleDb.OleDbCommand
Dim RetVal2 As OleDb.OleDbDataReader
Query2 = New OleDb.OleDbCommand("Select [section], [title], [id] From " & DtSections & " Where [volume] = " & volu & " And [chapter] = " & chapter & "", AccessConn)
[code]....
value)In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user. Type) Object?
I know how to read user input using textbox but it only can read character and numbers. Is it possible that I want to read user input equation?
Example:
User type A+B
User put range of A and B.
1.25<A< 3.56
2.45<B< 9.87
I failed to read the equation using textbox. Is it there are other ways that can use to read equation input A+B?I am using VS2005 and VB.Net. I really new in this programming using VB.Net.
I;m attempting to write code to read several NMEA ports and format the data for archive. When I execute the following code:
Using Commportno As IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort(portName:=port)
Dim Incoming As String = Commportno.ReadLine()
I have created a program that saves the co-ordinates of the users mouse and saves it to a text file to be used as an auto clicker.
View 2 RepliesI'm using vb.net 1.1 to develop the program. I got text files that contain test result from a machine, like below.
T1 1.24535 2.56335 2.43253 1.24538 2.55619 4.35243
T2 1.42542 1.63728 3.57295 4.59275 1.57320 2.72057
T3 5.12857 2.45375 6.38593 2.58375 3.57259 3.57204
I need to check the test result with the data from database, to find out which test result is failed. If there is a fail test result, I will show an alert to the operator and stop the checking process. Until the operator close the alert, then the checking process will continue from the last read point.
I have two combo boxes and I am currently using MicroSoft SQL Server to get the instance name into one combo and the databases on that instance into the other combo. I am wanting to switch to System.Data to get these values and I am able to get the instance through enumeration but am having trouble finding where to get the database name values assigned to that instance.Does anyone know the equivalent of SMO Server.databasename is in System.Data?
View 5 RepliesI have a number of word documents I am converting. Everything is going great until I get a file that is read only. In this case I get a Save As prompt.
Is there any way to open the file in read/write format? I should have admin privileges so access isn't an issue.
I'm using VB.net to open the files. More specifically
doc = word.Documents.Open(path, Type.Missing, False, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing)
ok i have image that i bind info in it and i want to read the info now from file (FileStream) its workbut i want to do it not from file so i need to use MemoryStreamhere the example that work and how i do it now how i make it work with MemoryStream (with byte = My.Resources or PictureBox1.image)
Using FS As New IO.FileStream(image, IO.FileMode.Open)
FS.Seek(0, IO.SeekOrigin.End)
While Not FS.ReadByte = Asc("|")
[code].....
I want to read data (read only) from excel files
I use this connection string
Con_BarCode = New ADODB.Connection
With Con_BarCode
.ConnectionString = "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm,
[Code].....
I'm trying to make a program that can read .mp3 data (Such as Artist, Album, Year, Track number, etc), but I need to be able to do two things that I have no clue how to do:
1. Read starting from a specified string (E.G, On one line it states: [code]
2. Read until a specified string (E.G, On the previously stated line,I need to read starting from what I said, up until.
Not sure if anyone has done this, but i'm making a game app and want to read a URL and store the info to read. The link outputs XML data, [url]...
Yes it is EVE If anyone could point me in the right direction to store the xml in vs2008 so i can start playing with it that would be awesome.
I am trying to Read BMP that not Have the Header of BMP and Trying to Read it with BMP Constructor, File is used for interface in a game, File structure is:The File structure is like this (Offset in decimal): [code]
View 16 RepliesI have a fairly simple XML file that I just want to read the data from.
It has 3 levels, root, main section and items. There are no attributes. I want to go to the first main section by name, then read in all the items. The items all are named the same. I've seen this done before, so it should be ok. No writing will be done. Basically this is a static data file
File looks similar to the following:
CODE: