Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Has anyone else run into this issue:

 

I have a windows form and for whatever reason, at some point while I'm developing, the options are disabled on the right click menu in design view. Thus, I am unable to delete any controls from the form even when pressing the delete or backspace keys. This has happened to me a number of times (5 in two weeks) and I was curious to see if anyone else has run into the problem.

 

I am able to workaround the problem by copying the code from the original form, creating a new form and repasting the code into the new form. Then I delete the old form and rename the new one. So, it's not a coding issue because then the new form would have the same problem, but it doesn't, I am able to delete and copy the objects on the new form. As you can see, it is quite annoying, it works, but annoying. I was wondering if this was a bug in .Net or maybe something I am doing and not realizing. I've compared the properties of both the old form and new form and found no differences so I'm quite curious if anyone has found a reason and/or a solution.

 

Thanks for the time.

  • Leaders
Posted

No, I haven't had this problem. Are you sure that your program has stopped running?

Can you set properties on the form when the menu is disabled? Can you still select individual controls on the form when it is disabled?

:)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted
It happens while I'm just coding regularly. I can still select controls individually, but I am unable to delete them using the keyboard and the options are disabled when I right click on a control. But if I go into the code, I can remove the control by removing the windows generated code. It is quite weird and I was just wondering if anyone else has run into the same problem because it is quite annoying to fix. I did run into it again last night while coding but I'm guessing it has something to do with the tab control that I'm using. Since the last two apps I've been working on have utilized a tab control.
Posted
I have had this problem before. You can see the delete and all but they are greyed out and can't use them. I don't know w fix, but when that happens. All I do is just exit and start the program again and then it is fine instead of doing all that copy and paste and creating new forms.
Live as if you were to die tomorrow. Learn as if you were to live forever.
Gandhi
  • *Experts*
Posted

I'd hope you'd only have to close the form, rebuild your project/solution, and reopen the form. At the worst, maybe close the whole solution and reopen it.

 

If you copy and paste controls to a new form, you risk losing "custom" properties that are saved in the resx file (pictures get saved there along with a lot of custom control properties).

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

Nerseus - Appreciative, but that doesn't work.

 

The latest example is that I just opened up the solution and the options were disabled. Obviously since I just opened the solution it is not in debug mode. I then closed the solution and repoened it, didn't work. I then closed the .Net app and reopened, didn't work. But when I rebooted the machine, things were back to normal, the options are available once again and I can delete controls from the form. Kind of crazy but that's coding for you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...