One thing I would like to point out is that if men and women are working together, and a man compliments you on..... anything..... "Pull in the horns!"
Yes, he might only be trying to see if he will also be found attractive. Believe it or not, this is probably how you and I both came to be. Our fathers tested the waters, maybe for a long time, before they got the nerve to risk being rejected if they asked our mothers out on a date.
Get over the fact that men WILL see women as women, no matter if they are at work, or not.
I'd like to point out though that there is a very fine line between "compliments" and harassment when the "compliments" are unwanted.
I was once in a situation in which a man nearly twice my age started out by telling me, literally everyday, that he thought I was "beautiful." Sweet, right? Nice compliment. I didn't think much of it. But when it turned out that he would tell me this every single day, it made me a little uneasy, and as time went on, it began to escalate.
Eventually, along with the comment about how he thought I was beautiful, he started asking me things such as, would I go to dinner with him sometime, because, "I'd be proud as a peacock to have a girl like you on my arm."
This man had a long-term, live-in girlfriend. Now, is this how you would want YOUR significant other to behave? I certainly wouldn't. But he was someone who was used to living on his own terms. He told me his father had raised him to speak his mind, and told me about some times when he would compliment other women (who were married) and how their husbands would confront him but that "they just needed to get over it."
He was also a very powerful figurehead in the company, earning them a great deal of money. As time went on, he started asking me if I'm come work for him, and told me he'd give me better pay, plus whatever hours and schedule I wanted, because, in his words, "It's my world (in his department), and I make the rules." Finally, one day while he was talking to me, he had the audacity to reach out and run his fingers through my hair.
I couldn't avoid him because our work areas were literally right next to each other, and some days I would turn around and he'd literally appear out of nowhere, giving me no way of exiting except by walking past him. Aside from pats on the back/shoulder and that one time of touching my hair, he never made physical contact, but I will tell you that I was deathly uncomfortable around him. I started making sure I always had some kind of cart of merchandise with me so that I could always try to make sure the cart was between us (creating a physical barrier) when he talked to me, or I would have an easy out: "Well, I gotta get this stuff put up... Talk to you later!"
One of the blessings I've had in being single with no kids is that I could turn down his job offer. More money and better hours would have been great, but for me, it just wasn't worth the risk. I'd rather eat ramen noodles than choose to put myself in possibly treacherous situation, and I feel terrible for anyone who feels they have to jeopardize their safety for a "better" job.
All of this happened over a period of about 2 years, so it wasn't overnight. I know some people will say, "Oh Seoul, that's nothing," and yes, compared to other stories, I know this will be seen as nothing. But where, exactly, is the line? How much do you put up with, and how much do you pay attention to your instincts? Some people will say, "What's the matter with you, Seoul? You can't take a compliment?" or, "What if you were wrong, and projecting your own paranoia onto an innocent man?" Those are perfectly valid questions, and "technically", this man wasn't "doing anything wrong". I certainly didn't have any kind of case against him from a legal standpoint. But I got to a point where just the thought of having to see this man made me nervous and anxious because it was obvious to me that he had no morals or boundaries, and even if anyone had stood up to him, he had never been reprimanded in a way that made him stop.
God finally gave me a way out. A shift that no one wanted became available and I jumped at the chance. It wasn't my only reason I took that shift, but knowing that I would have to see much less of this person gave me a much greater peace of mind. In the process, I came to actually like that shift and was given a slight raise, so God blessed me with everything this man had supposedly offered anyway, and without all the unwanted "compliments".