Notice that on the first screenshot (Win98), there is a line that states " -MS Windows 04.0A detected. Drivers run in compatibility mode ... Done." Also notice that this line is missing when LemEdit is run under XP (second screenshot).
Also,
this program demonstrates that DOS applications can only detect Windows versions below XP. If it is run under Windows 98 it will tell you that "Windows is running." If it is run under XP it will tell you that "Windows is not running." This program genuinely tries to detect all versions of Windows.
Therefore if LemEdit could detect XP, it would probably run in compatablity mode. (The mouse would work.)