Click here to Skip to main content
15,900,258 members
Home / Discussions / C#
   

C#

 
GeneralManaging at Runtime-created Controls in C# Pin
tutah30-Jun-05 2:08
tutah30-Jun-05 2:08 
QuestionHow to add controls to OpenDialog box? Pin
Anonymous30-Jun-05 1:53
Anonymous30-Jun-05 1:53 
AnswerRe: How to add controls to OpenDialog box? Pin
Mattias Olgerfelt30-Jun-05 5:54
Mattias Olgerfelt30-Jun-05 5:54 
GeneralRe: How to add controls to OpenDialog box? Pin
avivag6-Jul-05 0:16
avivag6-Jul-05 0:16 
Generalcombobox contents verify fails Pin
fracalifa30-Jun-05 1:49
fracalifa30-Jun-05 1:49 
GeneralRe: combobox contents verify fails Pin
Guffa30-Jun-05 3:52
Guffa30-Jun-05 3:52 
GeneralThread Pin
Rassul Yunussov30-Jun-05 0:44
Rassul Yunussov30-Jun-05 0:44 
GeneralRe: Thread Pin
Judah Gabriel Himango30-Jun-05 5:27
sponsorJudah Gabriel Himango30-Jun-05 5:27 
Use ThreadPool.QueueUserWorkItem(), which lets you pass a single object argument to your thread. Or use TheDelegateYouAreUsing.BeginInvoke, which allows you to pass all the arguments necessary.


Rassul Yunussov wrote:
How to paint map Without Flicking? So how to implement double buffered painting...

Inherit a new class from the control you want to draw on. In its constructor, use this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);

A word of warning: be careful passing state between threads. It's generally a bad idea because things get hairy when dealing with multiple threads accessing the same variable.

Also, keep in mind you should NEVER access a Windows Form control (or any other Win32 common control-based object) from a thread other than the creating thread. The only Windows Forms control methods you're allowed to call on another thread are Invoke, BeginInvoke, and CreateGraphics().

Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango


GeneralRe: Thread Pin
Rassul Yunussov30-Jun-05 20:10
Rassul Yunussov30-Jun-05 20:10 
GeneralRe: Thread Pin
Judah Gabriel Himango1-Jul-05 5:05
sponsorJudah Gabriel Himango1-Jul-05 5:05 
GeneralSending multple files to AXIS web service Pin
quim_rocha30-Jun-05 0:15
quim_rocha30-Jun-05 0:15 
Generalconnecting sqlexpress inside IDE Pin
g00fyman30-Jun-05 0:03
g00fyman30-Jun-05 0:03 
Questionnormal behaviour for writeline? Pin
beginsomewhere29-Jun-05 23:58
sussbeginsomewhere29-Jun-05 23:58 
AnswerRe: normal behaviour for writeline? Pin
Corinna John1-Jul-05 0:27
Corinna John1-Jul-05 0:27 
GeneralReminder System Pin
Adoremi29-Jun-05 23:01
Adoremi29-Jun-05 23:01 
GeneralRe: Reminder System Pin
Dave Kreskowiak30-Jun-05 5:05
mveDave Kreskowiak30-Jun-05 5:05 
GeneralRe: Reminder System Pin
Adoremi2-Jul-05 6:38
Adoremi2-Jul-05 6:38 
GeneralRe: Reminder System Pin
Dave Kreskowiak2-Jul-05 16:29
mveDave Kreskowiak2-Jul-05 16:29 
GeneralRe: Reminder System Pin
Adoremi3-Jul-05 15:39
Adoremi3-Jul-05 15:39 
GeneralRe: Reminder System Pin
Dave Kreskowiak3-Jul-05 16:16
mveDave Kreskowiak3-Jul-05 16:16 
QuestionHow to use AND operator in sql?? Pin
fire8529-Jun-05 22:31
fire8529-Jun-05 22:31 
AnswerRe: How to use AND operator in sql?? Pin
mav.northwind29-Jun-05 22:38
mav.northwind29-Jun-05 22:38 
GeneralRe: How to use AND operator in sql?? Pin
fire8529-Jun-05 22:42
fire8529-Jun-05 22:42 
GeneralMaking A Phone Call With TAPI 3 Pin
Andre Trollip29-Jun-05 21:54
Andre Trollip29-Jun-05 21:54 
GeneralRe: Making A Phone Call With TAPI 3 Pin
mav.northwind29-Jun-05 22:03
mav.northwind29-Jun-05 22:03 

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.