If all you want to do is hide the events, there's an option built into mIRC (alt-o IRC [Events], then you can choose where to have them displayed) . I'm not entirely sure whether the OP actually wanted the events or not.
However:
on ^*:JOIN:#:{
if ($window(@events) == $null) window @events 60 100 600 200
echo @events $nick ( $+ $address $+ ) has joined $chan
haltdef
}
on ^*:PART:#:{
if ($window(@events) == $null) window @events 60 100 600 200
var %partmsg = $iif($1,$1-,$nick)
if ($window(@events) == $null) window @events 60 100 600 200
echo @events $nick ( $+ $address $+ ) has left $chan ( $+ %partmsg $+ )
}
something like that? the "^" hide the default message.
Err - the ^ just makes the event trigger before the default handler. You need a haltdef to stop the default. (a couple of typos corrected; var instead of set and assignment in one line...)
on quit is an interesting one, since it isn't specific to a channel so you need to check $comchan()...