There is a much faster way to get data into an Excel file using the Excel range and an array.
You can build an array easily from a datatable Dim _r As Integer = _tbl.Rows.Count
Dim _c As Integer = _tbl.Columns.Count
Dim _arr(_r, _c) As String
'add header
For i As Integer = 0 To _c - 1...
Not sure why you would want to do it, but try this:
For Each c As Control In MyBase.Controls
If c.GetType() Is GetType(VScrollBar) Or c.GetType() Is GetType(HScrollBar) Then
c.Visible = False
End If
Next c
This assumes that you are extending the DataGrid as an inherited control...
Try searching for Threads about DataGridViewCheckBoxColumn and DataGridViewButtonColumn. I'm sure this has come up before, but it's not something I'm familiar with.
Glad to be of help with the first bit.
OK, I decided to completely re-read everything you've posted - realised that you just want to dump an array into a textbox - adapted your Sub Private Sub PrintArray()
Dim str As String = ""
Dim r, c
Dim character As Char
For r = 0 To 23
For c = 0 To 79
str += vt100(r, c)
Next...
If you try Textbox1.text.insert(1,"foobar") when text = "" then you will get an out of range error as there is no chr in position 1.
The StartIndex is zero-based, so to insert text at the start use Insert(0,"foobar")
I think you are getting confused with the height and width properties. The...
Do you know where to find the .exe that your project has created?
This is saved as ...ProjectFolder\bin\Project.exe
For example if my projectfolder is C:\myCalculator\
The executable file will be C:\myCalculator\bin\myCalculator.exe
You should be able to add a shortcut to this file to your...
You could set the datasource to a dataview and set the .Table property to your DataTable
dim myDataView as New DataView
myDataView.Table = myTable
myDataView.Sort = ""
myDataGrid.DataSource = myDataView
myDataGrid.Refresh
Personally, I would put this in place as a quick fix and then work on a...
I think I see where you are going wrong.
If you want to insert text ie. data(i) in a certain position in the text use TextBox1.Insert(StartIndex, Value)
The Selection... properties are more for the GUI so that the next keyed or pasted text will replace the selection.
Glad to help - this is a pattern that you will use a lot when working with collections: dim obj as new Object
'set some properties for obj
Objects.Add(obj)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.