[Mono-osx] Make a window without titlebar and border

Miguel de Icaza miguel at xamarin.com
Thu Aug 18 15:55:00 EDT 2011


Hello,

    I am pretty sure that you have to set this on the initial call to the
constructor, so make sure that you call from whatever constructor you pick
the proper base constructor for NSWindow with the proper parameters.

Miguel

On Thu, Aug 18, 2011 at 10:53 AM, De Santis Luca <farolfo at hotmail.com>wrote:

>  Hi, I'm try make a window without border and title bar with Monomac. I've
> read a this thread on stackoverflow:
>
> http://stackoverflow.com/questions/2018147/hide-nswindow-title-bar
>
> I created a simple project with MonoDevelop and I tried to set the value of
> StyleMask property like the thread on stackoverflow, but it dosen't work.
> Someone can help me with this problem ?
>
> Thank you
>
> using System;
> using System.Collections.Generic;
> using System.Linq;
> using MonoMac.Foundation;
> using MonoMac.AppKit;
>
> namespace QuickTime.Mac.VideoPlayer
> {
> public partial class MainWindow : MonoMac.AppKit.NSWindow
> {
> #region Constructors
>
> // Called when created from unmanaged code
> public MainWindow (IntPtr handle) : base(handle)
> {
> Initialize ();
> }
>
> // Called when created directly from a XIB file
> [Export("initWithCoder:")]
> public MainWindow (NSCoder coder) : base(coder)
> {
> Initialize ();
> }
>
> // Shared initialization code
> void Initialize ()
> {
> this.StyleMask=NSWindowStyle.Borderless;
> }
>  #endregion
> }
> }
>
> Sorry for my bad english and if question is stupid but I use Mono only with
> GTK and Winform and I don't know Cocoa very well
>
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110818/b7452cbb/attachment.html 


More information about the Mono-osx mailing list