<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
I've try with this code but with this simple class:<div><br></div><div><div>using System;</div><div>using System.Drawing;</div><div>using MonoMac.Foundation;</div><div>using MonoMac.AppKit;</div><div>using MonoMac.ObjCRuntime; </div><div><br></div><div>static class Program</div><div>        {      </div><div><span class="Apple-tab-span" style="white-space:pre">       </span></div><div><span class="Apple-tab-span" style="white-space:pre">             </span>static void Main (string[] args)</div><div>                {</div><div>                        MonoMac.AppKit.NSApplication.Init ();</div><div>                       </div><div>                        using (var p = new MonoMac.Foundation.NSAutoreleasePool ()) {</div><div>                                MonoMac.AppKit.NSApplication.SharedApplication.Delegate = new AppDelegate();</div><div>                                MonoMac.AppKit.NSApplication.Main(args);</div><div>                        }</div><div>                }</div><div>        }</div><div>       </div><div>        class AppDelegate : MonoMac.AppKit.NSApplicationDelegate</div><div>        {</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                     </span>MonoMac.AppKit.NSWindow app_window;</div><div><span class="Apple-tab-span" style="white-space:pre">  </span></div><div><span class="Apple-tab-span" style="white-space:pre">                     </span>public AppDelegate()</div><div><span class="Apple-tab-span" style="white-space:pre">                         </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                                    </span>app_window = new MonoMac.AppKit.NSWindow(new RectangleF(800,480,0,400),NSWindowStyle.Borderless,NSBackingStore.Buffered,true);</div><div><span class="Apple-tab-span" style="white-space:pre">                                       </span>app_window.MakeKeyAndOrderFront(this);</div><div><span class="Apple-tab-span" style="white-space:pre">                               </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">    </span></div><div>        }</div><div><br></div><div>But the application don't fint info.plist:</div><div><br></div><div>mono[1304:903] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting</div><div><br></div><div>How I can build a simple executable ora a .net dll like Linux or Windows without bundle structure ?</div><div><br></div><div>Luca  </div><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Subject: Re: [Mono-osx] Create window at runtime<br>From: troy-dawson@comcast.net<br>Date: Mon, 16 Jan 2012 15:31:53 -0800<br>CC: mono-osx@lists.ximian.com<br>To: farolfo@hotmail.com<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML"><div><div>On Jan 16, 2012, at 3:23 PM, De Santis Luca wrote:</div><blockquote><div dir="ltr"><div dir="ltr"><div style="font-family:'Calibri';color:#000000;font-size:12pt"><div><span id="ecxresult_box" lang="en"><font face="Arial"><span class="ecxhps">On the</span> <span class="ecxhps">other toolkits</span> <span class="ecxhps">like</span> <span class="ecxhps">GTK 
or</span> <span class="ecxhps">Winform</span> <span class="ecxhps">I can</span><span class="ecxhps"> </span><span class="ecxhps">create window </span><span class="ecxhps">at 
runtime</span><span>, they donít need of file like xib. I like</span> <span class="ecxhps">know if</span> on MonoMac I<span class="ecxhps"> can</span> <span class="ecxhps">make something like that, without load xib 
file.</span><br></font></span></div></div></div></div></blockquote><div><br></div></div>Sure.<div><br></div><div>NSWindow has a designated initializer that you can use to instantiate NSWindows (and subclasses of NSWindows) via a new call. Eg (AppWindow is a subclass of NSWindow):</div><div><br></div><div><div style="margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Monaco"><span class="ecxApple-tab-span" style="white-space:pre">           </span><span style="color:#1700ff">public</span> AppDelegate()</div><div style="margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Monaco"><span class="ecxApple-tab-span" style="white-space:pre">           </span>{</div><div style="margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Monaco"><span class="ecxApple-tab-span" style="white-space:pre">                       </span>app_window = <span style="color:#1700ff">new</span> AppWindow(<span style="color:#1700ff">new</span> RectangleF(<span style="color:#e800d6">100</span>,<span style="color:#e800d6">100</span>,<span style="color:#e800d6">600</span>,<span style="color:#e800d6">400</span>-<span style="color:#e800d6">44</span>));</div><div style="margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Monaco;min-height:16px"><br></div><div style="margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Monaco"><span class="ecxApple-tab-span" style="white-space:pre">                       </span>app_window.MakeKeyAndOrderFront(<span style="color:#1700ff">this</span>);</div><div style="margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Monaco"><span class="ecxApple-tab-span" style="white-space:pre">         </span>}</div><div style="margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Monaco;min-height:16px"><br></div></div></div></div>                                         </div></body>
</html>