Click here to Skip to main content
15,901,373 members
Home / Discussions / C#
   

C#

 
QuestionHow to call CreateFileMapping in C# Pin
Anonymous17-Dec-04 3:54
Anonymous17-Dec-04 3:54 
AnswerRe: How to call CreateFileMapping in C# Pin
Heath Stewart17-Dec-04 7:14
protectorHeath Stewart17-Dec-04 7:14 
QuestionMemory Leak? Pin
Federico Milano17-Dec-04 3:16
Federico Milano17-Dec-04 3:16 
AnswerRe: Memory Leak? Pin
Javier Lozano17-Dec-04 6:55
Javier Lozano17-Dec-04 6:55 
AnswerRe: Memory Leak? Pin
Daniel Turini17-Dec-04 7:05
Daniel Turini17-Dec-04 7:05 
AnswerRe: Memory Leak? Pin
Heath Stewart17-Dec-04 7:11
protectorHeath Stewart17-Dec-04 7:11 
GeneralRe: Memory Leak? Pin
Federico Milano17-Dec-04 8:42
Federico Milano17-Dec-04 8:42 
GeneralRe: Memory Leak? Pin
Heath Stewart17-Dec-04 9:51
protectorHeath Stewart17-Dec-04 9:51 
Start it in a new thread:
Sincronizer s = new Sincronizer();
Thread t = new Thread(new ThreadStart(s.Start));
t.Start();
There's many other ways, too. Maybe your implementation of Sincronizer.Start starts itself in a thread (but make sure the caller knows to block before exiting; you can use Thread.Join for that). You could use a delegate and use BeginInvoke, and when you want to wait for it to finish you could use EndInvoke (which blocks until done (if not already), and returns any return value.

There is a catch: if you update any controls in your Windows Forms application, you need to use Control.InvokeRequired and Control.Invoke to invoke the method on the control in the thread on which the control was created. See the .NET Framework SDK documentation for either the property or method above for more information.

For more information on threading in the .NET Framework, read Threading[^] in the .NET Framework SDK.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralObject instance from propertyDescriptor type Pin
the last free name17-Dec-04 1:47
the last free name17-Dec-04 1:47 
GeneralRe: Object instance from propertyDescriptor type Pin
Heath Stewart17-Dec-04 6:49
protectorHeath Stewart17-Dec-04 6:49 
GeneralMappingName property Pin
qur17-Dec-04 1:23
qur17-Dec-04 1:23 
GeneralRe: MappingName property Pin
Heath Stewart17-Dec-04 6:39
protectorHeath Stewart17-Dec-04 6:39 
QuestionAn object reference is required for the nonstatic field, method, or property .... why?? Pin
Ponzano Paolo17-Dec-04 1:20
Ponzano Paolo17-Dec-04 1:20 
AnswerRe: An object reference is required for the nonstatic field, method, or property .... why?? Pin
Stefan Troschuetz17-Dec-04 1:46
Stefan Troschuetz17-Dec-04 1:46 
GeneralRe: An object reference is required for the nonstatic field, method, or property .... why?? Pin
Paolo Ponzano17-Dec-04 3:08
Paolo Ponzano17-Dec-04 3:08 
GeneralRe: An object reference is required for the nonstatic field, method, or property .... why?? Pin
J4amieC17-Dec-04 4:03
J4amieC17-Dec-04 4:03 
GeneralRe: An object reference is required for the nonstatic field, method, or property .... why?? Pin
Dave Kreskowiak17-Dec-04 8:27
mveDave Kreskowiak17-Dec-04 8:27 
GeneralDateTime Picker Pin
webhay17-Dec-04 0:58
webhay17-Dec-04 0:58 
GeneralRe: DateTime Picker Pin
Heath Stewart17-Dec-04 1:11
protectorHeath Stewart17-Dec-04 1:11 
GeneralPlacing a AxWebBrowser inside a TabPage Pin
Alberto Bencivenni16-Dec-04 22:48
Alberto Bencivenni16-Dec-04 22:48 
Generalbluetooth Pin
Mridang Agarwalla16-Dec-04 22:06
Mridang Agarwalla16-Dec-04 22:06 
GeneralInterfaces...duhhh! Pin
Mridang Agarwalla16-Dec-04 21:52
Mridang Agarwalla16-Dec-04 21:52 
GeneralRe: Interfaces...duhhh! Pin
Heath Stewart16-Dec-04 23:29
protectorHeath Stewart16-Dec-04 23:29 
GeneralRe: Interfaces...duhhh! Pin
Skynyrd16-Dec-04 23:30
Skynyrd16-Dec-04 23:30 
GeneralRe: Interfaces...duhhh! Pin
Heath Stewart17-Dec-04 0:16
protectorHeath Stewart17-Dec-04 0:16 

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

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