VS 2008 Threading + Form.Show() Hanging?
Feb 23, 2010
I'm not sure how to explain what's happening but it seems to be deadlock, i did search along the forum and actualy did find who had the same problem as i did. Unfortunatly i'm too new to this Threading and could not understand why does this deadlocks happen or how to avoid them.I'm using the following
Dim t As New Threading.Thread(AddressOf MyTestingSub)
t.Priority = Threading.ThreadPriority.BelowNormal
t.IsBackground = True
[code].....
View 6 Replies
ADVERTISEMENT
Jul 25, 2011
I have a series of methods being called for my networking code. An event gets fired from the networking thread. Inside this event, which I've hooked into from a singleton class, I route messages to form level methods which they register on form load to handle certain messages they care about. Inside of these form message hooks I need to close the current form (which I was able to do) but also show a different one (which is giving me the trouble).
[Code]...
View 1 Replies
Feb 20, 2010
I have a visual basic program wherein i fetch information from two textboxes format the output of the textbox in the required form and then make the output come as desired I use two arrays to read textbox 1 and 2 separately and then i use for .. next statement to perform the same action for all the lines in the textbox 1 and 2..
Both of them have equal no of lines..I have also give a progress bar in the form and assigned the max value as the number of lines and i have given the incrementation within the program for the progressbar..
When i run the program it runs quite well for certain instant of time and the progress bar also responds according .. After some interval of time the form hangs and the progressbar also hangs at that place..Later after some more time the form is back to normal and the process is in finished form with progressbar at 100%..
Is there any reason why the form hangs..If there was a major problem i must have not got the output at all but i do get the output after certain interval of time..Can this problem be solved??
View 1 Replies
May 9, 2011
I have a really simple form with a button that fires a Sub I created which gathers data from ActiveDirectory and adds it to an Excel Sheet. The problem is, when I click this button the whole form hangs. So I figured the operation that gathers the data and adding it to the Excel sheet should be run in it's own thread, so that the form won't hang. Possibly it would be great to add a progressbar as well. The progressbar however is located at the Main userform that starts up once the projects is run.
I've got one MainForm.vb and one CodeFile.vb. I want most of the code in the CodeFile.vb so it's tidier.
MainForm.vb
Imports User_edit.CodeFile
Imports System.ComponentModel
Public Class MainForm
Private Sub btnImportData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImportData.Click
[Code] .....
Notice the ExportFromAD Sub I've got in the CodeFile.vb. This is what is actually doing the work. In the For each loop that adds data to the Excel is where I've put the MainForm.MyBackgroundWorker.ReportProgress(i * 10). Problem is, it doesn't actually update the label on the form. Which I find pretty weird because the form isn't really hanging or anything. Is it trying to access a different thread or something? Meaning, the form is run on it's own thread which can't be accessed from my second thread?
View 2 Replies
Jul 20, 2010
The coding that I have a problem with might make people think that I am creating some malware. So the project I am doing is associated with iTunes. iTunes allows people to have one library. There is another way, but it is very confusing to some people, and very unreliable. So my project is that I will allow people to have multiple iTunes libraries on one computer. So the problem is this. In order to have an option to choose your library, I gotta make sure that iTunes is not running.
So this is the script:
Private Sub CheckAndCloseiTunes()
retry:
'Custom class that includes the function to safely close iTunes
Dim Processes As Process() = Process.GetProcessesByName("iTunes")
[CODE]...
So when I use the Threading.Thread.Sleep(2000) code, the form becomes unresponsive.
View 4 Replies
May 6, 2009
Creating an application that uses both namedpipes and TCPIP connectivity to pass data between 2 legacy applications.
When there is actual data to pass everything works great. But when the application is looking to see if there is any data to read from the named pipe side and there is no data, the Peek hangs until there is data. Is there a problem in the way I have it coded or is there a timeout that needs to be set?
Code:
'
' declarations
'
Private in_pipeName As String
[code]....
View 6 Replies
Aug 31, 2011
I would like to place a brush under the cursor as I move the mouse around a picturebox, so the person can see what they lay down when clicking. How could I do this. I am working on a custom scribble application.
View 1 Replies
Mar 26, 2010
Edit 1: Uninstalled & Reinstalled Edit 2: Same problem. Seriously? Yes.I am having a problem with msvb7.dll eating 50%+ cpu on my dual core system. This usually lasts 10-30 seconds or so, during which time the IDE is non-responsive.
This occurs when I do pretty much anything in the text editor, and can be replicated by simply adding blank lines to a function, and then deleting them. Or pasting some code. Or... lotsa stuff.
SP1 installed I had DevExpress' refactor/coderush, components, and codeit.right installed, but have removed all 3 of them. (I had installed the latest version of Refactor Pro! (9.3.4), perhaps the day before)
I have tried a VS.NET Repair. There is a kb that referenced some cpu destroying with vb, but it was included in SP1
[Code]...
View 3 Replies
Sep 4, 2009
When I use
Me.Close()
Form1.Show()
It closes the whole app.
How would I change it so that it only closes the current form while opening a new one? EDIT: I put [Not Resolved] Because I accidently pressed the resolved thing
View 8 Replies
Jan 21, 2010
I'm doing a big loop in my program and throughout the loop I'm updating the textbox in the form.
However the form "hangs" untill the loop is done. How can I keep the form visible and be able to read the updated textbox while the loop is still running? I tried Me.Update() but it didn't work. I'm sure there was something like processdata or something like that but I can't find it anymore...
Example
For x = 1 To 10000
form1.textbox.text=x
Me.Update()
Next
View 2 Replies
Dec 18, 2009
why I need to instantiate a form instead of form.show?
View 20 Replies
Sep 28, 2009
Private Sub HideShowTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Hide()
[code].....
View 1 Replies
Oct 26, 2010
I have a dual monitor setup on my computer. My program has multiple forms. I've designed the program to check which monitor the main form is currently on and to open the secondary forms on the current monitor. When the main form is on the primary monitor the secondary forms open as FormWindowState.Normal which is the design-time setting for the secondary forms. If the main form is on the secondary monitor and I click to open a secondary form then the secondary form is to be displayed as FormWindowState.Maximised.
[Code]...
So I moved the Form.Show line to after the Form.WindowState line. This works fine when the Form.Show process is very quick. The problem is that one of the secondary forms downloads some information from the internet so it takes about a second to finish the Form_Load process. When I had Form.Show first the form would not appear on screen until the Form_Load process is complete, so the delay was in the form appearing at all which is how I prefer it. With Form.Show last the form appears on screen immediately but appears mostly blank and unresponsive until the Form_Load process completes.
I would prefer that the form not appear at all until the Form_Load process is complete but I would like it to appear in an already Maximised state. Is this achieveable? It doesn't seem that complicated but I just can't figure it out.
View 10 Replies
Jun 3, 2009
What is the best way to access a value of a control within a form outside of the form class. I have a lot of functions defined in a module, one of these functions requires a series of values from controls in my main form such as the FolderBrowserDialog.SelectedPath element. I understand that these cannot be accessed in the format form.FolderBrowserDialog1.SelectedPath and that they need to be accessed using a delegate. This is the part I am stuck with.
[Code]...
View 3 Replies
Jan 6, 2012
[code] I can't show the form 2 when i use TAB.tabindex already set into 1.
View 6 Replies
Jun 24, 2009
My mate & Myself are currently building a IRC Client, a problem we have come across is when opening a chatroom the form Freezes for example.
We are currently using arrays so we can open multiple chat rooms and at this current time to open a chat room we use
Channels(ChatIndex).Show()
The form opens but freezes.
I have also tried using
Channels(ChatIndex).ShowDialog()
Application.DoEvents()
Using the above code, the form does not freeze but appears we can not access any of the controls such as (RTB)
What would be causing the form to freeze on .show(), Has anyone else had any similar issues?
View 9 Replies
May 25, 2010
I'm making a program, I have added it to the startup now but, How can I make it show the form on startup?
View 2 Replies
Mar 1, 2010
I have a "housekeeping Form" set up that...when triggerd by the main form, updates records, sends email, clears and refills an access table all of which runs from a Form.Load Event my problem is the form "PLEASE WAIT WHILE SYSTEM IS UPDATING" will not fully load while all these things are happning I have tried ME.Show and ME. Activate
View 7 Replies
Dec 10, 2009
I'm currently uploding using this script:
Dim UserID As String = "MyID"
Dim Password As String = "myPW"
lblUpload.ForeColor = Color.Orange
[Code].....
But when it's uploading it show a new window with a cancel button. how do I hide that window, and if possible show the upload bar in the form that is uploading?
View 4 Replies
Apr 26, 2009
I've made a basic form with a textbox for the username and an OK button, I have no idea how to make it go to the next form when only certain usernames are entered and the OK button is pressed.I also need to find out how to show the username on the next form?
View 5 Replies
Mar 1, 2009
How do I when showing a form, make it randomly pop up on somewhere on the screen? Im using it for allitle game Im putting together
View 6 Replies
Jun 3, 2009
I need to show a thumbnail of a web page on a VB 2008 form. I have found a number of code snippets that mention something called an IViewObject which can apparently do what I need but the only examples are in C.
View 5 Replies
Sep 3, 2010
I want to show (display) a form or even maybe a panel while the user is hovering over a PictureBox.How would these events work?
View 3 Replies
Jun 15, 2012
I have settings called set1 and what I want this to do is when I open up a form and I then click close is doesn't show it anymore it shows the original one.
View 11 Replies
Jan 25, 2012
How do i get my first item to show in combo box when form has loaded?
View 6 Replies
Apr 6, 2011
i have form1 and form splash..i used the splash as processing indicator i place gif in the splash form...and in form1 i call the splash in separate thread..
like this..
Dim splashthread As Thread = New Thread(New ThreadStart(AddressOf SplashScreen.ShowSplashScreen))
splashthread.IsBackground = True
splashthread.Start()
[code]....
now,my problem is when form1 is loaded and click button process in it..the splash form will not display modally...is it because i called the splash in separate thread?..
View 4 Replies
Mar 21, 2011
I have a background application that has a System.Timers.Timer running in it.When the elapsed event is raised I want to show a form.Now if I call form.showDialog everything is hunky dory. If I call form.show the form is not responding ... Now I suspect that this is happenening because the elapsed event is raised on a secondary thread but that said I dont know how to fix this.
View 10 Replies
Sep 2, 2011
im using visual studio 2008 for my thesis. i have this mdi parent form as a container in my program and buttons in it to show different childforms. i am just wondering is it possible to show the childforms in slow motion manner, from left of the container to the center?
[Code]...
View 3 Replies
Apr 27, 2011
VS 2008 form.show in slow motion
View 4 Replies
Nov 16, 2009
How do I get an existing form to show up as a MDIChildForm?
View 3 Replies