Click here to Skip to main content
14,979,294 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionInfragistics UltraGrid Pin
Kevin Marois12-Sep-12 5:49
professionalKevin Marois12-Sep-12 5:49 
AnswerRe: Infragistics UltraGrid Pin
Abhinav S12-Sep-12 7:37
MemberAbhinav S12-Sep-12 7:37 
Questionabout c# Pin
pawan19937-Sep-12 2:03
Memberpawan19937-Sep-12 2:03 
AnswerRe: about c# Pin
Wes Aday7-Sep-12 2:21
professionalWes Aday7-Sep-12 2:21 
GeneralRe: about c# Pin
Eddy Vluggen7-Sep-12 2:54
professionalEddy Vluggen7-Sep-12 2:54 
QuestionSQL Connection problem in Windows Service Pin
Member 799263524-Aug-12 0:17
MemberMember 799263524-Aug-12 0:17 
AnswerRe: SQL Connection problem in Windows Service Pin
Pete O'Hanlon24-Aug-12 0:21
mvePete O'Hanlon24-Aug-12 0:21 
GeneralRe: SQL Connection problem in Windows Service Pin
dojohansen10-Oct-12 5:19
Memberdojohansen10-Oct-12 5:19 
Could be that, could be a firewall, could be something else.

Before trying to fix it though I'd introduce a minimum of logging in the service so in future you don't have to stare blindly at that nearly information-free message: "the service started, and then stopped unexpectedly".

It's also nice to have the ability to debug service initialization. To do this, introduce a config setting and put a method like this into your service class:
static void AwaitDebugger()
{
    string s = ConfigurationManager.AppSettings["debug"];
    if (s == null || s.ToLower() != "true") return;

    DateTime until = DateTime.Now.AddSeconds(30);
    while (DateTime.Now < until && !Debugger.IsAttached)
        Thread.Sleep(50);
            
    if (Debugger.IsAttached)
        Debugger.Break();
}


Now in the service main thread, just insert a call to this method before doing anything else. (Not in the start method that probably simply starts the main thread; you want this method to return immediately as before. But in the thread it starts, you want to wait for a debugger to attach if so configured.) Build, deploy, and debug!
GeneralRe: SQL Connection problem in Windows Service Pin
Pete O'Hanlon10-Oct-12 5:32
mvePete O'Hanlon10-Oct-12 5:32 
Questionstrategy for correcting the side-effects of using Dock (which ignore Margin settings) Pin
BillWoodruff14-Aug-12 0:08
mveBillWoodruff14-Aug-12 0:08 
AnswerRe: strategy for correcting the side-effects of using Dock (which ignore Margin settings) Pin
dojohansen10-Oct-12 6:01
Memberdojohansen10-Oct-12 6:01 
QuestionEditingPanel Erasing Top Cell Border Pin
Mark Regal13-Aug-12 19:06
MemberMark Regal13-Aug-12 19:06 
AnswerRe: EditingPanel Erasing Top Cell Border Pin
Mark Regal14-Aug-12 3:14
MemberMark Regal14-Aug-12 3:14 
QuestionVS2010 Setup and Deployment Project - CommonAppDataFolder for XP Pin
Member 269415310-Aug-12 9:05
MemberMember 269415310-Aug-12 9:05 
AnswerRe: VS2010 Setup and Deployment Project - CommonAppDataFolder for XP Pin
Dave Kreskowiak10-Aug-12 14:19
mveDave Kreskowiak10-Aug-12 14:19 
GeneralRe: VS2010 Setup and Deployment Project - CommonAppDataFolder for XP Pin
Member 269415313-Aug-12 2:18
MemberMember 269415313-Aug-12 2:18 
AnswerRe: VS2010 Setup and Deployment Project - CommonAppDataFolder for XP Pin
ictxiangxin13-Aug-12 4:03
Memberictxiangxin13-Aug-12 4:03 
QuestionWrapping of Data Grid View column Pin
ukraju5-Aug-12 20:58
Memberukraju5-Aug-12 20:58 
AnswerRe: Wrapping of Data Grid View column Pin
908236510-Aug-12 12:59
Member908236510-Aug-12 12:59 
QuestionWindows Form Pin
DSPNEOqqq3-Aug-12 9:15
MemberDSPNEOqqq3-Aug-12 9:15 
RantRe: Windows Form Pin
Eddy Vluggen3-Aug-12 9:30
professionalEddy Vluggen3-Aug-12 9:30 
GeneralRe: Windows Form OT Pin
Wes Aday3-Aug-12 9:41
professionalWes Aday3-Aug-12 9:41 
GeneralRe: Windows Form OT Pin
Eddy Vluggen3-Aug-12 10:01
professionalEddy Vluggen3-Aug-12 10:01 
AnswerRe: Windows Form Pin
Christian Amado6-Aug-12 10:47
professionalChristian Amado6-Aug-12 10:47 
AnswerRe: Windows Form Pin
BillWoodruff11-Aug-12 15:27
mveBillWoodruff11-Aug-12 15:27 

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.