|
Really easy question because I can't figure out what to type into the google. I'm learning winforms and making a very simple program to try out various stuff, and I'm trying to add a small options screen with some configuration info in it. What I want to do is make it impossible for the main window to have focus as long as the options window is up, as many programs do. I'm sure there's some simple way to accomplish this but I can't seem to find it.
|
# ¿ Sep 21, 2011 05:35 |
|
|
# ¿ Apr 29, 2024 03:52 |
|
I'm learning WPF and having some performance-related problems. I'm trying to make a simple telnet client and chose to use a custom control for the main text display. My problem is that I'm having horrible performance when attempting to draw this. The method I'm using to draw is simply to loop through every place in a grid where a character exists, and then using DrawingContext.DrawRectangle to draw in a background color and DrawingContext.DrawText to write a character over that rectangle. For the default size, this means 80*24 (1920) rectangles/characters must be drawn. I know that this is certainly "a bunch" of things to draw, but I assumed it still be a small enough amount that it wouldn't hurt the redraw speed significantly. As it stands, resizing the window is horribly slow and sluggish. Is there some better way for me to be drawing all of this or some horrible misunderstanding I'm having here?
|
# ¿ Jan 2, 2012 01:37 |
|
I'll probably end up using a standard text control, but first I wanted to give making a custom one a try just to see if I could (I can't ) Trying to cut down on what the loop rendered wasn't especially helpful, drawing either the text or background on its own led to bad performance and both together was worse. Welp, gave it a try. Thanks for suggestions
|
# ¿ Jan 2, 2012 08:46 |