Skip to main content
GameDev.net gamedev.net
🔒 Locked

Windows Form Program Problem

Started by k4rm4 Jan 24, 2013 at 2:22 AM 5 replies 1.2k views
Original Post
k4rm4
k4rm4

I am doing a windows form program in c# for a school assignment. I haven't completed the program yet, but when I was testing to make sure my math and what not was working all of my textbox's were see through and I could click through them onto the windows below the program as if it were transparent. Does anyone know why this is happening and how to fix it? Thanks in advance.

Nypyren
Nypyren

That shouldn't happen by accident. However, we have no way of guessing what is causing it. Can you post some code?

k4rm4
k4rm4

ScreenShot2_zps9d4fc5ce.jpg

On the left is what the program looks like in the designer and on the right I have the program running. As you can tell it is see through and I don't know why. I haven't changed any properties in the designer on any of the elements.

ScreenShot1_zps9e2f20de.jpg

Here is my code. And like I said I haven't completed this yet I just wanted to make sure that there were no errors before I continued. Any ideas? Thanks in advance.

Nypyren
Nypyren

Well, it's not your code that's causing the transparent textboxes, unless you've set up some weird settings in the .Designer.cs file.

It's probably something else on your system that's interfering somehow (corrupt .NET or Windows installation, strange video driver, a video renderer using a color-keyed technique, some software which manipulates HWNDs with certain properties, etc).

k4rm4
k4rm4

Do you think it could be a property of the textboxs themselves? Or the property of the program background? Because when I changed the color of the textboxs I can see what I type but if I click the textbox its still transparent.

k4rm4
k4rm4

I also wrote a program on the lecture my teacher was giving but I am not able to submit that as my own program, but I used all the same elements as that program but for some reason this happened to this program and not the one I did with the class and my teacher. This is very strange lol.

k4rm4
k4rm4

A friend of mine helped me out. It was the OpacityKey in the properties that was screwin with my program. Thanks for the help though :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.