mail-archives/mono-osx/2011-August/004484.html

129 строки
5.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-osx] Make a window without titlebar and border
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20Make%20a%20window%20without%20titlebar%20and%20border&In-Reply-To=DUB111-W5360C36CFA6F73666CC7B1B02B0%40phx.gbl">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="004483.html">
<LINK REL="Next" HREF="004488.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-osx] Make a window without titlebar and border</H1>
<B>Miguel de Icaza</B>
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20Make%20a%20window%20without%20titlebar%20and%20border&In-Reply-To=DUB111-W5360C36CFA6F73666CC7B1B02B0%40phx.gbl"
TITLE="[Mono-osx] Make a window without titlebar and border">miguel at xamarin.com
</A><BR>
<I>Thu Aug 18 15:55:00 EDT 2011</I>
<P><UL>
<LI>Previous message: <A HREF="004483.html">[Mono-osx] Make a window without titlebar and border
</A></li>
<LI>Next message: <A HREF="004488.html">[Mono-osx] Make a window without titlebar and border
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4484">[ date ]</a>
<a href="thread.html#4484">[ thread ]</a>
<a href="subject.html#4484">[ subject ]</a>
<a href="author.html#4484">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">farolfo at hotmail.com</A>&gt;wrote:
&gt;<i> Hi, I'm try make a window without border and title bar with Monomac. I've
</I>&gt;<i> read a this thread on stackoverflow:
</I>&gt;<i>
</I>&gt;<i> <A HREF="http://stackoverflow.com/questions/2018147/hide-nswindow-title-bar">http://stackoverflow.com/questions/2018147/hide-nswindow-title-bar</A>
</I>&gt;<i>
</I>&gt;<i> I created a simple project with MonoDevelop and I tried to set the value of
</I>&gt;<i> StyleMask property like the thread on stackoverflow, but it dosen't work.
</I>&gt;<i> Someone can help me with this problem ?
</I>&gt;<i>
</I>&gt;<i> Thank you
</I>&gt;<i>
</I>&gt;<i> using System;
</I>&gt;<i> using System.Collections.Generic;
</I>&gt;<i> using System.Linq;
</I>&gt;<i> using MonoMac.Foundation;
</I>&gt;<i> using MonoMac.AppKit;
</I>&gt;<i>
</I>&gt;<i> namespace QuickTime.Mac.VideoPlayer
</I>&gt;<i> {
</I>&gt;<i> public partial class MainWindow : MonoMac.AppKit.NSWindow
</I>&gt;<i> {
</I>&gt;<i> #region Constructors
</I>&gt;<i>
</I>&gt;<i> // Called when created from unmanaged code
</I>&gt;<i> public MainWindow (IntPtr handle) : base(handle)
</I>&gt;<i> {
</I>&gt;<i> Initialize ();
</I>&gt;<i> }
</I>&gt;<i>
</I>&gt;<i> // Called when created directly from a XIB file
</I>&gt;<i> [Export(&quot;initWithCoder:&quot;)]
</I>&gt;<i> public MainWindow (NSCoder coder) : base(coder)
</I>&gt;<i> {
</I>&gt;<i> Initialize ();
</I>&gt;<i> }
</I>&gt;<i>
</I>&gt;<i> // Shared initialization code
</I>&gt;<i> void Initialize ()
</I>&gt;<i> {
</I>&gt;<i> this.StyleMask=NSWindowStyle.Borderless;
</I>&gt;<i> }
</I>&gt;<i> #endregion
</I>&gt;<i> }
</I>&gt;<i> }
</I>&gt;<i>
</I>&gt;<i> Sorry for my bad english and if question is stupid but I use Mono only with
</I>&gt;<i> GTK and Winform and I don't know Cocoa very well
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> Mono-osx mailing list
</I>&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">Mono-osx at lists.ximian.com</A>
</I>&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">http://lists.ximian.com/mailman/listinfo/mono-osx</A>
</I>&gt;<i>
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://lists.ximian.com/pipermail/mono-osx/attachments/20110818/b7452cbb/attachment.html">http://lists.ximian.com/pipermail/mono-osx/attachments/20110818/b7452cbb/attachment.html</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="004483.html">[Mono-osx] Make a window without titlebar and border
</A></li>
<LI>Next message: <A HREF="004488.html">[Mono-osx] Make a window without titlebar and border
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4484">[ date ]</a>
<a href="thread.html#4484">[ thread ]</a>
<a href="subject.html#4484">[ subject ]</a>
<a href="author.html#4484">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx">More information about the Mono-osx
mailing list</a><br>
</body></html>