Archives

Archives / 2003
  • Availability of Office 2003 schemas

    Some office products (Word, Excel, InfoPath) are over the years transformed into full blown XML supporting products. Important in working with XML with these products is the schema used for the XML. Microsoft released a download (as a present for "Sinterklaas" on dec 5) that contains the Microsoft Office 2003 XML Reference Schemas and related documentation.

    In their own words it contains:

    • Overview articles on WordprocessingML (the XML file format for Microsoft Office Word 2003), SpreadsheetML (Microsoft Office Excel 2003) and FormTemplate XML schemas (Microsoft Office InfoPath 2003).
    • Reference documentation on the Microsoft Office 2003 schemas, detailing every element and types.

    It can be downloaded at http://www.microsoft.com/downloads/details.aspx?FamilyID=fe118952-3547-420a-a412-00a2662442d9&DisplayLang=en

  • Microsoft rumours: Did you know that...

    Rumours from the battlefield... Did you know that:

    • Although the Yukon release is still very beta, the core is quite solid
    • That CLR support into T-SQL is already working for years
    • That Visual Studio is often NOT used within Microsoft itself by its developers, projects are way too big
    • But that Visual Studio is used for debugging ;-)
    • That for editing often Slickedit 8.0 is used (seems to support code completion...): during PDC presentations often used!
    • That Whidbey contains a new build system (MSBuild) that works a bit like (N)Ant
    • But that within Microsoft a bit older build system is often still in use, that was also available within the Shared Source implementation of the .Net framework named Rotor
    • That XMLSpy an often used tool within Microsoft is (especially within the Yukon group)

    This info may be true... or not. It is just from hear-say...

  • Memory usage in your ASP.NET app

    At the PDC I saw a presentation where some optimization tips on memory usage in ASP.NET pages were given. The performance monitor was used to look at Gen 0, Gen 1 en Gen 2 usage of the garbage collector. The example was using a StringBuilder class to combine data and write this out versus using direct writes using Response.Write (which was much faster and consumes less memory). I am wondering if there are any good tools to look at memory consumption and garbage collection on a high-load website... Anyone?

  • Longhorn: WinFS looks cool!

    The WinFS data storage system used in Longhorn seems cool... A short list of some powerful features:

    • There is a concept of Items and relations between Items
    • An Item is something like a file, a folder, a contact, or a user defined type
    • There are two types of relations: holding relationships and reference relationships
    • With holding relationship you can model the well known folder hierarchy, but also much more because an item can be "hold" in more than one relationship (although cycles in the "hold" graph are not permitted)
    • An item has a reference count of its holding relationships. When it has no more references it is removed from the store.
    • Security is on Item level (which could indicate that Yukon, presumably the storage engine in a slimmed down version, has row level security)
    • Every store Item has an unique ID that identifies the Item in the store (although not guaranteed over multiple stores)
    • WinFS supports: Asynchrony (multiple queries and data retrieval at the same time), Transactions, Notifications (on Item changes, relation changes, and many more subtile things going on), Blob/stream support, Cursoring and paging (a query can result into many Items!)
    • A powerful API is available to interogate the store
    • Within the API powerful querying and filtering functionality is available
    • Also direct SQL queries can be executed on the store for really powerful aggregation and grouping

    For more info have look at the Longhorn SDK section on WinFS: http://longhorn.msdn.microsoft.com/lhsdk/winfs/daovrWelcomeToWinFS.aspx

    For a more conceptual view: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaero/html/wux_topic_storage.asp

  • Whidbey: refactoring in the VS IDE

    One of the real cool new features in the Whidbey source code editor is the refactoring functionality. This is something you want today if you have to rewrite parts of a large codebase.

    The following refactoring functionality is available:

    Rename: select a symbol to rename, specifiy a new name and everywhere this name is used in your project it is renamed.

    Change signature: here you can do one of the following actions:

    Reorder parameters
    Remove parameters
    Add a parameter
    Rename a parameter
    Rename a method
    Change a parameter type

    Extract method: select a piece of code and seperate it into a method that is called instead.

    Extract interface: given a class, select the methods and properties you want to be available in your interface and specify an interface name and a new interface is created and your class automatically implements it.

    Encapsulate field: select a field in your class, and encapsulate it as a property. All references to this property are also automatically updated. In this update you can select if you only want the external references or all references to be updated. It is a pity that not all approaches as described in Martin Fowlers book "Refactoring" are implemented, like promoting a method to it's base class or demoting a method to a derived class. However it is a big step forward directly available from the IDE you work in.

    The cool thing is that much of this functionality is also available in the diagram view (UML) of the code.

  • SharePoint 2003 RTM!?!

    Heard some rumours today that SharePoint is out!!! Don't know if it is only WSS, or SPS as well. Seems to be available on download site for the big companies that have a corprate license with M$. Not on MSDN yet, will be there soon. I heard of a release date of oktober 1, 2003.

  • SharePoint 2003 tip: Removing malicious web parts from a web part page

    Ever imported a web part into WSS/SPS, added it to a web part page and regretted it because it messed up your web part page? I did! Today a collegue told me the trick (thanks Dirk!):

    Enter the following URL in your browser:

    http://servername/_layouts/1033/spcontnt.aspx?PageView=Shared&url=urlofpage

    You now get an overview of all web parts on the page and can perform administrative tasks on them.

    I also messed up my portal homepage, but couldn't get it working here! Any ideas?

  • PDCBloggers... ?#@!?

    So funny what kind of sites people come up with. Just stumbled over http://www.pdcbloggers.com, a site with blogging people going to the PDC. Well, I'm one of them... so I registered.

  • Windows disk full trouble...

    On my laptop I was constantly running out of diskspace. All the time I compressed everything I could, but I kept running out of diskspace. I was getting really pissed why this was happening so I searched my disk for big files. The Windows temp directory on my Windows Server 2003 (c:\windows\temp) was full of 100MB big files, and they kept comming. I wondered which application was creating them, so I used filemon.exe from http://www.sysinternals.com. A great utility to monitor all disk access. It happened to be the dw20.exe application, an error reporting application from Office 2003 (which is also installed on my machine!). After searching Google (searching at Microsoft makes no sense!) I found a link to an article at http://www.microsoft.com/office/ork/xp/beta/five/ch19/MntB02.htm. It describes how to turn off error reporting (don't know what is going wrong, everything seems to work, but errors kep getting generated I think).

    I tried to follow their directions, but could not find the mentioned Group Policy Object Editor. Finally found it: execute mmc.exe from run... Do Add/Remove snap-in, select Add and select “Group Policy Object Editor“. Now follow the instruction in the article, and set Disable error reporting to Enabled. Now error reporting is disabled! The registry settings also described in the article did not work for me...

    Finally I can get back to developing again!

     

  • WSS documentation on MSDN seems RTM

    I am already programming on WSS/SPS2 for a few months, but I was missing a lot of documentation on it. A lot of sections in the documentation were still empty or incomplete. But he, that is the fun in programming on beta software. The online documentation on MSDN on WSS seams to be updated to the RTM version, it is now much more complete!!

    Start at http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28001891&frame=true for all online documentation on the new SharePoint platform!

  • Pragmatic ADO.NET...

    I by a lot of books. Not to read from cover to cover, more to skim through, and then use as a reference. Once in a while I read a book from cover to cover, especially if I am enjoying a luxuous vacation in our house in Italy. Writing from my vacation address (and it really has been a while that I posted something here) I would like to point you to a book I just finished: Pragmatic ADO.NET, by Shawn Wildermuth. Great introduction to ADO.NET with clear examples and not to thick!! I hate those 2 Kg Wrox books with elaborate, not to the point, example code. This books gives you a flying start.

    At amazon: http://www.amazon.com/exec/obidos/tg/detail/-/0201745682/qid=1062338918/sr=8-1/ref=sr_8_1/102-7329001-1451305?v=glance&s=books&n=507846

    Also have a look at the writers site at http://www.adoguy.com

  • Using IE within a Windows Forms application

    Changed this blog posting into an article. It's just too long for a post, and might be handy to keep around...

    Everytime I'm busy with something I think: hmmm, would be nice to share this.. but one way or the other the time just isn't there. I will try harder...

    I'm working on a simple windows forms app to browse some of the hierarchies of SharePoint Portal Server 2003, and besides a tree control on the left side  I needed a browser control at the right side to display some detail information in HTML. Of course you can add the Internet Explorer dll shdocvw.dll to the toolbox so a wrapper is generated... but there are some problems left like what values to pass for all those parameters and how do I handle events that are raised.

    One of the .Net world famous programmers Lutz Roeder, developer of Reflector (http://www.aisto.com/roeder/dotnet) did write a class encapsulating the Internet Explorer Active-X control that is used in Reflector. Although he did not publish the source code (as far as I know), this file came on the web one way or the other. I found it at the following link:

    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=%23%2487PZ4pBHA.1860%40tkmsftngp04&rnum=8

    The code follows below, together with some code how to use it....


    // Lutz Roeders's .NET Reflector, October 2000. // Copyright (C) 2000-2002 Lutz Roeder. All rights reserved. // http://www.aisto.com/roeder/dotnet namespace Reflector.Library { using System; using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; public class HtmlBrowser : AxHost, IWebBrowserEvents { public event BrowserNavigateEventHandler BeforeNavigate; public event BrowserNavigateEventHandler NavigateComplete; IWebBrowser control = null; ConnectionPointCookie cookie; Boolean activate = false; String url = String.Empty; String html = String.Empty; String body = String.Empty; public HtmlBrowser() : base("8856f961-340a-11d0-a96b-00c04fd705a2") { HandleCreated += new EventHandler(Me_HandleCreated); NavigateComplete += new BrowserNavigateEventHandler(Me_NavigateComplete); } public void Activate() { activate = true; } public void Navigate(string url) { if (!IsHandleCreated) { this.url = url; return; } Object flags = 0; Object targetFrame = String.Empty; Object postData = String.Empty; Object headers = String.Empty; control.Navigate(url, ref flags, ref targetFrame, ref postData, ref headers); } public void SetHtmlText(string text) { this.html = text; } public void SetBodyText(string text) { if (control != null) { IHTMLDocument2 document = control.GetDocument(); if (document != null) { IHTMLElement body = document.GetBody(); if (body != null) { if (activate) DoVerb(-4); body.SetInnerHTML(text); return; } } } this.body = text; } void Me_HandleCreated(Object s, EventArgs e) { HandleCreated -= new EventHandler(Me_HandleCreated); if (url == String.Empty) { url = Path.GetTempFileName(); StreamWriter writer = new StreamWriter(url, false); writer.WriteLine(html); writer.Flush(); writer.Close(); } Navigate(url); } void Me_NavigateComplete(Object s, BrowserNavigateEventArgs e) { if (activate) DoVerb(-4); if (html != String.Empty) { File.Delete(url); this.html = String.Empty; } if (body != String.Empty) { SetBodyText(body); this.body = String.Empty; } } protected override void CreateSink() { try { cookie = new ConnectionPointCookie(GetOcx(), this, typeof(IWebBrowserEvents)); } catch { } } protected override void DetachSink() { try { cookie.Disconnect(); } catch { } } protected override void AttachInterfaces() { try { control = (IWebBrowser) GetOcx(); } catch { } } protected override Boolean IsInputKey(Keys keyData) { return (keyData == Keys.Escape) ? false : base.IsInputKey(keyData); } public void RaiseBeforeNavigate(String url, int flags, String targetFrameName, ref Object postData, String headers, ref Boolean cancel) { BrowserNavigateEventArgs e = new BrowserNavigateEventArgs(url, false); if (BeforeNavigate != null) BeforeNavigate(this, e); cancel = e.Cancel; } public void RaiseNavigateComplete(String url) { BrowserNavigateEventArgs e = new BrowserNavigateEventArgs(url, false); if (NavigateComplete != null) NavigateComplete(this, e); } } [Guid("eab22ac2-30c1-11cf-a7eb-0000c05bae0b"), InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface IWebBrowserEvents { [DispId(100)] void RaiseBeforeNavigate(String url, int flags, String targetFrameName, ref Object postData, String headers, ref Boolean cancel); [DispId(101)] void RaiseNavigateComplete(String url); } public delegate void BrowserNavigateEventHandler(Object s, BrowserNavigateEventArgs e); public class BrowserNavigateEventArgs { String url; Boolean cancel; public BrowserNavigateEventArgs(String url, Boolean cancel) { this.url = url; this.cancel = cancel; } public String Url { get { return url; } } public Boolean Cancel { set { cancel = value; } get { return cancel; } } } [Guid("eab22ac1-30c1-11cf-a7eb-0000c05bae0b")] interface IWebBrowser { void GoBack(); void GoForward(); void GoHome(); void GoSearch(); void Navigate(String Url, ref Object Flags, ref Object targetFrame, ref Object postData, ref Object headers); void Refresh(); void Refresh2(); void Stop(); void GetApplication(); void GetParent(); void GetContainer(); [return: MarshalAs(UnmanagedType.Interface)] IHTMLDocument2 GetDocument(); } [Guid("332C4425-26CB-11D0-B483-00C04FD90119"), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual), ComVisible(true)] interface IHTMLDocument2 { [return: MarshalAs(UnmanagedType.Interface)] Object GetScript(); [return: MarshalAs(UnmanagedType.Interface)] Object GetAll(); [return: MarshalAs(UnmanagedType.Interface)] IHTMLElement GetBody(); [return: MarshalAs(UnmanagedType.Interface)] Object GetActiveElement(); [return: MarshalAs(UnmanagedType.Interface)] Object GetImages(); [return: MarshalAs(UnmanagedType.Interface)] Object GetApplets(); [return: MarshalAs(UnmanagedType.Interface)] Object GetLinks(); [return: MarshalAs(UnmanagedType.Interface)] Object GetForms(); [return: MarshalAs(UnmanagedType.Interface)] Object GetAnchors(); void SetTitle([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetTitle(); [return: MarshalAs(UnmanagedType.Interface)] Object GetScripts(); void SetDesignMode([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetDesignMode(); [return: MarshalAs(UnmanagedType.Interface)] Object GetSelection(); [return: MarshalAs(UnmanagedType.BStr)] String GetReadyState(); [return: MarshalAs(UnmanagedType.Interface)] Object GetFrames(); [return: MarshalAs(UnmanagedType.Interface)] Object GetEmbeds(); [return: MarshalAs(UnmanagedType.Interface)] Object GetPlugins(); void SetAlinkColor([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetAlinkColor(); void SetBgColor([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetBgColor(); void SetFgColor([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetFgColor(); void SetLinkColor([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetLinkColor(); void SetVlinkColor([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetVlinkColor(); [return: MarshalAs(UnmanagedType.BStr)] String GetReferrer(); [return: MarshalAs(UnmanagedType.Interface)] Object GetLocation(); [return: MarshalAs(UnmanagedType.BStr)] String GetLastModified(); void SetURL([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetURL(); void SetDomain([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetDomain(); void SetCookie([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetCookie(); void SetExpando([In, MarshalAs(UnmanagedType.Bool)] Boolean p); [return: MarshalAs(UnmanagedType.Bool)] Boolean GetExpando(); void SetCharset([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetCharset(); void SetDefaultCharset([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetDefaultCharset(); [return: MarshalAs(UnmanagedType.BStr)] String GetMimeType(); [return: MarshalAs(UnmanagedType.BStr)] String GetFileSize(); [return: MarshalAs(UnmanagedType.BStr)] String GetFileCreatedDate(); [return: MarshalAs(UnmanagedType.BStr)] String GetFileModifiedDate(); [return: MarshalAs(UnmanagedType.BStr)] String GetFileUpdatedDate(); [return: MarshalAs(UnmanagedType.BStr)] String GetSecurity(); [return: MarshalAs(UnmanagedType.BStr)] String GetProtocol(); [return: MarshalAs(UnmanagedType.BStr)] String GetNameProp(); void DummyWrite([In, MarshalAs(UnmanagedType.I4)] int psarray); void DummyWriteln([In, MarshalAs(UnmanagedType.I4)] int psarray); [return: MarshalAs(UnmanagedType.Interface)] Object Open([In, MarshalAs(UnmanagedType.BStr)] String URL, [In, MarshalAs(UnmanagedType.Struct)] Object name, [In, MarshalAs(UnmanagedType.Struct)] Object features, [In, MarshalAs(UnmanagedType.Struct)] Object replace); void Close(); void Clear(); [return: MarshalAs(UnmanagedType.Bool)] Boolean QueryCommandSupported([In, MarshalAs(UnmanagedType.BStr)] String cmdID); [return: MarshalAs(UnmanagedType.Bool)] Boolean QueryCommandEnabled([In, MarshalAs(UnmanagedType.BStr)] String cmdID); [return: MarshalAs(UnmanagedType.Bool)] Boolean QueryCommandState([In, MarshalAs(UnmanagedType.BStr)] String cmdID); [return: MarshalAs(UnmanagedType.Bool)] Boolean QueryCommandIndeterm([In, MarshalAs(UnmanagedType.BStr)] String cmdID); [return: MarshalAs(UnmanagedType.BStr)] String QueryCommandText([In, MarshalAs(UnmanagedType.BStr)] String cmdID); [return: MarshalAs(UnmanagedType.Struct)] Object QueryCommandValue([In, MarshalAs(UnmanagedType.BStr)] String cmdID); [return: MarshalAs(UnmanagedType.Bool)] Boolean ExecCommand([In, MarshalAs(UnmanagedType.BStr)] String cmdID, [In, MarshalAs(UnmanagedType.Bool)] Boolean showUI, [In, MarshalAs(UnmanagedType.Struct)] Object value); [return: MarshalAs(UnmanagedType.Bool)] Boolean ExecCommandShowHelp([In, MarshalAs(UnmanagedType.BStr)] String cmdID); [return: MarshalAs(UnmanagedType.Interface)] Object CreateElement([In, MarshalAs(UnmanagedType.BStr)] String eTag); void SetOnhelp([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnhelp(); void SetOnclick([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnclick(); void SetOndblclick([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOndblclick(); void SetOnkeyup([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnkeyup(); void SetOnkeydown([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnkeydown(); void SetOnkeypress([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnkeypress(); void SetOnmouseup([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnmouseup(); void SetOnmousedown([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnmousedown(); void SetOnmousemove([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnmousemove(); void SetOnmouseout([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnmouseout(); void SetOnmouseover([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnmouseover(); void SetOnreadystatechange([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnreadystatechange(); void SetOnafterupdate([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnafterupdate(); void SetOnrowexit([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnrowexit(); void SetOnrowenter([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnrowenter(); void SetOndragstart([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOndragstart(); void SetOnselectstart([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnselectstart(); [return: MarshalAs(UnmanagedType.Interface)] Object ElementFromPoint([In, MarshalAs(UnmanagedType.I4)] int x, [In, MarshalAs(UnmanagedType.I4)] int y); [return: MarshalAs(UnmanagedType.Interface)] Object GetParentWindow(); // IHTMLWindow2 [return: MarshalAs(UnmanagedType.Interface)] Object GetStyleSheets(); void SetOnbeforeupdate([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnbeforeupdate(); void SetOnerrorupdate([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnerrorupdate(); [return: MarshalAs(UnmanagedType.BStr)] String toString(); [return: MarshalAs(UnmanagedType.Interface)] Object CreateStyleSheet([In, MarshalAs(UnmanagedType.BStr)] String bstrHref, [In, MarshalAs(UnmanagedType.I4)] int lIndex); } [Guid("3050F1FF-98B5-11CF-BB82-00AA00BDCE0B"), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual), ComVisible(true)] interface IHTMLElement { void SetAttribute([In, MarshalAs(UnmanagedType.BStr)] String strAttributeName, [In, MarshalAs(UnmanagedType.Struct)] Object AttributeValue, [In, MarshalAs(UnmanagedType.I4)] int lFlags); void GetAttribute([In, MarshalAs(UnmanagedType.BStr)] String strAttributeName, [In, MarshalAs(UnmanagedType.I4)] int lFlags, [Out, MarshalAs(UnmanagedType.LPArray)] Object[] pvars); [return: MarshalAs(UnmanagedType.Bool)] Boolean RemoveAttribute([In, MarshalAs(UnmanagedType.BStr)] String strAttributeName, [In, MarshalAs(UnmanagedType.I4)] int lFlags); void SetClassName([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetClassName(); void SetId([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetId(); [return: MarshalAs(UnmanagedType.BStr)] String GetTagName(); [return: MarshalAs(UnmanagedType.Interface)] IHTMLElement GetParentElement(); [return: MarshalAs(UnmanagedType.Interface)] Object GetStyle(); // IHTMLStyle void SetOnhelp([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnhelp(); void SetOnclick([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnclick(); void SetOndblclick([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOndblclick(); void SetOnkeydown([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnkeydown(); void SetOnkeyup([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnkeyup(); void SetOnkeypress([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnkeypress(); void SetOnmouseout([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnmouseout(); void SetOnmouseover([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnmouseover(); void SetOnmousemove([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnmousemove(); void SetOnmousedown([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnmousedown(); void SetOnmouseup([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnmouseup(); [return: MarshalAs(UnmanagedType.Interface)] Object GetDocument(); void SetTitle([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetTitle(); void SetLanguage([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetLanguage(); void SetOnselectstart([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnselectstart(); void ScrollIntoView([In, MarshalAs(UnmanagedType.Struct)] Object varargStart); [return: MarshalAs(UnmanagedType.Bool)] Boolean Contains([In, MarshalAs(UnmanagedType.Interface)] IHTMLElement pChild); [return: MarshalAs(UnmanagedType.I4)] int GetSourceIndex(); [return: MarshalAs(UnmanagedType.Struct)] Object GetRecordNumber(); void SetLang([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetLang(); [return: MarshalAs(UnmanagedType.I4)] int GetOffsetLeft(); [return: MarshalAs(UnmanagedType.I4)] int GetOffsetTop(); [return: MarshalAs(UnmanagedType.I4)] int GetOffsetWidth(); [return: MarshalAs(UnmanagedType.I4)] int GetOffsetHeight(); [return: MarshalAs(UnmanagedType.Interface)] IHTMLElement GetOffsetParent(); void SetInnerHTML([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetInnerHTML(); void SetInnerText([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetInnerText(); void SetOuterHTML([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetOuterHTML(); void SetOuterText([In, MarshalAs(UnmanagedType.BStr)] String p); [return: MarshalAs(UnmanagedType.BStr)] String GetOuterText(); void InsertAdjacentHTML([In, MarshalAs(UnmanagedType.BStr)] String where, [In, MarshalAs(UnmanagedType.BStr)] String html); void InsertAdjacentText([In, MarshalAs(UnmanagedType.BStr)] String where, [In, MarshalAs(UnmanagedType.BStr)] String text); [return: MarshalAs(UnmanagedType.Interface)] IHTMLElement GetParentTextEdit(); [return: MarshalAs(UnmanagedType.Bool)] Boolean GetIsTextEdit(); void Click(); [return: MarshalAs(UnmanagedType.Interface)] Object GetFilters(); void SetOndragstart([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOndragstart(); [return: MarshalAs(UnmanagedType.BStr)] String toString(); void SetOnbeforeupdate([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnbeforeupdate(); void SetOnafterupdate([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnafterupdate(); void SetOnerrorupdate([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnerrorupdate(); void SetOnrowexit([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnrowexit(); void SetOnrowenter([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnrowenter(); void SetOndatasetchanged([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOndatasetchanged(); void SetOndataavailable([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOndataavailable(); void SetOndatasetcomplete([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOndatasetcomplete(); void SetOnfilterchange([In, MarshalAs(UnmanagedType.Struct)] Object p); [return: MarshalAs(UnmanagedType.Struct)] Object GetOnfilterchange(); [return: MarshalAs(UnmanagedType.Interface)] Object GetChildren(); [return: MarshalAs(UnmanagedType.Interface)] Object GetAll(); } }

    And now some example code describing how to use it... I created a window with a tree control at the left, the Internet Explorer at the right and a splitter in the middle so the controls can be resized dynamically...


    using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Threading; using Reflector.Library; namespace SPS2Admin { ///  /// Summary description for SPS2Admin. ///  public class SPS2Admin : System.Windows.Forms.Form { ///  /// An Internet Explorer embedded browser instance is used for displaying detail information. ///  private HtmlBrowser _htmlBrowser; ///  /// The tree for navigating SPS structures. ///  private TreeView spsTree; private System.Windows.Forms.MainMenu mainMenu; private System.Windows.Forms.MenuItem menuItemFile; private System.Windows.Forms.MenuItem menuItemView; private System.Windows.Forms.MenuItem menuItemFileConnect; private System.Windows.Forms.MenuItem menuItemFileExit; private System.Windows.Forms.MenuItem menuItemViewWebs; private System.Windows.Forms.MenuItem menuItemCurrentCredentials; private System.Windows.Forms.MenuItem menuItemCreateProgram; private System.Windows.Forms.MenuItem menuItemNavigator; ///  /// Required designer variable. ///  private System.ComponentModel.Container components = null; public SPS2Admin() { // // Required for Windows Form Designer support // InitializeComponent(); _htmlBrowser = new HtmlBrowser(); _htmlBrowser.Parent = this; _htmlBrowser.Dock = DockStyle.Fill; Splitter split = new Splitter(); split.Parent = this; split.Dock = DockStyle.Left; split.BackColor = SystemColors.Control; spsTree = new TreeView(); spsTree.Parent = this; spsTree.Dock = DockStyle.Left; _htmlBrowser.Navigate("http://www.macaw.nl"); } : : } }


    I did display only some relevant part of the code... this should do the job, no "design time" control, but hey.. who needs that!

    Update:
    I got a solution from Julien CHEYSSIAL to resolve the problem concerning controls like textbox,
    combobox which were displayed with the old looking style while using the WebBrowser in a Windows Form application. You have to add this meta in the head section of your pages : <META HTTP-EQUIV="MSThemeCompatible" Content="Yes">. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/whatsnewpublicpreview.asp and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/userex/cookbook.asp for more info.



  • Quick references...

    All those 600+ pages books are (often) really great to delve into a subject, but sometimes you just want to travel light and just need the reference card, like when you want to do that multiline regexp replacement in Vi.... Have a look at the following site:

    http://www.digilife.be/quickreferences/indexe.html

    But I still did not found the ultimate .Net reference cards... any suggestions?

  • SharePoint Portal Server 2003 - Beta 2

    We just finished a big presentation at the Dutch Microsoft office about the upcomming SharePoint Portal Server 2003 based on the Beta 1. A lot of people were impressed by the new capabilities. In my opinion it is really a step forward in portal software... great collaboration features, everything .NET based, full object model and webservices for development. In the introduction by Microsoft was announced that today (March 10, 2003) the public beta becomes available. After the presentation I directly started the download of the public beta (Beta 2) and I am currently waiting for the download to finish. I can now start writing about it, so there will be more to come at this place in the near future!

    See http://www.microsoft.com/sharepoint/ for more information and download of SharePoint Products and Technologies Beta 2.

  • Such a pity...

    So much to write about, but shit it's under non-disclosure. Working on Sharepoint Portal Server V2 now. As soon as the public beta comes out (probably half of march) I will post my findings here. Cool thing is that finally you can do some decent development for it using .NET!!! Something else I received yesterday in the post (although I already downloaded it) is the new beta for Exchange Server 2003 (Titanium). I love the new Outlook Web Access (OWA) interface... it's also in the Web Storage System delivered with SPS2. Much more like the real outlook, but working in a browser. Will take some time before I will start on Titanium, I will probably need another harddisk for my laptop to test that one out (probably want work together with SPS2).

    Microsoft is smart: both SPS2 and Exchange 2003 only run on Windows server 2003 (.NET server). People have to move over to this new sever platform, although I think most companies are not up to it yet, they just moved to Windows 2000 server!

  • Research@Microsoft

    One of those sites that I check once in a while is http://research.microsoft.com. Microsoft Research employed a large amount of researchers from great companies like AT&T and famous universities. If you look at their site it is fun to see that documents are delivered in Postscript format, and projects use programming languages like Perl and Python. A lot of research done if very fundamental research... have a look at it, and be amazed that Miccysoft isn't only about commercial products like Windows and Office.

  • www.niftyportal.com

    A shameless plug for a site built by a very talented collegue, Teun Duynstee. It is a "personal newsroom" where you can aggregate multiple RSS feeds within a browser window. Check it out, might be handy to read your favorite blogs...

  • The .NET MacawWebDAVClient library...

    For a project we are implementing a WebDAV client library for talking to Sharepoint Portal Server 2001 and Exchange public folders. We did only implement the most neccesary things and skipped things like locking. We did not find a use for this functionalilty yet, and we are only implementing what we need. It's working pretty well.

    We have great support for access to WebDAV search that we used for MacawDynaList, a document list viewer used for replacing all those lists in Sharepoint with something really powerful. The search has full support for paging sorting etcetera and can return results directly in a dataset so no transformation on the resulting XML is needed. Something else I really like is the easy of programming by mapping CLR types to the Exchange/Sharepoint WebDAV types. This makes it very easy to do proppatch/propfind commands and interpret the results..

    Let me know if there is any interest in such a library. We use it for searching and publising information to Sharepoint and Exchange.

  • Movies...

    Had my good friend Paul over for dinner tonight. We were talking about one of his big hobbies: movies. He showed me a great movie site, The Internet Movie Database: http://www.imdb.com. Most of you will probably know this site already, but I had never heard about it. I especially love the the sections "trivia" and "goofs" under the Fun Stuff. Also funny to look for someone you know who ever did something with movies (even catering)... everyone is in there!!!

  • Let the Blog begin....

    This is my first weblog entry ever! Until now I was spamming my collegues with my thoughts. They were not always happy with it, complaining about all those "useless" mails they receive. Problem is that not everyone is interested in every subject. We adopted a kind of namespacing on our general e-mails like: [FORMS] How to do bla bla bla... which helped, although we had some strange namespaces appearing. For me blogging seems to be the solution to three problems at the same time:

    • I don't have to spam my collegues anymore with my thoughts
    • I (hopefully) have a wider audience "listening" to my spam, resulting in more feedback (often you are the only within a company busy with exactly that specific topic)
    • My "spam" is not lost, but gets arhcived automatically so i can read back my own thoughts and responses on them.

    I hope that you readers will benefit from my thoughts and information, and I really apreciate any feedback!!!!

    Serge van den Oever
    Specialist developer
    The Netherlands
    Macaw - http://www.macaw.nl

    Disclaimer: All information shared here is my personal opinion, not neccesarely that of the company I work for.