Form.Show() Won't Work After Closed
Oct 29, 2011
Using VB Express 2010 in windows XP Pro 64.
A ListBox shows the project forms names.
On ListBox_DoubleClick
For Each F As Form In xFormCollection
[Code]....
Works fine the first time but after closing the form opened by the DC, if I try to open it again, throws an exception "Cannot access a disposed object".
Since I can still access any other form not previously showed I guess that the closing changes a status that allowed the form to be .Show, there is no F.Load , F.Activate after the exception doesn't seem to do anything. What should I do?
View 7 Replies
ADVERTISEMENT
Nov 15, 2011
Using VB Express 2010 in windows XP Pro 64.
A ListBox shows the project forms names.
On ListBox_DoubleClick
For Each F As Form In xFormCollection
[code].....
View 5 Replies
Dec 5, 2011
In my application i want to perform some work when an application is closed from taskmanager.
View 11 Replies
May 31, 2011
for example i have this code :
Sub Month()
Dim Conn As New Data.OracleClient.OracleConnection
Conn.Open()
Try
Dim Cmd As New Data.OracleClient.OracleCommand
With Cmd
[Code]...
What will happen to the datareader when the Connection is closed ( Conn.close)
Will the Cursor that is used by the datareader be freed ? or will it stay open ?
If the cursor that is used by the datareader is still open , when will it be automatically closed ? or should i just closed it manually ?
Will it cause the dreaded "ORA-01000: maximum open cursors exceeded" ?
View 3 Replies
May 24, 2008
I am making the interface controls on my forms to go from right to left using with RightToLeftLayout and RightToLeft which I have set the properties set to true. When I run the application and I open another form on the same application that I am using, I click the button to set the form to go from right to left. When I click the button where the code are running, it close one form as it leave the one other form running. There is no code like Me.Close() that required to close one form. I am using Me.RightToLeftLayout = True,
View 8 Replies
Jan 10, 2012
I am trying to delete a file after viewing it. I loosely copied the code from [URL]. The problem I am running into is the filename I am passing is still in use after I close this form. How to get id where the file is being held open. Here is the relevant portion of the code. This is how I am opening it
Private Sub TifViewer_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
PicImage.ImageLocation = PassedImage
PicImage.SizeMode = PictureBoxSizeMode.Zoom
cboFrameNo.Items.Clear()
'Sets the tiff file as an image object.
[Code] .....
View 6 Replies
Jun 8, 2009
I have multiple forms in my VB.NET application. How do I make it so that any form I close will terminate the application?
View 3 Replies
Aug 13, 2010
I need a way to detect when a child form has been closed. I've created an MdiWindowList thing (but in the form of a toolbar with buttons, similarly to the Windows taskbar), and everything works great, but the method I have for refreshing the taskbar's windows has to be called when a child form closes. I've trying calling the method from the child's Form_Closing event, but there's a slight lag so whenever there's more than 1 window open the first one gets skipped (then the others close properly, since the taskbar is being refreshed first before the form actually closes).
View 10 Replies
Nov 15, 2011
And this problem:+ I have 2 form. - Form 1 have 3 combobox with some item load from database Access.- Form 2 load data when change item at combobox form 1.
View 5 Replies
Sep 1, 2009
I need to know if a form2 is already open when a button1 on form1 is clicked. I found the following code which fails when I open form2 then close form2. When I click button1 on form1 nothing happens. Is there a way to reset form2 to nothing or is this just wrong?
Sub isFormOpen()
If xmlTest Is Nothing Then
xmlTest.Show()
OpenXML(filename)
End If
End Subdavidbell
View 9 Replies
Oct 4, 2011
When a sub runs, it is using up large chunks of memory on every pass. It is loading pics into a listview. The pics are 1 to 2mb each and it is consuming 30-60mb for each one. How to release the memory once I close the form. Is there anything I can do to reduce it?
Private Sub PhotoFrm_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
For Each ImageStr As String In Images
Dim Extension As String = IO.Path.GetExtension(ImageStr)
Dim fs As New IO.FileStream(ImageStr, IO.FileMode.Open)
Dim br As New IO.BinaryReader(fs)
[Code] .....
View 7 Replies
Jul 1, 2009
I have a checkbox on Form2 that will enable an email notification. From Form1, it tests the .Checked property of the Form2 checkbox. What is happening is that the checkbox reverts to unchecked (default at run time) each time the form is closed.
What is the best way to keep the checkbox checked once the form is closed so that it will enable the email notification?
View 5 Replies
Apr 21, 2009
I want to add some action to my form when it is closed by clicking on the "X" button in the upper right corner of the form.How is this done? I suspect that i must add a handler for some event, but which event is it?
Currently i am using the closing event, but i dont get it to work properly.
View 10 Replies
Dec 15, 2011
I have two forms with a variable (x) that is set by a trackbar on the second form.
View 3 Replies
Aug 25, 2010
I have a dialog box with about a dozen combo boxes. How can I access the checked results of the combos once the dialog form is closed?
View 3 Replies
May 18, 2010
On a dynamic form a WebBrowser control connects to a Media Player on one of our servers.After the form is closed the audio is still running even though the FormClosed event is handled.[code]
View 4 Replies
Nov 22, 2009
I have a webbrowser I'm making, and my listbox items for form2 disappear once I close form2 and reopen form 2. However, once I restart the program (Close everything) and re-enter, the data is saved. But once I reopen the selected form, the listbox items are lost. Here is my code (It's long)
View 6 Replies
Sep 25, 2011
Im having 2 errors when loading the form the first one is: "The connection was not closed. The connection's current state is open" and the another one says "Conversion from string "" to type 'integer' is not valid" and everytime I change cmb_Suc appears: "The connection was not closed. The connection's current state is open" [Code]
View 5 Replies
Apr 26, 2010
I have a form that contains a crystal report viewer. When I open this form, it runs a report. I am using a .LDB viewer to tell who is logged into an access database. I noticed that when this form opens, the computer logs into the database and stays logged in. Even when the form is closed, the computer is listed as "logged in". If I run the report again, it just adds another instance of that same computer logged in. Therefore, it continues to pile up logins until the application is closed.
View 1 Replies
Jan 25, 2011
I created another form that had a pic and two simple buttons, one button plays music the other will stop the music if played and take you back to the previous form. My problem lies in when the users uses the windows "x" button to flose the form, the music does not stop. I have searched and failed and light that could be shed would be awesome.Apparently I saved the wrong file and am not on my VB box so this code is incorrect. I basically added the music to the resources, dim'd it and activated it with a button. The other button not listed in this code was set to "portal.stop()" and "Me.Close()"
Public Class frmFail
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Me.Close()
[code]....
View 4 Replies
Aug 21, 2009
I have a form that works on my local Machine I created into. I have Office 2007 on this machine. I created the Form with the Excel 12 Reference. I move the Entire conetence of the Project folder to my work computer. Which has Office 2003. Do I need to recreate the form with the Excel 11 reference. I could not get the form to work on work computer. IT has a com error. I am acessing the EXE for the debug folder w/in the Bin Folder.
View 7 Replies
Oct 26, 2011
Using vb.net. I've got a main form that displays when application is opened. A popup form can then be opened. If there are other windows opened on the desktop, for example windows explorer, then when the popup form is closed, the main form gets hidden behind windows explorer. You have to move windows explorer out of the way to get to the main form. Is there a way to keep this from happening?
View 2 Replies
Feb 1, 2010
I am using a Gif animation on my Mainform. When i open a second form and then return to the mainform - the animation stops. How can i make sure that the animation restarts after the second form was closed?
View 1 Replies
Sep 22, 2009
I got a strange form in my project that doesn't close when I close it, so every time the user will use it, it will stay on system processes. The form is not even shown on the taskbar when it is loaded. It is just a regular form - System.Windows.Forms.Form.
View 9 Replies
May 1, 2011
i have visual studio ultimate 2010 and i was using visual basic and when i tried the messagebox.show command it does not work , am i missing any libraries that need to be installed or did they change this command , if i am missing some libraries , is there a patch or something that needs to be setup.
View 6 Replies
Jun 23, 2010
I used to have a single DataGridView (DGV) on a form. I formatted and populated this, then used DGV.Show to make it appear on my form. This worked fine.I upgraded my form, to included 2 DGVs. Within a sub I dim a new DGV, populate and format it as before then set this equal to whichever DGV on the form it's meant to be. For example:
Dim pDGV as new DataGridView
with pDGV
.ColumnHeadersVisible = True
[code].....
View 1 Replies
Nov 2, 2009
I am making a picture viewer in vb.net. When I click a button to show images from a listview it does not work without the msgbox! I included code
Sub shows()
Dim k, s As String
Dim i, j, m As Integer
''' When I use this, it doesnt work!!!
'Dim cbz As New Thread(AddressOf shows)
'cbz.Start()
[Code] .....
View 1 Replies
Mar 11, 2010
I'm currently in Logic, Design, and Programming at college and we have homework over Arithmetic Operations.For example:100 ^ 2 - (((43 2) + 17) Mod 5 - 7.4) * 3 = 10,013.2
I need to solve it, we can use VB Express 9 to get the answer but we need to show the work. I've done fine up until the question. We have a test tomorrow and we are have 30/100 points just over math equations where we aren't allowed any use of the PC or calculator and I'm stuck on how to break this down.
[Code]...
View 16 Replies
Jan 13, 2010
I have a question regarding waiting for closing a window or changing focus back to my app. What i have is an app that creates a few tables, that then puts the tables into a temp file that wordpad opens for the user to check they are correct, this is where i need help, i would like to now wordpad is open wait until the user closes wordpad or changes the focus away from wordpad until i open the next form which is responsible for using the tables and converting them into xml.
Which event should i look at using that fires when a program is exited or gets focus?
View 1 Replies
Mar 2, 2012
When a dialog form opens, does all code and timers stop until it is closed?
View 19 Replies