Hello netwrkgod,
Yes your circuit is AWFULL!!!!
In an RS232 port, if your software can read the state of some of the control signals which are inputs to the PC, such as CTS or DSR, then yes you could use the port to detect 0v or 5v, depending on the receiver IC in your PC. The true RS232 standard requires < -3v and > +3v, athough I cant remember an input which would not accept 0v as a valid state.
I am not familiar with VB6, but using assembler I would read the appropriate bit(s) in one of the status registers for the UART.
As for the serial port itself, the 0v side of you power supply should connect to pin 5 of the 9 pin D connector.
For your inputs, you could use CTS - pin 8, DRS - pin 6, DCD - pin1, or RI - pin 9. Assuming they are all impemented in your serial port.
I cant comment any further on your photoelectric sensor without seeing the data sheet for it.
JimB