Click here to Skip to main content
15,888,113 members
Home / Discussions / C#
   

C#

 
QuestionGridView, Trying to get some columns editable, and some columns readonly. Pin
wizardzz25-Jan-11 7:39
wizardzz25-Jan-11 7:39 
AnswerRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
Eddy Vluggen25-Jan-11 8:02
professionalEddy Vluggen25-Jan-11 8:02 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
wizardzz25-Jan-11 8:07
wizardzz25-Jan-11 8:07 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
Eddy Vluggen25-Jan-11 8:10
professionalEddy Vluggen25-Jan-11 8:10 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
wizardzz25-Jan-11 11:52
wizardzz25-Jan-11 11:52 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
Eddy Vluggen26-Jan-11 0:24
professionalEddy Vluggen26-Jan-11 0:24 
AnswerRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
dasblinkenlight25-Jan-11 8:11
dasblinkenlight25-Jan-11 8:11 
QuestionPlease tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 3:57
turbosupramk325-Jan-11 3:57 
It writes to the log file every 2 seconds, so I know it is looping, but it does not stop the shutdown executable from running. However if I loop it with a batch file it works perfect? Is there a way to have the command text write to the console window as well?

Thanks for reading.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Threading;
using System.IO;


namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            while (true)
            {
                System.Diagnostics.ProcessStartInfo shutDownBlocker = new ProcessStartInfo();
                shutDownBlocker.FileName = @"c:\windows\system32\shutdown.exe";
                shutDownBlocker.WindowStyle = ProcessWindowStyle.Normal;
                shutDownBlocker.Arguments = " /a";
                shutDownBlocker.CreateNoWindow = false;
                Thread.Sleep(2000);
                File.AppendAllText(@"c:\temp\shutdownlog.txt", "ran command" + System.Environment.NewLine);
            }
        }
    }
}

AnswerRe: Please tell me why this simple shutdown application isn't working Pin
Praveen Raghuvanshi25-Jan-11 4:07
professionalPraveen Raghuvanshi25-Jan-11 4:07 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 4:53
turbosupramk325-Jan-11 4:53 
AnswerRe: Please tell me why this simple shutdown application isn't working Pin
Mirko198025-Jan-11 4:12
Mirko198025-Jan-11 4:12 
AnswerRe: Please tell me why this simple shutdown application isn't working Pin
Dave Kreskowiak25-Jan-11 4:17
mveDave Kreskowiak25-Jan-11 4:17 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
Mirko198025-Jan-11 4:25
Mirko198025-Jan-11 4:25 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 4:55
turbosupramk325-Jan-11 4:55 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 4:58
turbosupramk325-Jan-11 4:58 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
Dave Kreskowiak25-Jan-11 6:51
mveDave Kreskowiak25-Jan-11 6:51 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 7:18
turbosupramk325-Jan-11 7:18 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
Dave Kreskowiak25-Jan-11 8:08
mveDave Kreskowiak25-Jan-11 8:08 
QuestionHow to create a Module class in C# similar to VB .NET Pin
LAPEC25-Jan-11 1:23
LAPEC25-Jan-11 1:23 
AnswerRe: How to create a Module class in C# similar to VB .NET Pin
Estys25-Jan-11 1:29
Estys25-Jan-11 1:29 
GeneralRe: How to create a Module class in C# similar to VB .NET Pin
LAPEC25-Jan-11 1:40
LAPEC25-Jan-11 1:40 
GeneralRe: How to create a Module class in C# similar to VB .NET Pin
Pravin Patil, Mumbai25-Jan-11 1:52
Pravin Patil, Mumbai25-Jan-11 1:52 
GeneralRe: How to create a Module class in C# similar to VB .NET Pin
Estys25-Jan-11 2:17
Estys25-Jan-11 2:17 
GeneralRe: How to create a Module class in C# similar to VB .NET Pin
LAPEC25-Jan-11 2:19
LAPEC25-Jan-11 2:19 
GeneralRe: How to create a Module class in C# similar to VB .NET Pin
OriginalGriff25-Jan-11 2:25
mveOriginalGriff25-Jan-11 2:25 

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.