Click here to Skip to main content
       

.NET Framework

 
GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE) Pinmembersteve_949661319-Nov-12 4:37 
AnswerRe: [VB.NET 2008] Change form from separate thread (Windows CE) PinmemberEddy Vluggen19-Nov-12 5:04 
GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE) Pinmembersteve_949661319-Nov-12 22:54 
GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE) PinmemberEddy Vluggen20-Nov-12 0:53 
steve_9496613 wrote:
1) the method Start(Object) is not supported in Compact Framework so I have to call MyNewThread.Start()

For the second error, I'm searching through MSDN...

The delegate is probably missing one of the parameters used.
 
steve_9496613 wrote:
About the use of global variables, is it such a bad thing?

Usuallly done to keep things "simple", usually makes things more complicated. See, you'll need access to the form (from the thread), to invoke one of it's members.
 
Alternatively, you might want to check out locking.
 
steve_9496613 wrote:
The real application is more complex of this example, the function executed by the thread will communicate with a PLC via ethernet and will read a lot of data (and write some) and then, at the end of each loop, it will call a function to visualize new data in different "pages" (I use UserControl objects) in the application. My idea is to use a class in order to collect all of these data and make them available inside and outside the thread. What do you think about this

Sounds feasible. Remember to only update the visible stuff, resources will probably be scarce Smile | :)
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE) Pinmembersteve_949661320-Nov-12 3:36 
GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE) PinmemberEddy Vluggen20-Nov-12 4:33 
GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE) Pinmembersteve_949661320-Nov-12 5:23 
GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE) PinmemberEddy Vluggen20-Nov-12 9:21 
GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE) Pinmembersteve_949661320-Nov-12 21:25 
GeneralRe: [VB.NET 2008] Change form from separate thread (Windows CE) PinmemberEddy Vluggen21-Nov-12 5:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140905.1 | Last Updated 16 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid