WinForms - Screen Freezes On Closing Any Other Application
Feb 5, 2010
I have a vb.net 2.0 winforms application. When I open another application (like calculator) have the focus to it and try to close my application the screen freeze and I have to use ctrl + alt + del to get it to refresh.
I am developing a simple application in VB10 that uses ADO.net to store data in an Access database, and gets input via a serial port RS232. It works well, but is not fully debugged. Unfortunately, a problem has recently started where as soon as i close the program I get a blue screen. Makes it hard to debug. The solution does not even have to have run; it just has to have been loaded and then exit VB10. The blue screen aslo happens to most of the other example solutions that I have downloaded.
Questions:
1)How do you capture the STOP error codes (probably stupid question)?
2) Is there an easy solution that rings a bell? My IT support is trying but not getting anywhere. Have to believe it is hardware related, but the hard drive checks out with testing.
To create splash screen before InitializeComponent, the WithEvents statement for the BackgroundWorker component needs to be moved from the Form's Designer.vb file into the constructor as indicated in the first commented lines of the constructor below.
using a backgroundworker to accomplish database update it takes about 30 minsbut when I minimize the screen or someone remote access my computer it cause freeze screen of my application .Although process workes fine and application is running in background but UI is disable and saying "not responding"
Form1 is a mdi container. It has a bunch of forms that can load inside of it as mdi children. If I close each open form inside the form1, and then click the red X at the top right, application exits fine.If I click the red X without closing the forms inside I get: An unhandled exception of type 'System.CannotUnloadAppDomainException' occurred in mscorlib.dll
Additional information: Error while unloading appdomain. (Exception from HRESULT: 0x80131015) However I can break from it. How do I get the application to not show that error? What must I do to fix those inside forms or close when the red x is clicked?
I'm trying to save some layouts from DevExpress Grid Controls so that users can change the layouts and reload them in at a later use of the control.
My question is this for speed issues I am loading the control via a user control inside of a form. Now my problem is I am creating the control by adding an instance of the control to a panel control inside of a tabbed group control when the tab is made visible and then clearing the control when the control is hidden.
If ClaimsGridPanelControl.Visible = True Then ClaimsGridPanelControl.Controls.Add(New RXClaimsGridControl(ClaimsBindingSource)) Else ClaimsGridPanelControl.Controls.Clear() End If
So inside of the RxClaimGridControl I need to call a SaveLayout method when I am clearing the control. But there is no event, at least that I can find, that triggers when a usercontrol is removed/closed/hidden.
My thoughts for handling the .Clear() would be to raise an event in the parent control and then to handle that event inside of the user control.
Is there some event that I am missing in regards to the removal/closing/hiding of a user control, or is there a better way to do this.
I've got an MDI form with child forms that I'd like to refactor to a single form with a tab control containing child controls, in order to move away from MDI clunkiness. When looking at converting the child forms into child controls (or usercontrols), I do see that I'd lose the FormClosing event, which some of the child forms use.
I can override Dispose to handle some of the functionality, but in some cases I'd like to cancel the closing event. Also, I'd like this event to be called before the control is closed even when the form it's on isn't closing, so wiring the control to the form's closing event isn't an option.
'This is the event that is fired as the application is closing, whether it 'be from a close button in the application or from the user 'clicking the X in the upper right hand corner
[Code]....
Im trying to make an application that when you press X, the program gets put in system tray. But i have like no idea how i'm suppost to do that, so did a search on google and found this code. Only VB2010 (what i use) doesn't like the fourth line. Can anybody give me a quick tutorial on this, and make this work in VB 2010?
To recreate this behaviour, you need to create a pop-up form with the following properties:
(1) ShowInTaskBar = False
(2) Display the form with the Show method and loop until the form is not Visible.
(3) In order to close the form when the mouse is clicked out of it, override OnDeactivate, and set visible to False.
Next, create another form that will display the pop-up when a button is clicked:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As Syste Using pop As New PopUp pop.Visible = True
[code]....
it also puts a black border around the form. (You'll have to set FormBorderStyle = System.Windows.Forms.FormBorderStyle.None to see this.)what this style does apart from putting the black border round the form?
I added an splash screen to my app. Then in the project settings I selected it to be used for the splash screen. Now my app won't close when I try to exit my app. I have 'When Last Form Closes' selected for the shutdown mode. So I'm guessing the splash screen is calling Hide() instead of Close(). I can't find a way to get access to the splash screen object so I can try callling Close().
I have a vb.net program created in VS2008, winforms/desktop application. I have it on a timer event so that every 4 hours it rins some actions. When I minimize the application ot the system tray...after a seemingly random period of time....it will not maximize. It acts frozen however the program still runs and the timer events usually fire on time. I just can't get the main form back up to see the menus and interface with the program. I have tried doevents, refresh, getfocus etc... nothing seems to make it refresh.
I have a vb.net program created in VS2008, winforms/desktop application. I have it on a timer event so that every 4 hours it rins some actions. When I minimize the application ot the system tray...after a seemingly random period of time....it will not maximize. It acts frozen however the program still runs and the timer events usually fire on time. I just can't get the main form back up to see the menus and interface with the program. I have tried doevents, refresh, getfocus etc... nothing seems to make it refresh.
Okay, so a program I've been working isn't running correctly. The application freezes and doesn't continue onto the next command (SetCursorPos(999, 999))
In my application, the user can create a word document from a word template with dynamically added text and data to it. This happens on a backgroundworker so that the application doesn't hang during the process. This all works fine and the word document opens correctly when finished. Now if the user leaves the application to do something else, in most cases when they come back to it, it has frozen. It's still responding/running in task manager but the interface is frozen. In debug mode, it never freezes and so I can't catch the exact moment when the freeze occurs. My backgroundworker is disposed of when complete and I close everything related to the word object.
I have a project (Written in Visual Basic, using Visual Studio 2005) which has several user controls. I have had no problem setting it up where you click a button and it load a user control, but I cannot get it to remove the control that is currently open. For example The program opens on a starts screen, which has the choices, Control1, Control2, and exit. When you click Control1 button it should open up a screen to display an inventory. It does this just fine, but it does not close the main menu screen.
Here is the code for the initial startup of the project: Public Class Form4 Public Sub Form4Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim CtrlMain As New ControlMain() With CtrlMain .Location = New Point(0, 0 [Code] .....
I'm coming from ASP.NET background and lately I started developing winforms applications for my company, I had no problem with the move from ASP to winforms programing wise, the only thing i have problem with is to my program to look good across different screen resolutions, resolutions is big problem when developing for the web as well, but I already learned and know how to handle those problems and make my website to look good under almost any resolution what I'm really asking, can someone experienced in this area tell me what are the rules and guidelines i should follow and obey for my winforms application will look good in most resolutions.
What code in VB.net 2010 do I need to set a window to come to the front of the screen. What I am trying to achieve is to display an urgent alert type, its a form, for certain reasons I am not using message box.
Following code does not work: Private Sub frmMessage_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Me.BringToFront() End Sub
In Microsoft Access there was an easy method to turn off screen updates by setting Echo = False. Is there an equivalent in VB.NET for WinForms? I've got a situation where I'm trying to prevent users from seeing controls flickering while they're being updated. I could probably solve the problem by coding it differently, but would rather avoid it if I can.
im about to develop a small appliacation for a bet system, which needs 6 screens, each screen will be a touch screen for each client... the application will be running in one computer only just with 6 screens. my question is does anyone knows how to control each screen separately?. somethign that would allow me to output each forms in different screens would work fine.
I am making a program that will put a black mask over an application (like a full screened game). This black mask will fade in and out, depending on certain criteria. Is there a way I can do that with VB? It's to help me dim my monitor without having to push anything.
I have an application that is written in VB.NET, using the System.Windows.Forms.Form as the front-end GUI. It runs perfectly on my Windows machine however recently there is a business requirement to convert this application to run as a web application so that people could view them in their blackberries when they go to the URL. Is there any quick way to perform such a conversion or I will have to translate the code line-by-line for such cases?
detect whether the current application is a console or a winforms application.The reason that I want to do this is that I am developing a library with a global error handler in it and I need to know what type of application it is in order to be able to subscribe to the appropriate exception event.Obviously I could get the user to pass in a parameter specifying what type of application it is, but I would rather deal with that automatically so its all encapsulated from the user of the class.
I'm having a problem over here; I'm developing a DirectX 9 application, and for some reason, I can't figure the way to close the application completely. This has never happened to me, to be honest. I am using Application.Exit(), which doesn't seem to do anything - it just closes the form, but the program is still running. I have also tried End, but it throws a run-time error I can't seem to figure out.
I have a form in a Pocket PC app that is set to be the Application form using:Application.Run(New frmMain())Somehow this form is getting closed for no reason while working on another form. No closing event is fired and nowhere in my code can you close the main form anyway. It is only closed by clicking the OK button at the top right of the window. When this is clicked, the user is prompted if he/she really wants to close the application. However, this is not occurring either.Basically, I am on another form which adds a new record to the database. After adding the record the gotFocus event is somehow called for frmMain. When the code in the gotFocus event reaches a reference to a control on the form, there is an exception that states that the object is disposed.