|
i have use this coding ,but not display data in datagridview, plz help me
str = "SELECT * FROM Account"
cmd = New OleDbCommand(str, cn)
ad = New OleDbDataAdapter(str, cn)
ds = New DataSet
ad.Fill(ds, "Account")
Me.DataGridView1.DataSource = ds.Tables("Account").DefaultView
|
|
|
|
|
hi
take a look at this
http://msdn2.microsoft.com/en-us/fbk67b6z(VS.90).aspx[^]
Hope it will help
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I am using vb.net.I want to add system colors with color name in combo box.I can add system color name in combo box .The code is given below
****************
Private Sub btGet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btGet.Click
Dim color As Color
Dim i As Integer
For Each color In System.ComponentModel.TypeDescriptor.GetConverter(GetType(Color)).GetStandardValues()
i += 1
ComboBox1.Items.Add(color.ToKnownColor)
Next
Label1.Text = "Total Color Count: " & i
ComboBox1.SelectedIndex = 0
Me.BackColor = color.FromKnownColor(ComboBox1.SelectedItem)
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Try
Me.BackColor = Color.FromKnownColor(ComboBox1.SelectedItem)
Catch ex As Exception
Application.Exit()
End Try
End Sub
****************
I want to add color also.How can i do this .If anyone know the code pls help me.
|
|
|
|
|
Hi ,
I'm trying to add the text in textbox into a datagrid. But i failed to add it into datagrid.
After i click 'Add' button, nothing appear in the datagrid.
Can anyone guide me to solve the problem? Thanks in advanced.
Here is my codes:
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click
Try
Dim dgBarCode As New DataGridTableStyle
Dim HBarCode As New DataGridTextBoxColumn
HBarCode.MappingName = Me.txtHBarCode.Text
HBarCode.HeaderText = "HBarCode"
HBarCode.Width = 50
dgBarCode.GridColumnStyles.Add(HBarCode)
Dim EMIBarCode As New DataGridTextBoxColumn
EMIBarCode.MappingName = Me.txtEMIBarCode.Text
EMIBarCode.HeaderText = "EMIBarCode"
EMIBarCode.Width = 50
dgBarCode.GridColumnStyles.Add(EMIBarCode)
Me.dgResult.TableStyles.Add(dgBarCode)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Thanks, Eunice
|
|
|
|
|
Good Morning Eunice
You see, you cannot be a good Developer if you dont try to do something yourself , before you aks someone else. Its been hours since you posted this qestion and no one answers you. its not because we dont know, its because the answer to that is very simple, and it need only Googling or a Book. before you post a question in a Forum you must first make a research and try to find answers yourself. here is what i googled and what you should have done 8 hours ago.
http://www.google.co.za/search?hl=en&q=How+to+Add+Text+in+textbox+into+datagrid+in+vb.net&meta=[^]
Hope this helps
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi Vuyiswa,
thanks for the advice. Actually i did research as well. But maybe not enough. . I should have worked harder. Anyway, thanks for the link. It does help me.
regards,
eunice
|
|
|
|
|
hi, I'm doing a thesis right now and my thesis will require a electronic lock. But I'm thinking what port should I use to control my e-lock and which port is the easiest to program in VB6.
Can anyone please help me with this problem.
I will appreciate your help a lot.
Thanks.
|
|
|
|
|
Wow - why are you using VB6 ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
My thesis has two hardware in it and the other hardware is a Finger Print scanner and I I've programmed it in VB6 and its working fine now. My thesis is kinda like a security system and I really need to know how to control my electronic lock in VB6 so that both of my devices will work properly.
Can you help me with this problem???
thanks.
|
|
|
|
|
If you only need a few digital input/output lines, the easiest is using the control lines
of either a serial port or a parallel port. USB itself is complex, but if you have a USB-to-
serial cable with its driver, it would behave like a regular serial port.
I would go for .NET 2.0, C# (or VB.NET) and the SerialPort class.
|
|
|
|
|
Your right, I just really need a few I/O lines, Its just like switching on and off the light. Can give any tutorial sites, sample code or tips about my problem? And other thing is that I really need to use VB6 language for this thesis.
Thanks for your reply I really appreciate it.
|
|
|
|
|
It's a (long) while back but I think there used to be a ActiveX/OCX gadget for serial I/O.
The parallel port is a pain ( I think you can only write a device driver to access it).
IMHO a project like this (exotic hardware) should still be done in VC++ where you have the whole WinAPI at your fingertips (ever had to write some .net 1.1 wrappers for the serial port ?) and most 3rd party SDKs for their hardeware are still in C/C++.
|
|
|
|
|
Hi, I don't know how to control the control lines of a serial port without the help of
the .NET SerialPort class, but I am confident there are some articles on this site that
could help you; otherwise Google knows it all.
|
|
|
|
|
hi again. I've been thinking if you could help me to control the parallel port in VB .Net. I've already change the language that I'm going to use in my program and I used the VB .Net 2008.
I'm really glad if you can help.
Thanks.
|
|
|
|
|
meki_2118 wrote: VB .Net
much better than VB6
meki_2118 wrote: control the parallel port
The SERIAL port has a couple of control lines, which can easily be written/read
using the SerialPort class. There is no .NET support for parallel ports, and I
have no experience whatsoever with parallel port (my PC does not have one either).
|
|
|
|
|
Do I still need to download the inpout32.dll to make the Serial Port work? Because I've read that you should first to install that to make the parallel port work. Is it also the same in the serial port? I would really like to control my electronic lock within two weeks because I'm getting close to the deadline of my thesis and its only 50% finished. Can help me how to control the serial port. I will really appreciate your help.
Thanks.
Happy Holidays!
|
|
|
|
|
meki_2118 wrote: Do I still need to download the inpout32.dll to make the Serial Port work?
No. To use the .NET classes you need the .NET Framework, nothing else.
meki_2118 wrote: my thesis and its only 50% finished
Time to move ahead then. This thread is 9 days old, what serial port experiments have
you performed since? Is your hardware ready? Did you check the number of lines you
need, the voltage levels, the currents?
|
|
|
|
|
Luc Pattyn wrote: Time to move ahead then. This thread is 9 days old, what serial port experiments have
you performed since? Is your hardware ready? Did you check the number of lines you
need, the voltage levels, the currents?
This is the first time for me to program a hardware and it's also the first time for me to use the PC's port for programming. I'm really a newbie about this hardware programming. My hardware is still not ready because I'm planning to experiment it first with a LED light. I've heard that accessing the PC ports are dangerous and there's a risk burning your M.Board and I really don't want to happen that right now. And about the "number of line" your talking about I'm really clueless about that. I think I must first study how the serial port work. Am I right?
Thanks again for your help.
|
|
|
|
|
meki_2118 wrote: I must first study how the serial port work. Am I right?
yes.
whatever it is you will be using, you must study it.
meki_2118 wrote: the "number of line" your talking about I'm really clueless
each serial port offers a few output lines and a few input lines.
you must determine how many you need for your target hardware; if the port has fewer,
it won't help you.
meki_2118 wrote: I'm planning to experiment it first with a LED light
That is good. An LED will take some 10 mA and it sure needs a series resistor (say 1K).
When it works, it shows your software is probably OK. But that might be the smaller
part of the job.
Before you implement something, you should:
1. study the technologies you are considering;
2. make a design.
In your case: check number of lines, voltage levels, current requirements.
Example: if your door lock needs 1 Amp to operate, the serial or parallel port will not
be capable of supplying that, hence you would then need a power supply, a relay, and
probably a transistor to control the relay. (A relay probably will need more than a
few volts, and being inductive, I would not connect it to a PC directly).
|
|
|
|
|
hi. I've already studied how the serial port work and I already looked at the device I going to use. I think that I'm going to use two lines of the serial port. And my device will work like an florescent light, it is powered by a 220 volts. And the logic here is that my pc will only command the lock to turn on and off. But I don't know what pin to use and will I be still needing a transformer to change the voltage that will run through my pc?
Happy New Year
|
|
|
|
|
Hi,
IIRC the pins DTR and RTS are output pins on the PC's serial port. They are controlled
by the properties SerialPort.DtrEnable and SerialPort.RtsEnable.
RS232C pins carry a DC voltage, anywhere in the range (-15V,+15V). They are capable
of sourcing/sinking some 10 mA and not suited for larger currents, larger voltages, or
direct connection to devices that are powered by the AC mains.
If your door lock is powered by 220V AC mains directly, you will need galvanic isolation
(you can't connect mains to your PC!); it also will need more than 10mA so you need
some switching device, either a transistor/thyristor/triac or a relay, and probably
both. It somewhat depends on the specs of the lock (see documentation!), and the distance
between PC and lock.
[ADDED] Instead of a transistor you could use an opto-coupler, which together with a
relay would be able to control almost anything; the transmitter side of the opto-coupler
would very much ressemble an LED, making your initial LED experiment much more
relevant.[/ADDED]
modified on Friday, January 04, 2008 7:40:49 AM
|
|
|
|
|
i want to create an application server-cliente i found this page
http://elguille.info/colabora/puntoNET/PabloTilli_SocketsVBNET.htm
this article say i have to create two .dll file`s and then a file to run the application, could you help me or do you know a page where i can see a example, thank`s.
|
|
|
|
|
Hello,
It is possible to get access with different user to one Access mdb file without SQL Server.
I have a small application (5 user) and I need access in a small network to one mdb file .
Is that posible ?
If yes, how can I do this without to get troubles or data crash.
I use VB Studio 2005.
Thanks in advance
BR
Stephan
|
|
|
|
|
You could use an Access database to do this, though Access was not designed for a multiuser environment. You WILL have to do maintenance on the database and Compact and Repair it every now and again. You WILL eventually have problems with the database.
If you want less problems and more flexibility, go with an SQL Server version, such Sql Server Express (free!).
Since Access is a file-based database, every user will have to have access rights to the file share and folder on the server where the database will be stored. I hope you know what you're doing when it comes to Windows Networking. If you don't, then you better learn before you start this project. You WILL need to know this stuff.
|
|
|
|
|
Hello,
I have a function ConnectTo in a class clsMakeConnection.
My code is:
Dim MyCon as new clsMakeConnection()
MyCon.ConnectTo(...)
I would like to get a list of the possible connections.
I mean the list that you get when for example you write:
Dim c as color=
and then you get a list of all the colors as following
Color.AliceBlue
Color.Blue
Color.White
...
Is it possible to do that?
Thank you
Shay Noy
|
|
|
|