Using WinWrap® Basic IDE in a WinForms Tab Control
WinWrap® Basic is an embedded macro language component available for .NET and COM 32/64 bit Windows applications. The WinWrap® Basic Component is an alternative to Visual Basic for Applications (VBA), ActiveX (e.g. VBScript, JScript, PerlScript, Rexx-based WSH engines and others), and VSTA for this purpose. The WinWrap® Basic Component is compatible with VBA, Sax Basic, VB.NET and Visual Basic 6.0 style scripts.
Features
- Use the IDE in a WinForms Tab Control
- Show parse and runtime errors in the IDE
Using the BasicIdeCtl on a Windows Form TabControl
-
BasicIdeCtl in TabControl Example Code with Comments
private void Form1_Load(object sender, EventArgs e)
{
// selecting tabPage2 initializes the BasicIdeCtl
tabControl1.SelectedTab = tabPage2;
tabControl1.SelectedTab = tabPage1;
// WinWrap Basic execution has encountered an unhandled run-time error
// show the IDE so the error message box is not displayed
private void basicIdeCtl1_HandleError(object sender, EventArgs e)
{
tabControl1.SelectedTab = tabPage2;
}
// WinWrap Basic execution has paused because a break point
// has been encountered or a stop instruction has been
// executed or an unhandled run-time error has occurred
private void basicIdeCtl1_Pause_(object sender, EventArgs e)
{
tabControl1.SelectedTab = tabPage2;
}
// default AttachToForm behavior shows the correct form, now select the IDE's tab
private void basicIdeCtl1_ShowForm(object sender, EventArgs e)
{
tabControl1.SelectedTab = tabPage2;
}
private void tabControl1_Deselecting(object sender, TabControlCancelEventArgs e)
{
if (e.TabPageIndex == 1)
basicIdeCtl1.Run = false;
}
See WinWrap Examples for instructions on how to download and run "Example 2 - TabControl".
Copyright Polar Engineering, Inc.