I am working on a heavily used winform C# application.
I have a user control, that has 3 textboxes and it can contain another user control. user can add n number of main user control on the form. due to this, if the user adds more than 20 controls, after the 20th control, the UI doesnt show anything. It is not giving any exception, its simply not drawing the controls? My application is not exceeding GDI objects
I'm using Visual C# 2010 Express.
I've written code to display Provider maps on my form.
I can draw lines on the maps, and capture the latitude / longitude from the map.
My problem is that when I pan or zoom the map, my drawn line stays in one place; it doesn't move or resize with the map.
I'm using a gMap control to load the provider maps as below:
e.Graphics.DrawLine(fl, x_start, y_start, xx, yy); uses pixel values, not geo coordinates. You have to get the latitude/longitude values for your lines, the transform them into pixels using the zoom and offset values of the underlying map.
But x_start, y_start, xx, yy are nothing more than screen coordinates; just like with the overlay code. And when I pan or zoom, the map moves but my drawn lines stay in the same place relative to the screen.
x_start = e.X;
y_start = e.Y
Are you saying that I need to pass the geo coordinates to xx, yy to draw the lines on the providers map?
I don't understand your statement; "then transform them into pixels using the zoom and offset values of the underlying map".
people often develop chat apps and they display chat conversion between two people in simple text box or rich text box. i want to develop a chat apps where i want to design chat conversion UI area look like Skype.
1) Skype chat conversion area show the conversion where other user name show as with different color
2) user can copy text from chat conversion area by mouse selection
3) chat conversion area is capable of showing emoticons.
4) chat conversion area can show progress bar when one user send file to other then progress bar is show at two end.
so here i am uploading few screen shot of Skype chat conversion area as a result you guys can visualize and can understand what kind of UI i want to develop. please click on the two link to better understand what i am talking about. http://social.msdn.microsoft.com/Forums/getfile/262465[^]
the problem is i am not being able to take decision how to develop chat conversion window where i need to show chat conversion data between two user and user name too. also that area must have capability of showing emoticon and progress bar and images.
so just suggest me which control i should use to develop chat conversion windows.
1) should i use rich text box ?
2) should i use datagridview ?
2) should i use web browser control ?
i need something which can show user name and user chat data and also emoticon and progress bar.
please guide me how to develop. if possible give me some c# code. thanks
Use a rich-text box. Hardest part in a chat-application will be the server. After that, it's doing the messaging on a background-thread in the client, to keep the UI nicely responsive. The UI itself is hardly relevant at that point.
I'd start with a plain textbox; once it works, make a backup. Then yank out that textbox, plugin a RTB. Or a WebBrowser. Or something more complex. (FWIW, example seems like a list of a custom-control, consisting of 2 labels and a HTML-capable label in the middle)
The datagridview would be the fastest of those controls. The browser would be ideal, given that you can simply embed emotes as pictures in the text.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
I have a WinForms application that moves a group of points around with the mouse. The code has worked fine on Win 98, XP and Vista. It was slow under Win7, until I disabled the Aero stuff and then it was fine there, too. Now under Win8 it's acting just like on Win7 with Aero activated.
I've checked to make sure the graphics drivers are updated, and even gone to Control Panel and set things for Optimum Performance rather that Optimum Appearance. No difference at all.
Does anyone know what might be done? This is a show stopper! The program uses plain GDI and is in C#.
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software