It wasn't just the boolean it was any module public variable having a value set to it by one of the forms.
Is there any other object other than excel that I could test this with to see if it's...
Type: Posts; User: iamcpc
It wasn't just the boolean it was any module public variable having a value set to it by one of the forms.
Is there any other object other than excel that I could test this with to see if it's...
Public Sub noexcel(ByVal column As Integer)
Debug.Print("before visible " & column.ToString)
If teststring = "0" Then
Debug.Print("thread changed site1:" & column)...
I feel like it can't be just excel. If it was just excel the removing the changes to the global variable on form1 wouldn't change how the threads operate. It would have to be excel + global variable...
I will look into this now! Thanks for the ideas!
The webpage HTML included an object and the object created in the website's HTML runs a macro which logs into the server created by the object. The macro happens after the document completed event....
I will read that book!
I tried it with a string variable in addition to a boolean and had the same problem. It looks like altering a public variable declared on a module from a form affects how...
It's not the efent handler. It's the global variable
DOES NOT WORK:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
...
well what i see happening is that if i'm moving up and i collide my position moves down.
The problem is that i'm still moving up so i collide again. so i'm colliding over and over and over again....
I would start by labeling your pictureboxes on your form so you can possibly identify which picturebox collisions are messing you up when you move pac man around.
So how would I handle this:
I navigate to a website, the document is completed, but the macros are not completed? The document completed event says DOCUMENT COMPLETED! But there is no macro...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim navthread1 As New System.Threading.Thread(AddressOf Module1.navigate)
...
I'm marking this thread resolved because I stuck with it and figured out that a public variable was the ultimate find. I'm so glad it was not that one application was "lucky" and one was not! Thank...
Even with a lock each thread was stopping at each if statement when i had set my global variable
Each thread hit this and stopped untill every thread had hit this, so each thread is saying excel...
Can the passing of variables between forms1 and modules lock?
LIke when I
Public loaded As Boolean in module 1 and then make loaded = false in form1?
The point was to better understand multithreading problems. To understand why threads were not running and completing when I testthread.start()
I even tested this with navingating the...
The problem is with a global variable loaded and the form1.webbrowser1 document completed event setting that variable to true if the page is loaded and to false if the webbrowser is navigating read...
I FIGURED IT OUT!!! OMG BEST ADVICE EVER.
OK the non sleep() sub there is a form1.webbrowser1 document completed event handler setting a global boolean variable in module 1 loaded to true if the...
This actually made me laugh. I've come here to find out why the exact code behaves differently in program A than it does in program B and the answer i've been given is because program A is lucky? Why...
I made some changes to this just to see how it would effect it.
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Dim...
We are talking about two apps running on the same computer with the same OS, same everything.
I agree that there must be something in one app that's not in the other. I've uploaded the...
you could have the source code be a string and then split the string as needed or use left() or mid() functions to shave characters off of the string
Public Sub testthis(ByVal thread As String)
MsgBox(thread.ToString)
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
I've stumped everyone! lol
This forum post is not about controlling the order of execution of my threads. It's about understanding why sleep() works fine with the same code, same computer, different application then on this...
I have posted the code in which spreadsheet columns are filled simultaneously without crashing the spreadsheet program on this thread.
If that is true then why is it, using the code posted on...
how can I do multiple things at the simeltaneously (like filling in columns on a spreadsheet) if i'm not using multiple threads? If the order of execution of threads can't be determined then how come...
When I move the breakpoint after making xl.visible I can see that the excel workbook is being made visible before the button click event ends.
I added a debug.print of the column variable which...
The If xl.visible <> True breakpoint is hitting first.
I'm not locking objects on either application. On the application where sleep() is not working on form1 I have Inherits...
This is what I'm seeing
If I try this
Numbers come from thread 1.
Wait 20 seconds.
Numbers come from thread 2.
I tried dim frm2 as new form2 and I also tried to make dim f2 as new form2 outside of the sub as a class level variable and they both still had the same problem
[QUOTE=dbasnett;4332341]So I did a test. In form1 I have this
Dim f As New Form2
f.Show()
how would it affect my code if I just had form2.show() instead of dimming f as...
I know when the thread starts because I can see the numbers being put on the column of an excel spreadsheet. Thread 1 is column 1, thread 2 is column 2, thread 3 is columng 3 etc.
I run this on...
My questions is this:
When I run this code on this application that i've attached:
All 6 threads start at the exact same time.
When I run this code on another application:
Thread one...
i'm not wanting to sleep testthread2. I'm wanting to start a thread, sleep for 2 seconds, start a thread, sleep for 2 seconds, start a thread. I attached the project to my post so you can see the...
I have created a test application to test my multithreading by creating threads which put the numbers 1 to 100 in columns of an excel spreadsheet. I use a form1 button click to start the threads. One...
Is there any way to start a thread, wait a second, and then start another thread? or is there some setting which affects how sleep works?
I have this multithread loop in one of my applications....
Is there any way that I can mark this thread as unsolved because application.doevents() wound up causing a lot of headache.
How do I connect them? Also how come, when I step through this, the thread starts when I tell it to, but when I run it without stepping through, the thread starts afterwards?
I'm trying to set up a situation where outside of a form I can have form1.webbrowser1 start at www.google.com and navigate to www.yahoo.com where the URL before the navigate is www.google.com and...
That's funny because when I press F8 on the line of code which says form1.webbrowser1.navigate("www.yahoo.com") I don't see the webbrowser navigate....
It's a long story.