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

C#

 
GeneralRe: Class library (COM) to read app.config Pin
Heath Stewart26-Jan-04 11:37
protectorHeath Stewart26-Jan-04 11:37 
GeneralRe: Class library (COM) to read app.config Pin
stateyama26-Jan-04 11:58
stateyama26-Jan-04 11:58 
GeneralRe: Class library (COM) to read app.config Pin
Heath Stewart26-Jan-04 12:02
protectorHeath Stewart26-Jan-04 12:02 
GeneralRe: Class library (COM) to read app.config Pin
stateyama26-Jan-04 12:19
stateyama26-Jan-04 12:19 
General.NET Remoting Question Pin
Brian Rogan26-Jan-04 11:00
Brian Rogan26-Jan-04 11:00 
GeneralRe: .NET Remoting Question Pin
Guillermo Rivero26-Jan-04 11:15
Guillermo Rivero26-Jan-04 11:15 
GeneralMouse click on the frame of a form Pin
Anonymous26-Jan-04 9:41
Anonymous26-Jan-04 9:41 
GeneralRe: Mouse click on the frame of a form Pin
Heath Stewart26-Jan-04 11:03
protectorHeath Stewart26-Jan-04 11:03 
The window frame is not part of the form and has to be handled differently. In the case of the frame for you main form, you can use an IMessageFilter implementation to get notification of a click:
using System;
using System.Windows.Forms;

public class Test : Form, IMessageFilter
{
  public static void Main()
  {

    Test t = new Test();
    Application.AddMessageFilter(t);
    Application.Run(t);
    Application.RemoveMessageFilter(t);
  }

  public Test()
  {
    this.Text = "Test";
  }

  bool IMessageFilter.PreFilterMessage(ref Message m)
  {
    if (m.Msg == WM_NCLBUTTONDOWN)
      MessageBox.Show("You clicked the Window frame");

    return false;
  }

  private const int WM_NCLBUTTONDOWN = 0x00a1;
}
See documentation for the WM_NC* messages for more information about non-client notification messages that you can handle in an IMessageFilter implementation.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralC# Market Penetration for Freeware/Shareware Pin
telstar26-Jan-04 9:38
telstar26-Jan-04 9:38 
GeneralRe: C# Market Penetration for Freeware/Shareware Pin
Heath Stewart26-Jan-04 10:24
protectorHeath Stewart26-Jan-04 10:24 
GeneralRe: C# Market Penetration for Freeware/Shareware Pin
je_gonzalez26-Jan-04 11:29
je_gonzalez26-Jan-04 11:29 
GeneralRe: C# Market Penetration for Freeware/Shareware Pin
Heath Stewart26-Jan-04 11:31
protectorHeath Stewart26-Jan-04 11:31 
GeneralRe: C# Market Penetration for Freeware/Shareware Pin
Eric Gunnerson (msft)26-Jan-04 11:23
Eric Gunnerson (msft)26-Jan-04 11:23 
GeneralRe: C# Market Penetration for Freeware/Shareware Pin
telstar26-Jan-04 11:29
telstar26-Jan-04 11:29 
GeneralRe: C# Market Penetration for Freeware/Shareware Pin
Heath Stewart26-Jan-04 11:43
protectorHeath Stewart26-Jan-04 11:43 
GeneralRe: C# Market Penetration for Freeware/Shareware Pin
Bo Hunter26-Jan-04 12:39
Bo Hunter26-Jan-04 12:39 
Generalhighlighting text in a combo box with the mouse Pin
blakeb_126-Jan-04 8:48
blakeb_126-Jan-04 8:48 
GeneralRe: highlighting text in a combo box with the mouse Pin
Heath Stewart26-Jan-04 9:00
protectorHeath Stewart26-Jan-04 9:00 
GeneralRe: highlighting text in a combo box with the mouse Pin
Anonymous26-Jan-04 9:08
Anonymous26-Jan-04 9:08 
GeneralRe: highlighting text in a combo box with the mouse Pin
Heath Stewart26-Jan-04 9:25
protectorHeath Stewart26-Jan-04 9:25 
GeneralRe: highlighting text in a combo box with the mouse Pin
blakeb_126-Jan-04 9:36
blakeb_126-Jan-04 9:36 
GeneralTaking advantage of other langs in .NET Pin
bneacetp26-Jan-04 8:24
bneacetp26-Jan-04 8:24 
GeneralRe: Taking advantage of other langs in .NET Pin
Heath Stewart26-Jan-04 8:57
protectorHeath Stewart26-Jan-04 8:57 
GeneralRe: Taking advantage of other langs in .NET Pin
bneacetp26-Jan-04 9:41
bneacetp26-Jan-04 9:41 
GeneralRe: Taking advantage of other langs in .NET Pin
Guillermo Rivero26-Jan-04 9:47
Guillermo Rivero26-Jan-04 9:47 

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.