Search results for query: *

  1. S

    Getting Treeview node text from a seperate thread

    Hello. So your solution worked perfectly, thank you very much for explaining in detail.
  2. S

    Getting Treeview node text from a seperate thread

    Thank you for the info. As you suggested I gathered the data before passing to the new thread and it worked great. After processing the data, instead of trying to add the nodes from the secondary thread I passed it back to the UI thread when I set a public property, which worked fine, however...
  3. S

    Getting Treeview node text from a seperate thread

    Hello, I've been trying the following code to get the text from each node in a treeview on form1 (ui thread) from a separate thread in a different class. The msgbox always shows nothing. If someone has a link or an idea on how to go about this, much appreciated. Public Class something...
  4. S

    editing a config text file with checkboxes

    Well in form_load you could do... Dim lines() As String = System.IO.File.ReadAllLines("C:\test.txt") Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load If lines(0).StartsWith("selected") Then ModActions.Checked = True...
  5. S

    editing a config text file with checkboxes

    is ModActions supposed to be the checkbox? changed... Public Class Form1 Dim Lines() As String = System.IO.File.ReadAllLines("C:\test.txt") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click If ModActions.Checked = True...
  6. S

    GIF Animation As Icon On VB Form

    Hi there, I wanted to do this a while back, put a ComboBox in the title bar, and the only way I could get it to work is set the FormBorderStyle to None and draw the border onto the form. You can place a PictureBox over the icon location. Would need to make your own ControlBox buttons though.
  7. S

    Add several .jpg's from file to image array

    You got it :) Have fun.
  8. S

    Add several .jpg's from file to image array

    Add the image to a List Dim PictureArray As New List(Of Image) For Each item As String In Directory.GetFiles("C:\Users\Home\Desktop", "*.jpg", IO.SearchOption.AllDirectories) Dim _Image As Image = Image.FromFile(item) PictureArray.Add(_Image)...
  9. S

    Add several .jpg's from file to image array

    Hmm... Well if you wanted to add it right to the form you would use the PictureBox.Location property, but that isn't easy to set in a For...Next loop. Easiest to use a FlowLayoutPanel because it lays them out neatly in order and you can set a scroll bar if you have to many images. Say you...
  10. S

    Add several .jpg's from file to image array

    'Add images to List(Of T) from a file as string Dim PictureArray As New List(Of Image) For Each item As String In Directory.GetFiles("C:\Users\Home\Desktop", "*.jpg", IO.SearchOption.AllDirectories) Dim _Image As Image = Image.FromFile(item)...
  11. S

    AddressOf, Delegate and upgrade code from VB6

    Here is a bit of quick reading... AddressOf Operator Result = voRegisterMrzCallback(AddressOf MRZCallback, 0) CallbackFunction parameter is declared as Long so its expecting a number not a delegate. if MRZCallback returns or equals a number you can just do... Result =...
  12. S

    vs2010 error when ending program

    Can you show some code about what you are doing before closing the form? Try wrapping that code in a Try...End Try and catch the exception in a MsgBox.
  13. S

    Tip 2 Simple subs for moving items in a ListBox

    If there is an easier way, please share. Sub MoveItemUp() intStartIndex = ListBox1.SelectedIndex intFinishIndex = intStartIndex - 1 Try ListBox1.Items.Insert(intFinishIndex, ListBox1.SelectedItem) ListBox1.Items.RemoveAt(intStartIndex + 1)...
  14. S

    Recursively copy folders

    Here try this way... Imports System.IO Public Class Form1 Dim array As New ArrayList Dim strFromFolder As String Dim strToFolder As String Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click 'Set Source Folder Dim...
  15. S

    Add text in recursively copy

    Agreed, I tried the .Update and it worked way better. Thank you, I didn't know you could force it to update. Changed... For Each item As String In array Label1.Text = item Label1.Update() ListBox1.Items.Add(item) ListBox1.Update()...
  16. S

    Creating and changing a Panel object at run time

    Actually this forum has been a huge learning tool for me. I've never taken any formal classes but I plan to in the future. I pretty much just learn by doing, if I think of something that seems cool or a challenge I'll do my best to learn by examples and tutorials. Also you can find a lot of...
  17. S

    Add text in recursively copy

    I noticed that too about recursively getting files but just to be sure I added a delay after each file processed to see if its passed to a listbox and a label. turns out they were being passed, only too quickly for me to notice. Im just gunna paste what I did as an example. Hope it helps...
  18. S

    Creating and changing a Panel object at run time

    Hi there, Unfortunately I'm in the learning stages of custom events, handlers, and arguments myself. You've reach the extent of my knowledge on the subject. One of the mods, jmcilhinney, has a great blog about creating custom events that is worth a look... John McIlhinney's .NET Developer...
  19. S

    Refresh DataSet

    Clear your dataset and then refill it with the new data eg... cn = New OleDbConnection("Provider=M...") Dim ds As DataSet = Me.DataSet1 ds.Tables("Table").Rows.Clear() da = New OleDbDataAdapter("SELECT * FROM Table", cn) da.Fill(ds, "Table") Have fun
  20. S

    Creating and changing a Panel object at run time

    Public Class Form1 Dim _Panel As New Panel Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load Me.Controls.Add(_Panel) End Sub Private Sub CheckBox1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles...
Back
Top