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)
I have a similar problem and haven't got to the bottom of it yet, but here are a few ways to close an application - don't know pros and cons of these - maybe someone else can shed some light on differences and when to use each one:
1.Process.Kill()
2.Environment.Exit(0)...
If you use a DataView as the Grid DataSource you can set the DataView.Sort property to an empty string, which clears the current sort order.
Alternatively, you could look at ways to circumvent the DataGrid sort behaviour and manage it yourself, i.e. pick up the Click event, determine when a...
If you are asking how to retain the server name that the user last selected, then you need some sort of 'user preference' type solution such as holding the setting against a user record in a database or holding user preferences in an xml file in the "C:\Documents and...
You should be able to do this with 3 tables: users, roles and user_roles.
Alternatively, you could also add a roles attribute to a users table and hold a delimited list of roles against each user record.
Either of these approaches will get you a list of roles that each user is in, which you...
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.