To do this would be quite the undertaking. A Lightgun requires that the screen "flash" for a moment, which then the light gun reads in the location, based on where the flash is at the time. (Read up on Monitors if you want to understand this more)
The NES actually worked a little different, as the screen blacked, and the targets whited out, which would make it easier to program for.... well, duckhunt.
But meanwhile, You have to be able sync the monitor refresh rate and the reading of the gun. The act-labs pc and tv gun have a passthrough which adds the flash to the screen, and does the location calculation internally, I believe. This means you would need to design an actual piece of electronic hardware.