Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

SLDWorks

@SLDWorks
About
Posts
4
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Question on threading
    S SLDWorks

    This site has been so helpful in the past for me over 8 years. I am self taught .net, and have used it primarily with SolidWorks API since 2003. Thread for me is simply threads, and delegates. I run threads in order to crunch data. It keep the main form thread alive while crunching the info. Many times the threads have to send stuff back to the main threaded form. In order to do this without cross thread violations, we need to use delegates. My technique for sending info into a thread, and having the thread call back is rather simple. If I need to create lets say 100 threads. I will use a thread in order to do that. The thread that creates the 100 threads will sleep, only to awake and see if all threads have died. When all threads have died, the main thread cruches and then dies. The main form thread never stalls out, and gets tickled from all sides by all threads from a delegates sub. Here is the code I wrote to explain the most on these topics. Things to note are as follows: Each thread can create its node without limitations. The main thread relys on all threads being done creation. Then the assumtion is made that all thread nodes exist. This can only be true because all threads are not alive. So the main thread changes the display name of each treenode, and then dies itself. The threads and delegates take object arrays, so you can pack them full of anything, both in and out of the thread. The form is very much alive through the whole process. If only a form could speak, because this one is far from a deep sleep. Cheers, Sean P (Sldprt[ItsAboutTime])

    Imports System.Threading

    Public Class Form1

    Dim t1 As Thread
    Dim t2 As Thread()
    Dim c As Collection
    
    Dim treeview As TreeView
    
    Private Sub Form1\_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
    
        tMain()
    
    
    End Sub
    
    Sub tMain()
    
        c = New Collection
    
        treeview = New TreeView
        Me.Controls.Add(treeview)
        treeview.Size = New Size(200, 400)
        treeview.Location = New Point(10, 6)
        treeview.Visible = True
    
        c.Add(100, "StartData")
    
        t1 = New Thread(AddressOf MainThreading)
    
        t1.Start(New Object() {c})
    
    End Sub
    
    Sub MainThreading(ByVal args As Object)
    
        With CType(args(0), Collection)
    
            ReDim t2(.Item("StartData"))
    
            Dim i As Integer
    
            For i = 0 To UBound(t2)
    
                .Add(i, "ThreadKey" & i)
    
    Visual Basic question data-structures json help tutorial

  • .NET 4 Rocks!
    S SLDWorks

    You can fit C Sharp in most holes. But C++ is a picket fence you don’t have to walk around. Mind you getting on your hands and knees to crawl through the fence is a lot grunt work for the result. So when the need is to be quick, and gain huge results fast. The preference would be to whittle your way through the hole, with something sharp. If you don’t understand what I’m talking about, or coming from. Take a look at Visual Basic. It’s still pointy.

    Dont turn around, cause your...

    The Lounge csharp css performance lounge

  • Lego Mindstorms Nxt or is there something cheaper and better?
    S SLDWorks

    Not sure if anyone mentioned this site. I would start off by saying the Robots range in difficulty. So there is a lot of room to grow. This site is not just for kids, The complexity of robots you can make from this site is endless. I think a starting robot that you put together, and it will follow a flashlight costs around $20. http://www.robotshop.ca/robots.html For anyone else interested. Check out Phidgets website also. http://www.phidgets.com/ Cheers, Sean Phillips SolidWorks API Developer .Net, VB.Net, C#, Mobile, DirectX, XNA, SolidWorks, SolidWorks Add-ins

    Dont turn around, cause your...

    The Lounge com question

  • If only you could debug a woman...
    S SLDWorks

    Why not just install a new beta women every week. who cares about the problems. just install another one when you are done.

    Dont turn around, cause your...

    The Lounge com debugging help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups