Click here to Skip to main content
15,885,435 members
Home / Discussions / C#
   

C#

 
GeneralRe: cannot found emailhandler in c# 2008 Pin
OriginalGriff28-Jun-14 22:17
mveOriginalGriff28-Jun-14 22:17 
QuestionForm not allowed to move or choose another form in C# ? Pin
Member 245846727-Jun-14 19:01
Member 245846727-Jun-14 19:01 
AnswerRe: Form not allowed to move or choose another form in C# ? Pin
OriginalGriff27-Jun-14 20:34
mveOriginalGriff27-Jun-14 20:34 
GeneralRe: Form not allowed to move or choose another form in C# ? Pin
Member 245846727-Jun-14 21:40
Member 245846727-Jun-14 21:40 
GeneralRe: Form not allowed to move or choose another form in C# ? Pin
OriginalGriff27-Jun-14 21:52
mveOriginalGriff27-Jun-14 21:52 
GeneralRe: Form not allowed to move or choose another form in C# ? Pin
Member 245846728-Jun-14 5:03
Member 245846728-Jun-14 5:03 
GeneralRe: Form not allowed to move or choose another form in C# ? Pin
Member 245846728-Jun-14 13:38
Member 245846728-Jun-14 13:38 
GeneralRe: Form not allowed to move or choose another form in C# ? Pin
OriginalGriff28-Jun-14 22:25
mveOriginalGriff28-Jun-14 22:25 
Easiest way is to not show the title bar: set FormBorderStyle to None and there will be no title to drag it with - this also removes the menu, maximize, minimize, and close buttons.

Alternatively, override WndProc:
C#
private const int WM_NCLBUTTONDOWN = 161;
private const int WM_SYSCOMMAND = 274;
private const int HTCAPTION = 2;
private const int SC_MOVE = 61456;
protected override void WndProc(ref Message m)
    {
    if ((m.Msg == WM_SYSCOMMAND) && (m.WParam.ToInt32() == SC_MOVE)) return;
    if ((m.Msg == WM_NCLBUTTONDOWN) && (m.WParam.ToInt32() == HTCAPTION)) return;
    base.WndProc(ref m);
    }

Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

QuestionCombining two or three solution in visual C# 2008 Pin
KaKoten27-Jun-14 17:34
KaKoten27-Jun-14 17:34 
AnswerRe: Combining two or three solution in visual C# 2008 Pin
PIEBALDconsult27-Jun-14 17:55
mvePIEBALDconsult27-Jun-14 17:55 
AnswerRe: Combining two or three solution in visual C# 2008 Pin
Dave Kreskowiak27-Jun-14 17:55
mveDave Kreskowiak27-Jun-14 17:55 
GeneralRe: Combining two or three solution in visual C# 2008 Pin
KaKoten27-Jun-14 20:40
KaKoten27-Jun-14 20:40 
GeneralRe: Combining two or three solution in visual C# 2008 Pin
Dave Kreskowiak28-Jun-14 3:55
mveDave Kreskowiak28-Jun-14 3:55 
QuestionOut Putting Graph in Debug Window Pin
computerpublic27-Jun-14 8:06
computerpublic27-Jun-14 8:06 
AnswerRe: Out Putting Graph in Debug Window Pin
Dave Kreskowiak27-Jun-14 8:15
mveDave Kreskowiak27-Jun-14 8:15 
AnswerRe: Out Putting Graph in Debug Window Pin
Gerry Schmitz27-Jun-14 9:59
mveGerry Schmitz27-Jun-14 9:59 
QuestionFilter & Auto complete for dropdownlistfor (MVC) Pin
Cathylou Barbado27-Jun-14 0:06
Cathylou Barbado27-Jun-14 0:06 
AnswerRe: Filter & Auto complete for dropdownlistfor (MVC) Pin
thatraja27-Jun-14 1:12
professionalthatraja27-Jun-14 1:12 
QuestionLINQ version equivalent Pin
Member 727859826-Jun-14 23:13
Member 727859826-Jun-14 23:13 
AnswerRe: LINQ version equivalent Pin
Pete O'Hanlon27-Jun-14 4:00
mvePete O'Hanlon27-Jun-14 4:00 
GeneralRe: LINQ version equivalent Pin
Member 727859828-Jun-14 1:16
Member 727859828-Jun-14 1:16 
GeneralRe: LINQ version equivalent Pin
Pete O'Hanlon28-Jun-14 2:51
mvePete O'Hanlon28-Jun-14 2:51 
QuestionWPF Project Pin
Wesley2026-Jun-14 22:34
Wesley2026-Jun-14 22:34 
AnswerRe: WPF Project Pin
OriginalGriff26-Jun-14 23:04
mveOriginalGriff26-Jun-14 23:04 
AnswerRe: WPF Project Pin
Wayne Gaylard26-Jun-14 23:05
professionalWayne Gaylard26-Jun-14 23:05 

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.