Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get the IP Number of the server on which my app is running Pin
Ranjan Banerji7-May-03 3:45
Ranjan Banerji7-May-03 3:45 
GeneralRe: How to get the IP Number of the server on which my app is running Pin
Vasudevan Deepak Kumar7-May-03 3:59
Vasudevan Deepak Kumar7-May-03 3:59 
GeneralRe: How to get the IP Number of the server on which my app is running Pin
Ranjan Banerji7-May-03 11:17
Ranjan Banerji7-May-03 11:17 
GeneralForm Design Quandries Pin
RB@Emphasys6-May-03 7:54
RB@Emphasys6-May-03 7:54 
GeneralRe: Form Design Quandries Pin
Stephane Rodriguez.6-May-03 9:07
Stephane Rodriguez.6-May-03 9:07 
GeneralRe: Form Design Quandries Pin
RB@Emphasys6-May-03 9:12
RB@Emphasys6-May-03 9:12 
GeneralRe: Form Design Quandries Pin
RB@Emphasys6-May-03 9:21
RB@Emphasys6-May-03 9:21 
GeneralRe: Form Design Quandries Pin
Stephane Rodriguez.6-May-03 9:20
Stephane Rodriguez.6-May-03 9:20 
I have managed to sort it out. Add this following code once your child form is created (and in fact anytime a child form is created/destroyed/...) :

[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern long GetWindowLong(IntPtr hWnd, int style);

[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern void SetWindowLong(IntPtr hWnd, int style, long value);
<p> </p>
const int GWL_STYLE = -16;
const long WS_MINIMIZEBOX = 0x20000;
const long WS_MAXIMIZEBOX = 0x10000;

int nbControls = this.Controls.Count;
for (int i=0; i<nbControls; i++)
{
  Control pCtrl = this.Controls[i];
  if ( pCtrl.GetType()== typeof(System.Windows.Forms.MdiClient) )
  {
    long nStyle = GetWindowLong(pCtrl.Handle, GWL_STYLE);
    nStyle ^= (WS_MINIMIZEBOX | WS_MAXIMIZEBOX);
    SetWindowLong(pCtrl.Handle, GWL_STYLE, nStyle);
  }
}


As I have already said, this forces the MDIClient's window style not to show either caption boxes.
GeneralRe: Form Design Quandries Pin
RB@Emphasys6-May-03 9:22
RB@Emphasys6-May-03 9:22 
GeneralRelated to Files Pin
Kant6-May-03 7:42
Kant6-May-03 7:42 
GeneralRe: Related to Files Pin
Stephane Rodriguez.6-May-03 7:58
Stephane Rodriguez.6-May-03 7:58 
GeneralRe: Related to Files Pin
Kant6-May-03 8:24
Kant6-May-03 8:24 
GeneralRe: Related to Files Pin
Stephane Rodriguez.6-May-03 8:56
Stephane Rodriguez.6-May-03 8:56 
GeneralRe: Related to Files Pin
Daniel Turini6-May-03 8:21
Daniel Turini6-May-03 8:21 
GeneralSplit the file Pin
Kant6-May-03 4:49
Kant6-May-03 4:49 
GeneralRe: Split the file Pin
Stephane Rodriguez.6-May-03 5:49
Stephane Rodriguez.6-May-03 5:49 
GeneralRe: Split the file Pin
Kant6-May-03 6:12
Kant6-May-03 6:12 
GeneralRe: Split the file Pin
Stephane Rodriguez.6-May-03 6:40
Stephane Rodriguez.6-May-03 6:40 
GeneralRe: Split the file Pin
Kant6-May-03 6:54
Kant6-May-03 6:54 
GeneralRe: Split the file Pin
Stephane Rodriguez.6-May-03 6:59
Stephane Rodriguez.6-May-03 6:59 
Questionhow to write C# Applet, display it in a web page and the requirement? Pin
zoltix6-May-03 2:36
zoltix6-May-03 2:36 
AnswerRe: how to write C# Applet, display it in a web page and the requirement? Pin
Stephane Rodriguez.6-May-03 6:45
Stephane Rodriguez.6-May-03 6:45 
GeneralRe: how to write C# Applet, display it in a web page and the requirement? Pin
Anonymous6-May-03 11:49
Anonymous6-May-03 11:49 
GeneralRe: how to write C# Applet, display it in a web page and the requirement? Pin
zoltix6-May-03 11:51
zoltix6-May-03 11:51 
AnswerRe: how to write C# Applet, display it in a web page and the requirement? Pin
Paresh Gheewala6-May-03 6:52
Paresh Gheewala6-May-03 6:52 

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.