when writing midi, if I go to an outside program (internet etc.) when I return to cubase midi continues to play by itself. If I go to the instrument I was using, and hit the panic button it will stop momentarily. It continues after a while. ???
What do you mean by Panic button? Do you mean in the instrument (probably NI Kontakt)? If yes, then this is logical. Please read, what does the button do in NI Kontakt.
Yes, ni kontakt. However, that does not solve the problem. the midi continues unless I restart Cubase.
Could you try to Reset MIDI from Cubase?