logo WinWrap®

Using WinWrap® Basic IDE in a WPF 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 WinWrap Basic in a WPF Tab Control
  • Show parse and runtime errors in the IDE

Using WinWrap Basic in a WPF Application

Example2Example2 Scripts

BasicIdeCtl in WPF TabControl Example Code with Comments

private void Window_Loaded(object sender, RoutedEventArgs e) { // selecting tabPage2 initializes the BasicIdeCtl tabControl1.SelectedIndex = 1; basicIdeCtl1.UpdateLayout(); tabControl1.SelectedIndex = 0;
// 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.SelectedIndex = 1; } // 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.SelectedIndex = 1; } // default AttachToWindow behavior shows the correct window, now select the IDE's tab private void basicIdeCtl1_ShowWindow(object sender, EventArgs e) { tabControl1.SelectedIndex = 1; } private void basicIdeCtl1_StatusBar(object sender, WinWrap.Basic.Classic.StatusBarEventArgs e) { e.Handled = true; }

Toggle WinWrap Basic IDE Design Mode Button

Example2

See WinWrap Examples for instructions on how to download and run "Example 3 - WPF".

Copyright Polar Engineering, Inc.