Click here to Skip to main content
12,301,899 members (56,350 online)

Windows Forms

 
QuestionNeed guidance for chat conversion UI area designing (win form c#) Pin
Tridip Bhattacharjee25-Mar-13 5:03
memberTridip Bhattacharjee25-Mar-13 5:03 
AnswerRe: Need guidance for chat conversion UI area designing (win form c#) Pin
Eddy Vluggen25-Mar-13 8:18
mvpEddy Vluggen25-Mar-13 8:18 
GeneralRe: Need guidance for chat conversion UI area designing (win form c#) Pin
Tridip Bhattacharjee25-Mar-13 9:33
memberTridip Bhattacharjee25-Mar-13 9:33 
GeneralRe: Need guidance for chat conversion UI area designing (win form c#) Pin
Eddy Vluggen25-Mar-13 9:39
mvpEddy Vluggen25-Mar-13 9:39 
QuestionSlow Graphics in Windows 8 Pin
Walt Fair, Jr.11-Mar-13 21:09
subeditorWalt Fair, Jr.11-Mar-13 21:09 
JokeRe: Slow Graphics in Windows 8 Pin
Maciej Los19-Apr-13 6:23
mvpMaciej Los19-Apr-13 6:23 
GeneralRe: Slow Graphics in Windows 8 Pin
Walt Fair, Jr.19-Apr-13 7:24
subeditorWalt Fair, Jr.19-Apr-13 7:24 
AnswerRe: Slow Graphics in Windows 8 Pin
Maciej Los19-Apr-13 9:36
mvpMaciej Los19-Apr-13 9:36 
GeneralRe: Slow Graphics in Windows 8 Pin
Walt Fair, Jr.20-Apr-13 22:08
subeditorWalt Fair, Jr.20-Apr-13 22:08 
QuestionHow to capture snap of any SDI windowForm including title bar Pin
Tridip Bhattacharjee11-Mar-13 8:20
memberTridip Bhattacharjee11-Mar-13 8:20 
AnswerRe: How to capture snap of any SDI windowForm including title bar Pin
Richard MacCutchan12-Mar-13 2:08
mvpRichard MacCutchan12-Mar-13 2:08 
GeneralRe: How to capture snap of any SDI windowForm including title bar Pin
Tridip Bhattacharjee13-Mar-13 8:29
memberTridip Bhattacharjee13-Mar-13 8:29 
GeneralRe: How to capture snap of any SDI windowForm including title bar Pin
Richard MacCutchan13-Mar-13 22:31
mvpRichard MacCutchan13-Mar-13 22:31 
QuestionHow to detect mouse over & out on win form title bar Pin
Tridip Bhattacharjee9-Mar-13 9:23
memberTridip Bhattacharjee9-Mar-13 9:23 
i want to detect mouse over on title bar or mouse out from title bar in my c# winform apps. i got a code sample which works but the problem is when i place the mouse on any area of win form then mouse leave occur and when i put mouse on title bar then right event call. actually i want that if i place my mouse on any area of form except title bar then nothing should happen.only when i will place mouse on title bar then a notification should come to me and when i will remove mouse from title to out of my form then label should display mouse out message but if remove mouse from title bar to form body then label should be blank.

here is code. just run this code and tell me what modification i should do to get my expected result. thanks
using System.Runtime.InteropServices;

public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}

protected override void WndProc(ref Message m)
{
if (m.Msg == 0xA0) // WM_NCMOUSEMOVE
{
TrackNcMouseLeave(this);
//ShowClientArea();
label1.Text = "mouse move on title bar";
}
else if (m.Msg == 0x2A2) // WM_NCMOUSELEAVE
{
//HideClientAreaIfPointerIsOut();
label1.Text = "mouse leave from title bar";
}

base.WndProc(ref m);
}

protected override void OnMouseLeave(EventArgs e)
{
base.OnMouseLeave(e);
//HideClientAreaIfPointerIsOut();
}

private int previouseHeight;

private void ShowClientArea()
{
if (this.ClientSize.Height == 0)
this.ClientSize = new Size(this.ClientSize.Width, previouseHeight);
}

private void HideClientAreaIfPointerIsOut()
{
if (this.Bounds.Contains(Cursor.Position))
return;
previouseHeight = this.ClientSize.Height;
this.ClientSize = new Size(this.ClientSize.Width, 0);
}

public static void TrackNcMouseLeave(Control control)
{
TRACKMOUSEEVENT tme = new TRACKMOUSEEVENT();
tme.cbSize = (uint)Marshal.SizeOf(tme);
tme.dwFlags = 2 | 0x10; // TME_LEAVE | TME_NONCLIENT
tme.hwndTrack = control.Handle;
TrackMouseEvent(tme);
}

[DllImport("user32")]
public static extern bool TrackMouseEvent([In, Out] TRACKMOUSEEVENT lpEventTrack);

[StructLayout(LayoutKind.Sequential)]
public class TRACKMOUSEEVENT
{
public uint cbSize;
public uint dwFlags;
public IntPtr hwndTrack;
public uint dwHoverTime;
}
}
tbhattacharjee

QuestionWinforms Html Editor Pin
tarjeetsalh7-Mar-13 1:41
membertarjeetsalh7-Mar-13 1:41 
AnswerRe: Winforms Html Editor Pin
Dave Kreskowiak7-Mar-13 2:27
mvpDave Kreskowiak7-Mar-13 2:27 
GeneralRe: Winforms Html Editor Pin
tarjeetsalh10-Mar-13 21:28
membertarjeetsalh10-Mar-13 21:28 
GeneralRe: Winforms Html Editor Pin
Dave Kreskowiak11-Mar-13 5:41
mvpDave Kreskowiak11-Mar-13 5:41 
QuestionThread Leak Pin
michaelbarb25-Feb-13 5:12
membermichaelbarb25-Feb-13 5:12 
AnswerRe: Thread Leak Pin
Bernhard Hiller27-Feb-13 23:36
memberBernhard Hiller27-Feb-13 23:36 
GeneralRe: Thread Leak Pin
michaelbarb28-Feb-13 3:34
membermichaelbarb28-Feb-13 3:34 
AnswerRe: Thread Leak Pin
Pete O'Hanlon28-Feb-13 1:40
protectorPete O'Hanlon28-Feb-13 1:40 
GeneralRe: Thread Leak Pin
michaelbarb28-Feb-13 3:38
membermichaelbarb28-Feb-13 3:38 
GeneralRe: Thread Leak Pin
Pete O'Hanlon28-Feb-13 3:41
protectorPete O'Hanlon28-Feb-13 3:41 
GeneralRe: Thread Leak Pin
michaelbarb28-Feb-13 4:11
membermichaelbarb28-Feb-13 4:11 
GeneralRe: Thread Leak Pin
Dave Kreskowiak28-Feb-13 4:17
mvpDave Kreskowiak28-Feb-13 4:17 
GeneralRe: Thread Leak Pin
Pete O'Hanlon28-Feb-13 4:30
protectorPete O'Hanlon28-Feb-13 4:30 
AnswerRe: Thread Leak Pin
michaelbarb18-Jun-13 4:57
professionalmichaelbarb18-Jun-13 4:57 
QuestionElements of a toolstrip witin an usercontrol get deleted when copying/pasting the usercontrol. Pin
priyamtheone18-Feb-13 4:41
memberpriyamtheone18-Feb-13 4:41 
QuestionData Binding to an Object that may be Read Only Pin
Simon Bridge4-Feb-13 11:46
memberSimon Bridge4-Feb-13 11:46 
AnswerRe: Data Binding to an Object that may be Read Only Pin
Eddy Vluggen9-Feb-13 9:30
mvpEddy Vluggen9-Feb-13 9:30 
GeneralRe: Data Binding to an Object that may be Read Only Pin
Simon Bridge10-Feb-13 10:45
memberSimon Bridge10-Feb-13 10:45 
GeneralRe: Data Binding to an Object that may be Read Only Pin
Eddy Vluggen12-Feb-13 7:53
mvpEddy Vluggen12-Feb-13 7:53 
GeneralRe: Data Binding to an Object that may be Read Only Pin
Simon Bridge12-Feb-13 10:55
memberSimon Bridge12-Feb-13 10:55 
GeneralRe: Data Binding to an Object that may be Read Only Pin
Eddy Vluggen12-Feb-13 12:27
mvpEddy Vluggen12-Feb-13 12:27 
QuestionImplement jQuery Tag-it functionality in C# Win Form Pin
Member 29389611-Feb-13 7:47
memberMember 29389611-Feb-13 7:47 
QuestionRe-write a MS Access application to Visual Studio Pin
Jaap Britz19-Jan-13 23:23
memberJaap Britz19-Jan-13 23:23 
AnswerRe: Re-write a MS Access application to Visual Studio Pin
Eddy Vluggen20-Jan-13 2:32
mvpEddy Vluggen20-Jan-13 2:32 
GeneralRe: Re-write a MS Access application to Visual Studio Pin
Maciej Los19-Mar-13 7:01
mvpMaciej Los19-Mar-13 7:01 
AnswerRe: Re-write a MS Access application to Visual Studio Pin
Maciej Los19-Mar-13 7:05
mvpMaciej Los19-Mar-13 7:05 
QuestionHow to Deploy my application along with database Pin
Member 929272931-Dec-12 0:27
memberMember 929272931-Dec-12 0:27 
AnswerRe: How to Deploy my application along with database Pin
savbace10-Jan-13 22:54
membersavbace10-Jan-13 22:54 
QuestionWindows Form Designer code and importing old projects Pin
Aaron Hartley28-Dec-12 10:42
memberAaron Hartley28-Dec-12 10:42 
AnswerRe: Windows Form Designer code and importing old projects Pin
Mike Meinz21-Jan-13 8:44
memberMike Meinz21-Jan-13 8:44 
Questionparent/child bindingsource save on new row does not work Pin
PrissySC8-Dec-12 11:07
memberPrissySC8-Dec-12 11:07 
AnswerRe: parent/child bindingsource save on new row does not work Pin
PrissySC10-Dec-12 3:36
memberPrissySC10-Dec-12 3:36 
QuestionDetect if ANY control is clicked inside a form, regardless of the container Pin
Dennis Bork3-Dec-12 3:39
memberDennis Bork3-Dec-12 3:39 
Answercrosspost from C# forum Pin
Eddy Vluggen3-Dec-12 4:47
memberEddy Vluggen3-Dec-12 4:47 
GeneralRe: crosspost from C# forum Pin
Pete O'Hanlon3-Dec-12 4:54
protectorPete O'Hanlon3-Dec-12 4:54 
GeneralRe: crosspost from C# forum Pin
Eddy Vluggen3-Dec-12 4:56
memberEddy Vluggen3-Dec-12 4:56 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 12 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid