Home All Groups Group Topic Archive Search About

New to Vb, listbox & DataGrid help

Author
8 Mar 2009 3:17 PM
jcoon
All,

I'm new to VB 2008, I'm trying to load data into two colunms of a list box
or datagrid. I'm not sure how to get my data into the second colunms of the
list box and If I can post this type of data into a data grid view.  any
suggestions are welome.  also, can headers be added to a list box?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim elevDsection As Double

elevDsection = 150

Dim strFormat As String

strFormat = "#0.00"

Dim slope As Double

Dim samplestartdist As Double

Dim sampledist As Double

Dim rwoffset As Double

Dim offsetelevdist As Double

Dim offsetelev As Double

slope = 1 / 34

offsetelevdist = 100

offsetelev = (slope * offsetelevdist) + elevDsection

samplestartdist = 0

sampledist = 500 + offsetelevdist

rwoffset = 0

rwoffset = rwoffset

Me.ListBox1.FormattingEnabled = True

Me.ListBox1.HorizontalScrollbar = False

Do While sampledist > 0

ListBox1.Items.Add(rwoffset)

rwoffset = rwoffset + offsetelevdist

sampledist = sampledist - offsetelevdist

offsetelev = (slope * rwoffset) + elevDsection

Loop

end sub

Author
8 Mar 2009 3:43 PM
Abhishek
open mscoree.dll file in notepad and append 8-bytes to it.
Author
8 Mar 2009 6:16 PM
Mike Williams
"jcoon" <jcoo***@comcast.net> wrote in message
news:ODwa0DAoJHA.5420@TK2MSFTNGP04.phx.gbl...

> All, I'm new to VB 2008, I'm trying to load data . . .

You're in the wrong newsgroup. This is a Visual Basic group and VB 2008 is
not Visual Basic, despite its deliberately misleading marketing name. Visual
Basic code will not work in VB 2008, and VB 2008 code will not work in
Visual Basic. Try posting your question to a VB.Net group, such as:

    microsoft.public.fotnet.languages.vb

Mike