Click here to Skip to main content
15,915,869 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to use Microsoft Enterprise Library Pin
saanj8-Jun-09 20:43
saanj8-Jun-09 20:43 
Questionuser name and password Pin
Mads1158-Jun-09 20:02
Mads1158-Jun-09 20:02 
AnswerRe: user name and password Pin
Abhijit Jana8-Jun-09 20:12
professionalAbhijit Jana8-Jun-09 20:12 
GeneralRe: user name and password Pin
Mads1158-Jun-09 20:18
Mads1158-Jun-09 20:18 
GeneralRe: user name and password Pin
saanj8-Jun-09 20:25
saanj8-Jun-09 20:25 
GeneralRe: user name and password Pin
Abhijit Jana8-Jun-09 20:39
professionalAbhijit Jana8-Jun-09 20:39 
AnswerRe: user name and password Pin
saanj8-Jun-09 20:15
saanj8-Jun-09 20:15 
QuestionMulti thread, one dialog form [modified] Pin
yunusdemiray8-Jun-09 20:02
yunusdemiray8-Jun-09 20:02 
Hi, i have a problem about threads with windows forms.
When users's sessions ended, i want to show a dialog box to inform them to relogin and then to show the relogin form.
It was ok until i use threads in some forms to improve performance.
When a thread reveices a session error, it shows the relogin form. Actualy i use invoke on the main thread.
But while the dialog form is shown, another thread can make a service call and receive the same session error and so tries to show the same relogin form. But it is clear that only one instance of relogin form must be shown at the same time. So i have to use a locking mechanism. But since the thread that shows the dialog box is the main thread, this causes the main thread enter wait state. So the application freezes.

public bool Relogin() {
    Interlocked.Increment(ref waitingThreadCount);
    event1.WaitOne();/*Auto Reset Event*/
    if(this.loginResult == null) {/*login result is type of bool?*/
        loginResult = ReloginForm.Show();//Runs as modal
    }
    Interlocked.Decrement(ref waitingThreadCount);
    if(waitingThreadCount == 0) {
        loginResult = null;
    }
    event1.Set();
    return loginResult.Value;
}


modified on Thursday, June 11, 2009 2:40 AM

QuestionCrystal Report Problem with multiple DataTables (It is urgent) Pin
sharad Pyakurel8-Jun-09 17:15
sharad Pyakurel8-Jun-09 17:15 
QuestionError of "failed to import the activex control. please ensure it is properly registered" Pin
brandonwong1238-Jun-09 15:26
brandonwong1238-Jun-09 15:26 
AnswerRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
Christian Graus8-Jun-09 15:28
protectorChristian Graus8-Jun-09 15:28 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
brandonwong1238-Jun-09 18:28
brandonwong1238-Jun-09 18:28 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
N a v a n e e t h8-Jun-09 18:39
N a v a n e e t h8-Jun-09 18:39 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
brandonwong1238-Jun-09 19:01
brandonwong1238-Jun-09 19:01 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
Christian Graus8-Jun-09 19:02
protectorChristian Graus8-Jun-09 19:02 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
brandonwong1238-Jun-09 19:10
brandonwong1238-Jun-09 19:10 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
Christian Graus8-Jun-09 19:17
protectorChristian Graus8-Jun-09 19:17 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
brandonwong1239-Jun-09 6:24
brandonwong1239-Jun-09 6:24 
QuestionGet DataGridView ComboBox Column value?? Pin
jasper0188-Jun-09 15:07
jasper0188-Jun-09 15:07 
AnswerRe: Get DataGridView ComboBox Column value?? Pin
jayveebishie23-Oct-10 4:46
jayveebishie23-Oct-10 4:46 
QuestionSet an arrays items to new strings Pin
Jasmine Pomelo8-Jun-09 14:44
Jasmine Pomelo8-Jun-09 14:44 
GeneralRe: Set an arrays items to new strings Pin
jasper0188-Jun-09 15:16
jasper0188-Jun-09 15:16 
GeneralRe: Set an arrays items to new strings Pin
Jasmine Pomelo8-Jun-09 15:31
Jasmine Pomelo8-Jun-09 15:31 
Question'is' operator Pin
Member 10339078-Jun-09 11:27
Member 10339078-Jun-09 11:27 
AnswerRe: 'is' operator Pin
Christian Graus8-Jun-09 11:33
protectorChristian Graus8-Jun-09 11:33 

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.