.net cf unwanted gray borders on controls if form is disabled - compact-framework

I am trying to implement a non blocking message box and what I do is I call another form's show method and disable the main form. However, I noticed that there are gray boxes on the form when i disabled the main form. I am currently using .net cf 2.0. Is there a workaround to avoid this?
The showdialog works fine and i dont see that gray lines however, it is a blocking method.

Related

Textbox cursor focus is not happening sporadically in UWP application

We have UWP application which has more than 200 pages and Have Templated Control for TextBox which is extended the TextBox control. We have customized most of the controls, Textbox, ComboBox, RadioButton, etc..
We are getting an issue sometimes as The cursor is not visible, but able to type, also not able to capture the Control GotFocus event as well.
The UWP application is running in KIOSK mode (using shell Launcher V2).
When we got know this issue and trying to remote the system and verifying it, the cursor focus is working good.
The application has lock concept, when the system is idle for an hour, the software (UI UWP application) got locked automatically. The Lock window is a dialog. So far it was occurred 5 to 6 times, most of the time issue happened after we unlock the application.
(We have created custom dialog control (container) which is as part shell page elements and display the pages as dialog, here we were facing one issue, the tab focus is going background when the dialogs are open, since the parent element is in the shell level, so that we are disabling the background controls when any dialog opens and enabling the background controls when the dialogs are closed. We have more suspicious in this area. But sometime it happen when navigate one page another page as well.)
Also we have Global event to launch the keyboard whenever the TextBox control focused, FocusManager.GotFocus+=.. (but we didn't see any exception in this event method)
Any suggestion?

Windows Form Size changes at run time automatically

I am developing an project in VB using .NET and One of my form is resizing it self at runtime. My other form are perfect but only my one page, which I made is a login page, gets resize at runtime.
My configuration
If you don't want the form to be resized, try setting the AutoSize form property to False.

Debugging problem in VB.Net with Windows Forms with losing events

We have a huge application that runs through a mass of code for every click you do. In one specific case, where you have a specific control in plain sight (so that the events are firing) and you load some special data into it and then click on the new button the form loses some events, like the closing event (you cannot close the form anymore and stop points in debug mode are not triggered) and one validating of a ComboBox that is really needed for the program. The only thing you can do when you get this kind of error is to restart the application to get out of this subform. But I tested it for 2 days now and even when I activate all points in the 'Exception Settings' I don't get any exceptions. The form (and other controls) are not losing ALL events. The resize, for example, still works. Even a specifically called AddHandler is not firing. Can you iterate somehow through the EventHandlerList? Or is there any way to test WHERE the event dies? Somehow any ideas on how to debug such a problem?

Reducing redraw flickering on vb.net web application

I have a page on my web application which has a chart that gets retrieved using a timer. Is there a way to avoid the flickering everytime the chart is redrawn?
Since It's a web application, I guess the doublebuffer property isn't available, or at least I didn't find it and assumed it's webform related.
I would appreciate any help in the matter.
A quick and easy but not suggested solution is to call the redraw manually and remove the event.
So you would remove the event handler and you call the function that redraws the chart when you think is required. i.e After the resize is done or after a value is changed etc.
Since it is a web application, I guess the redraw you are talking about is made using a browser page refresh.
If so, you should take a look at Microsoft Ajax Framework, and a UpdatePanel control to just refresh the specific chart part of your page. Should be smoother then.
http://www.asp.net/ajax

CTRL+ TAB when webbrowser is in focus

I have a windows application with a tabcontrol. One of the tab of the tabcontrol has a webbrowser control.Now the issue that I am facing is when the focus is inside the webbrowser control, the normal Ctrl+Tab functionality of the tabcontrol is not working.I want the Ctrl+Tab to change the selected tab of tabcontrol even when the focus is inside webbrowser control in selected tab.How to achieve this ?
I have already tries overriding ProcessCmdKey.but it does not get hit when focus is inside webbrowser control.
I also tried registerhotkey method ,it works but it locks the Ctrl+Tab hotkey within my application & system doesn't respond to any other Ctrl+Tab presses outside my application when application is running, which is expected behaviour of registerhotkey.
Here is the code you need:
If WB.ContainsFocus Then
MsgBox("We have focus, disappearing...")
WB.Document.Body.RemoveFocus()
End If
Now, the question is, when to run that code. If you put it in the WebBrowser1_GotFocus event, you'll need to turn it on and off. Turn the code off if the user is interacting with the WB Control, and turn it back on when they are not and when you expect to be experiencing the problem you've mentioned.
Of course, you could add another line to ensure a particular control/tab/panel etc gets focus after you remove focus from the body. Also, here are 3 other SO questions that have answers which may help you, but these will take you in directions different to the direction I've provided, probably due to the fact that the questions are not identical to yours, but are similar enough to be useful (not listed in order of preference).
Prevent WebBrowser control from stealing focus?
Webbrowser steals focus
Focusing WebBrowser control in a C# application
UPDATE:
I just wanted to add, instead of the .Body.RemoveFocus() you could do this:
WB.Document.Body.Parent.RemoveFocus()
Which I prefer, since the .Document object didn't have an explicit .RemoveFocus method on the intellisense I was gettign in VS2012 RC. This is probably referring to the HTML tag (and not the .Document object) and since the html tag is the only parent to the body tag, it makes sense, and there is no "HTML" object directly available in the intellisense under object, since you can get it via other means, so it's just more convenient doing it this way.
Cheers, and let me know if you need more info on anything.