MAPILab - Microsoft Outlook Add-ins and Software for Microsoft Exchange Server
EnglishGermanRussian

Example of work with Windows Forms

As another example of universality of MAPILab Spy for SharePoint, let`s review the operations with class System.Windows.Forms.Form.

Open new script window and modify text of method main the following way:

using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Windows.Forms;

public class Tester
{
	static object main(
		 MAPILab.SharePoint.Spy.CodeForm thisForm
		)
	{
		Form form = new Form();

		form.Text = "Hello from MAPILab Spy for SharePoint";

		FlowLayoutPanel layoutPanel = new FlowLayoutPanel();
		form.Controls.Add(layoutPanel);
		layoutPanel.Dock = DockStyle.Fill;

		TextBox textBox = new TextBox();
		textBox.Text = "Enter you name";
		layoutPanel.Controls.Add(textBox);

		Button button = new Button();
		button.Text = "Click Me!";
		layoutPanel.Controls.Add(button);

		form.Show();

		return form;
	}
}

The given program code creates new window, adds several controls in it, after that it is displayed using method Show() and returns reference to window object for further investigation. The result of script execution looks the following way:


Click to open real size screenshot

Here, pay attention that properties of created window may be changed. By changing properties (without closing anything), our window can be made to look the following way:


Click to open real size screenshot

MAPILab Spy for SharePoint downloaden Download 15-days trial version MAPILab Spy for SharePoint (3930 KB):
 Primary server
 Secondary server
MAPILab Spy for SharePoint bestellen Purchase MAPILab Spy for SharePoint online through a secure server.
Product homepage
Screenshots
Version history
Примеры использования MAPILab Spy for SharePoint
Example of work with MAPILab Spy for SharePoint:
Building scripts
Operations with persisted objects
Example of work with Active Directory
Example of work with Windows Forms
Debugging of regular expressions
Exploration of W3C Document Object Model (DOM)
Leave your Suggestion:
Name:
E-mail:
 
 
Search on MAPILab.com:
Get our Newsletter:
E-mail:
© 2003-2009 MAPILab Ltd. All Rights Reserved.

Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.

See also: Office-Outlook.Com :: Office-Excel.Com

Quick links to MAPILab software:

MAPILab Reports

Add-ins for Outlook

Plugins for Outlook

Addons for Office

Software for SharePoint

Add-ons for Exchange

Groupware tools

Developer solutions