Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. techsmith

    Exporting SQL code to Excel

    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...
  2. techsmith

    DataGrid: Hiding scroll bars

    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...
  3. techsmith

    Trying to get hidden textbox from combobox

    You can probably get what you need using the ComboBox.KeyUp event or similar.
  4. techsmith

    How to remove the "sort arrow" from datagrid column heading?

    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.
  5. techsmith

    Setting cursor position in a richtextbox

    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...
  6. techsmith

    Setting cursor position in a richtextbox

    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...
  7. techsmith

    Automatically running

    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...
  8. techsmith

    Trying to get hidden textbox from combobox

    What are you actually trying to do? There may be a simpler solution than refering to this hidden control directly.
  9. techsmith

    How to remove the "sort arrow" from datagrid column heading?

    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...
  10. techsmith

    Setting cursor position in a richtextbox

    Oops - should have read TextBox1.Text.Insert...
  11. techsmith

    Setting cursor position in a richtextbox

    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.
  12. techsmith

    Setting cursor position in a richtextbox

    Try RichTextBox.SelectionStart = 0 You may also need to set SelectionLength to zero if you want to insert text rather than replace the selected text
  13. techsmith

    Tree View Question

    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)
  14. techsmith

    Tree View Question

    This approach should work... Dim node As New TreeNode(Str.Text) node.Tag = drData.item("Entry_Id") OpenNode.Nodes.Add(node)
  15. techsmith

    Counting datarows

    Try over_Comp.GetUpperBound(0)
  16. techsmith

    Process Kill

    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)...
  17. techsmith

    How to remove the "sort arrow" from datagrid column heading?

    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...
  18. techsmith

    Need to have User Input set ServerConnection object

    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...
  19. techsmith

    Granting access within your program

    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...
  20. techsmith

    Storing a users font preferences and reapplying them

    Have you looked at faq796-6320?

Part and Inventory Search

Back
Top