Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
GeneralRe: See who/what program changed a file Pin
CWIZO15-Feb-06 20:45
CWIZO15-Feb-06 20:45 
GeneralRe: See who/what program changed a file Pin
VanEtienne15-Feb-06 20:48
VanEtienne15-Feb-06 20:48 
AnswerRe: See who/what program changed a file Pin
Dave Kreskowiak16-Feb-06 10:43
mveDave Kreskowiak16-Feb-06 10:43 
GeneralRe: See who/what program changed a file Pin
VanEtienne16-Feb-06 18:08
VanEtienne16-Feb-06 18:08 
GeneralRe: See who/what program changed a file Pin
Dave Kreskowiak17-Feb-06 1:09
mveDave Kreskowiak17-Feb-06 1:09 
Questiondisabling column resizing in Data grid Pin
Sandeep TP15-Feb-06 19:34
Sandeep TP15-Feb-06 19:34 
AnswerRe: disabling column resizing in Data grid Pin
Maqsood Ahmed15-Feb-06 22:18
Maqsood Ahmed15-Feb-06 22:18 
AnswerRe: disabling column resizing in Data grid Pin
microsoc15-Feb-06 22:48
microsoc15-Feb-06 22:48 
Hi Sandeep! Smile | :)

try this:
public class MicrosocDataGrid : DataGrid
{
    public MicrosocDataGrid ()
    {
    }

    public new event MouseEventHandler MouseDown; // shadowed, to trigger the events
         public new event MouseEventHandler MouseMove;

    protected override void OnMouseMove(MouseEventArgs e)
    {
        if (IsColumnResize(e.X, e.Y))
        {
            if (MouseMove != null)//the purpose of the shadowing, to trigger this event
            {
                 MouseMove(this, e);
            }
        }
        else
        {
            base.OnMouseMove(e);
        }
    }

    protected override void OnMouseDown(MouseEventArgs e)
    {
        if (IsColumnResize(e.X, e.Y))
        {
            if (MouseDown != null) //the purpose of the shadowing, to trigger this event
            {
                MouseDown(this, e);
            }
        }
        else
        {
            base.OnMouseDown(e);
        }
    }

    private bool IsColumnResize (int nX, int nY)
    {
        DataGrid.HitTestInfo hti = HitTest(nX, nY);
        return (hti.Type == DataGrid.HitTestType.ColumnResize);
    }
}





hope that helps! Smile | :)


microsoc Cool | :cool:
QuestionConnecting to remote database using C# Pin
stephentanph15-Feb-06 18:46
stephentanph15-Feb-06 18:46 
AnswerRe: Connecting to remote database using C# Pin
Gokulan Venattil15-Feb-06 22:07
Gokulan Venattil15-Feb-06 22:07 
AnswerRe: Connecting to remote database using C# Pin
J4amieC15-Feb-06 23:02
J4amieC15-Feb-06 23:02 
Questionmany dynamic forms Pin
DeathJester_15-Feb-06 17:36
DeathJester_15-Feb-06 17:36 
AnswerRe: many dynamic forms Pin
krieg3815-Feb-06 19:00
krieg3815-Feb-06 19:00 
GeneralRe: many dynamic forms Pin
DeathJester_16-Feb-06 18:26
DeathJester_16-Feb-06 18:26 
QuestionModal Dialogs Pin
Tyrus18215-Feb-06 17:27
Tyrus18215-Feb-06 17:27 
GeneralRe: Modal Dialogs Pin
Guffa15-Feb-06 19:01
Guffa15-Feb-06 19:01 
Questionpinging from C# Pin
AB777115-Feb-06 16:42
AB777115-Feb-06 16:42 
AnswerRe: pinging from C# Pin
krieg3815-Feb-06 18:56
krieg3815-Feb-06 18:56 
GeneralRe: pinging from C# Pin
AB777115-Feb-06 19:12
AB777115-Feb-06 19:12 
Question.net framework encryption that can be easily decoded on unix Pin
tfoxcreatek15-Feb-06 13:28
tfoxcreatek15-Feb-06 13:28 
AnswerRe: .net framework encryption that can be easily decoded on unix Pin
Expert Coming15-Feb-06 14:08
Expert Coming15-Feb-06 14:08 
GeneralRe: .net framework encryption that can be easily decoded on unix Pin
tfoxcreatek15-Feb-06 16:14
tfoxcreatek15-Feb-06 16:14 
GeneralRe: .net framework encryption that can be easily decoded on unix Pin
liRetro16-Feb-06 5:10
liRetro16-Feb-06 5:10 
QuestionWebRequest Pin
Expert Coming15-Feb-06 11:32
Expert Coming15-Feb-06 11:32 
AnswerRe: WebRequest Pin
Dave Kreskowiak15-Feb-06 14:59
mveDave Kreskowiak15-Feb-06 14:59 

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.