Page tree
Skip to end of metadata
Go to start of metadata

At present, the default translation of Form_Load is as a method that is invoked from the form constructor.  You may want to migrate it to an event handler instead.  The following RefactorLibrary for the VB7Lang meta-language definition will help you do that:

Description: apply metalang overrides
<Refactor id="Basic" >
<Replace id="Patterns">
   <pattern id="FOR">
      <subcode id="Load">
         <!-- hook Form_Load to Load Event rather than deleting it -->
         <!-- see also postedit to remove calls to Form_Load in ctor -->
         <all role="event" narg="0" code="Load" />

<Author Condition="%SrcName%=~'...'">
   <Fix host="%SrcName%" name="PostEdit">
      <Replace status="active" name="Remove Form_Load from Form ctor to alter load sequence; hooking to Load event instead">
         Form_Load(null, null);
  • No labels

1 Comment

  1. TODO: Modify code in authortext.gmsl to make authoring Form_Load in ctor conditional on role!='event'