CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: FrankZA

Search: Search took 0.02 seconds.

  1. Re: [RESOLVED] Passing ArrayLists between subroutines

    In this example it was my aim to get only the second element in the ArrayList AL: the ArrayList of Structs.Point objects. I cannot think of a neater way of extracting an ArrayList out of another...
  2. Re: Passing ArrayLists between subroutines

    I managed to get it to work. All it takes is the liberal application of DirectCast.


    Sub Tester(ByRef AL As ArrayList)

    Dim a As New ArrayList
    a = DirectCast(AL(1), ArrayList)...
  3. Re: Passing ArrayLists between subroutines

    I have been able to set a new ArrayList equal to one of the ArrayLists that form part of another ArrayList.


    Dim a As New ArrayList
    a = DirectCast(AL(2), ArrayList)

    However, I still get a...
  4. [RESOLVED] Passing ArrayLists between subroutines

    I am new to the use of ArrayLists and am trying to convert an algorithm to use them in order to save memory. However, I am struggling to achieve error-free code while using "Strict On".

    Here is a...
  5. Replies
    6
    Views
    1,152

    Re: exiting the form

    If you want the window to close when you click on it create a subroutine such as this:



    Sub FormCloser(sender As Object, e As EventArgs) Handles Me.Click
    me.Close
    End Sub
  6. Replies
    7
    Views
    9,859

    Re: Detecting hanging thread and abort it

    Ah ha! I have managed to find a way to do what I need using the Thread.Join method. Below is the code:


    Option Explicit On
    Option Strict On

    Imports System.Threading

    Public Partial Class...
  7. Replies
    7
    Views
    9,859

    Re: Detecting hanging thread and abort it

    Sorry, I'm not sure what you mean. I assume that when the time (2000ms) is up it triggers the ThreadTimer.Tick event. When this happens an if-statement checks whether or not the thread is still...
  8. Replies
    7
    Views
    9,859

    Re: Detecting hanging thread and abort it

    Here is the VB.NET project that performs this test.
  9. Replies
    7
    Views
    9,859

    Re: Detecting hanging thread and abort it

    I tried the following code, but it does not abort the thread when it should. Any ideas why?

    I created a simple form in SharpDevelop with a button and added this code:



    Option Explicit On...
  10. Replies
    7
    Views
    9,859

    Re: Detecting hanging thread and abort it

    Thanks Gremlin, I appreciate the help. Will try it.
  11. Replies
    7
    Views
    9,859

    Detecting hanging thread and abort it

    I am working on a project where I make use of the lp_solve 5.5.0.13 DLL to solve many integer programming (IP) problems in succession. I set the timeout to 1s in order to speed up the calculations. ...
  12. Replies
    7
    Views
    1,280

    Re: [RESOLVED] Picture boxes and threading

    The following happens. When I initiate the program, Form1 opens with a whole bunch of text boxes for input. When I press a button, these inputs are used to create data. If a valid data set is...
  13. Replies
    7
    Views
    1,280

    Re: Picture boxes and threading

    Cool, will do so. Could you help me though with the problem of making the windows independent of each other (other than the info sent to Form2), so that if I close one, the other stays open. For...
  14. Replies
    7
    Views
    1,280

    Re: Picture boxes and threading

    Thanks Boet

    That works perfectly!
  15. Replies
    7
    Views
    1,280

    [RESOLVED] Picture boxes and threading

    I am designing a program that is supposed to find test examples for a problem according to certain rules. I have a small form with some text boxes for rule input. When a button is pressed this...
  16. Replies
    5
    Views
    827

    Re: Change label on form from thread

    Thanks zd, I would appreciate that a lot!
  17. Replies
    5
    Views
    827

    Re: Change label on form from thread

    Would something like this work in VB? I have no experience in other languages, but I would guess that was some form of C.
  18. Replies
    5
    Views
    827

    Change label on form from thread

    Hi

    I am busy writing a program that is supposed to evaluate some algorithms (by time or result). When the program loads, a form appears. Once some selections in comboboxes have been made, the...
Results 1 to 18 of 18





Click Here to Expand Forum to Full Width

Featured