Forms :: Main Form Minimized After Opening Form In A Different Thread?

Jun 7, 2009

In the main form the user can choose to download information from a device.Since this request takes time, when "download information" is pressed I open new form in a separate thread: Private Sub RunDownload()

[Code]...

View 3 Replies


ADVERTISEMENT

Forms :: Access Main Form From Second Thread Running In A Module?

Jun 22, 2010

I was a vb6 user, done a few projects only with forums Now i am moving to vb.net(vb2010) and i have some trouble.Lets say we have a form(form1), a module(mod1) and a textbox on the form1.

i want to start a Sub (DoWork) in the module but in a new thread.

Dim Thread1 As System.Threading.Thread
Thread1 = New Threading.Thread(AddressOf mod1.DoWork)
Thread1.Start()

The DoWork sub does some stuff and when it's finished i want to change the text of a textbox1 in the main form and start another sub (DoWork2) on the main form under the main thread not the one DoWork is running under.

Plese do not refer me to another post that mighe give me a part answer, try to explain to me what i have to do and why.

View 3 Replies

.net - Main Form Minimized When Modal Dialog Calls Me.Hide()?

Mar 22, 2011

sometimes (not everytimes), when I call the Me.Hide() in a form, which I called with .ShowDialog(), the main form, which called this dialog minimized.

View 2 Replies

Load The Main Form Of A WPF So That A Separate Thread Goes And Gets Data From The Database While The Form Is In An Apartmentstate?

May 15, 2012

How do i load the Main form of a WPF so that a seperate thread goes and gets data from the database while the form is in an apartmentstate? (drag-able / movable) I Know this is possible with opening a new window from your main form like this :

Private Sub openOrderWindow()
Dim OrderWindow As Orders = New Orders
OrderWindow.ShowDialog()
End Sub

[code]....

I've tried putting MyBase.ShowDialog() and .Show() and .9000+ other things The only benefit I've got out of using a seperate thread to load from the databse is i can see the screen right away (as oppose to it being a transparent box until it loads) but i cannot move it around or minimize it?is there any way to make it Movable while it loads?

View 1 Replies

Opening Form Into New Thread Then Closing It Again From The Old Thread?

Dec 15, 2010

I am currently working on a project that has a splashscreen This splash screen is designed to be shown when the main form begins to load its requirements, and then closes once it has loaded... Currently it works like so:

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
frmSplash.Show()
dolotsofloading()
frmSplash.Close()
End Sub

[Code]...

View 5 Replies

Opening Form Bound To Main Data

Jan 3, 2012

I have a form which has my main data. On the form is a button to open another form called AccountNotes.

The table keys are as follows:
tblAccounts
pkAccountID
AccountDetail
etc etc

tblAccountNotes
pkAccountNotes
NotesDetail
fkAccountID

When I open the form AccountNotes how do I ensure it is tied or bound to the main form record I am viewing?

View 2 Replies

Forms :: Prevent A Form From Being Minimized?

Sep 12, 2011

I've got this little 'Sticky Notes' type of application and the form I have is a borderless, taskbarless form and for Windows 2000 compatability I'm using VS 2008 and targeting the 2.0 framework. One of the hurdles I have is that in XP, Vista & 7 when you click the Show Desktop button all of my note's windows get minimized and without a taskbar icon, it's not easy to get them back (at least not for a normal user) & I'm looking for a way to either right after the windows minimize I just have them all show again or if I can skip the minimizing message in the wndproc altogether that'd be great.

I've put together a test app that'll show the messages in a listbox for the form, but I'm not sure how to go about skipping sending the message to the form's base class. Here's a snippet, listMessages is the listbox on the form:

Private Const WmSize As Integer = 5
Private Const SizeRestored As Integer = 0
Private Const SizeMinimized As Integer = 1

[code]....

View 14 Replies

Forms :: Form Settings - Check If File Exist On Main Form

Apr 29, 2011

[Code] I want like to check if a file exist on main form, if not: force open settings form. And then when the user is closing the form with exit button = check if the file exist again. If it doesn't exist, close application. It's a huge application and I need optimized on most parts. Also, the settings form is asking the closing question two times.

View 1 Replies

Forms :: Open A Child Form - Main Form Is Unresponsive?

Apr 20, 2011

When I open my child form,

frm_Analogs.ShowDialog()

It opens up the new form, but now I can not interact with my main form. It will not accept focus or allow me to interact with it.

Do I need to change the form type?

View 4 Replies

VS 2005 - Main Form Closing Immediately After Opening

Jan 27, 2011

I have created a splash screen and it fades in. When the splash screen closes, the main form (MDI) should open. The main form opens but then immediately closes.
vb
Public Class frmSplash
Private Sub frmSplash_FormClosing(ByVal sender As Object, _
ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
'Open the MDI form.
frmMain.Show()
End Sub
[Code] .....

View 3 Replies

Forms :: VB - MDI - Application That Consists Of Mainly One Main Form - Ranging Form Graphs, Tables, Dropdown Boxes, Print Preview

Apr 7, 2010

I have to write an application that consists of mainly one main form, but several different things I wanna display. Pretty standard I guess. So there is a menu, some controls, and the main stuff below (ranging form graphs, tables, dropdown boxes, print preview, etc). I would like to use it like one would use frames in html, design an object that is limited to a box or panel that I define. The literature I have does not give me a clear idea of how to do this (yet). The most obvious seem to be the use of MDI, open a predefined form with no borders, maximize it before showing and remove all minimize/maximize options. But that does not work so well. The form inside the MDI parent does not fit the size that is given for it when it is loaded. e.g.

[CODE]:......................

So my main question is: Is MDI the way to go here at all or are there better/easyer ways to achieve this? If MDI is the way to go, how do I sucessfully restrict a child form inside another object, without giving the user any opportunity to resize (i noticed that I have minnimize/maximize/close buttons, even if I disable them on the child forms themselves)

View 6 Replies

Forms :: Restore A Windows Form Which Is Minimized And Has Lost Focus?

Dec 2, 2009

I have created an app which has a timer control which, when activated and meets a certain criteria, launches a second form with an alert for the user to review and action. this works just fine. Except.... when the main app is minimised and has lost focus, instead of launching the second form to a normal windows state it opens and sits in a minimized state itself and just flashes. How can I get the the second form to restore to a normal windows state?I have tried form2.focus and tried the windowsstate=normal etc but I'm still barking up the wrong tree.

View 2 Replies

Forms :: Control Other Form From A Main Form?

Sep 3, 2009

How to control other form from a main form? For example :

I want to change background color in Form2 after a button in Form1 is clicked.

View 3 Replies

Access Progress Bar On Main Form From Thread On User Control?

Aug 18, 2009

I have a windows application with a main form, on which a user control is added dynamically when a device connects trough USB.

On a user control, there is a thread wich is getting data from the device trough USB and when it is finished, I want to change a progressbar that is located on the main windows form where user control reside.

This is the code that is I call on the user control thread to change the progress bar value:

Frm_Main.UpdateProgressBar(CInt((AllBytesReceived / MaxBytesInFlash) * 100))
and this is a code that is called on the main form:
Private Delegate Sub UpdateProgressBarDelegate(ByVal value As Integer)

[Code]....

View 8 Replies

VS 2010 Form On Different Thread After Opening Outlook Calendar?

May 31, 2011

I have a simple form in VB.NET with one button which when clicked opens an Outlook Explorer to display an Outlook Calendar. When the user closes the Explorer, the form picks up the close event, garbage collects the Outlook objects and attempts to close itself.

However the Me.Close() does not work - if I pause the code on the Me.Close line and set a watch on the Me form object, lots of the form properties say "{"Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on."}System.InvalidOperationException" If someone could help me out with this one I would be a very happy bunny...

[Code]....

View 3 Replies

VS 2005 Class Api Needs To Get A Handle On Form Elements In The Main Worker Thread

Sep 4, 2009

I have a standard windows application called winap. I have a com component which acts as an api to the winap. I have a class in winap call classapi which has all the methods that the api calls and all works well. The problem is that one of the methods in my class api needs to get a handle on form elements in the main worker thread. Whenever I try to access an existing form I keep getting null because the for exists in the main worker thread and my api call is in a seperate thread.

[Code]...

View 5 Replies

Multi-threading Forms - Open A Separate Form As A Separate UI Thread From The Start Up Form

Oct 27, 2011

I have a few forms that have a lot of really intensive updating along with a great deal of user interface (text boxes, button clicking etc) Is it possible to open a separate form as a separate UI thread from the start up form that called it to "show" or open or whatever the new method might be?

View 6 Replies

Forms :: Add A Login Screen In Main Form

Mar 17, 2011

I've created a windows form application in vb 2010. I've got all my forms complete and now want to add a Login screen. One the login screen, after the username/password is entered and OK is pressed, I try to open the a connection string. Obviously if the connection fails, the user has entered the incorrect credentials. If the credentials are ok, True is returned and I then open up the Main form that shows the correct items for the logged in user.

[Code]...

View 5 Replies

Get A Subtotal From Multiple Forms And Add Them Together On The Main Form?

Nov 20, 2009

I need to get a subtotal from multiple forms and add them together on the main form. I can add two forms together but not the third.

View 1 Replies

Way To Be Able To Use Tab Control On Main Form And Transfer All 3 Other Forms

Feb 8, 2011

I am looking for a way to be able to use the tab control on my main form and transfer all 3 other forms onto that main form that has the tab control. Problem being is that some functions are named the same in each of the septate forms i want to bring into just one for the tab control.Is there a way to separate the code for each form ON the main form of the tab control so i don't have to rename/recode each of the 3 forms i want to place on the main form of the tab control? [code]so when i put both form1 and form2 code on the main form where the tab control is, its going to tell me that i have a duplicate function name.

View 2 Replies

Forms :: Closing And Re-opening The Same Form

Feb 22, 2010

I am attempting to find a way to get an existing form to close and re-open (with the controls re-set). If I use a method like

[Code]...

View 4 Replies

Forms :: Opening Form Using A Threadpool?

Sep 15, 2009

I want to open a VB.net form using a ThreadPool with a maximum of 10 threads. I need to do this because, the form should open based on a live event and i need atmost 10 forms on the desktop at a time. If i open the form on every live event without using a ThreadPool, the desktop will be floaded with many forms. I am using QueueUserWorkItem method of threadpool to queue a method which opens the form. In this queued method, there is form1.show() statement called. But after displaying the form, this method finishes execution and again we have 10 threads available in the system. I somehow want to either keep this method running so that 1 thread is occupied or i want to keep the thread alive till the form1 is closed by the user. I want the 11th form to appear on the desktop, only when any of the existing forms out of the 10 (already on desktop) is closed.

View 2 Replies

Forms :: Determining Opening Location Of A Form?

Jul 4, 2011

I have a button on my form. When I click it, I want a form to be opened exactly on the location where the button is.

View 1 Replies

Forms :: Form Moves Behind Application When Opening?

Jul 20, 2009

I am writing a Class Library for a GIS Windows application. The class has a form that I open when I load the dll command in the application. After the form opens the form moves to the back of the GIS Windows application, and I want it to be in front of the GIS Windows application all the time. How can I do this?

View 1 Replies

Using 'Application.Designer.vb' To Set One Of Two Forms As Main-form For Splash Screen

May 25, 2009

I am using the following code in the 'Application.Designer.vb' to set one of the two forms as the the mainform for my splash screen.The global string array gSetupStr(0,1) only produces a correct result when any Msgbox is inserted before the 'If' statement.However,I do not want the Msgbox during a splash screen, but do want to control the mainform. [code]

View 1 Replies

Mdi Child Form Order - Move The New Form Behind The Main Form While It Loads

Aug 5, 2010

i have my main child form open. then i show the new form:

[Code]...

but when the form opens it flickers a lot. so i want move the new form behind the main form while it loads so the user does not see the flicker. once it is done loading i will set the form to topmost. how do i move the new form behind the main form?

View 12 Replies

Forms :: Opening A New Application In A Panel Of A Windows Form?

May 14, 2010

i have a query of opening a new Application(eg. UgNx,Ansys)file with in a Panel (Which is already dropped on a Window Form).

For Example :-There in one Window Form and i have fixed a Panel there now with in the panel i want to open a new Application like other softwares UG NX or Ansys.

View 2 Replies

Forms :: Let The Users To Select Their Desired Wallpapers In The Window Main Form?

May 23, 2010

I wanted to let the users to select their desired wallpapers dynamically in the window main form. Is it possible? Funtional spec:

1. Let the users to select their desired wallpapers from any directory.

2. Save the wallpaper in the database.

3. Load the wallpaper in the main form after login sucessful.

View 1 Replies

Forms :: Question After Splash-screen Shows Main Form Is In The Back?

Sep 24, 2010

I have a splash screen, the default from Visual studio. It loads up, is shown for a few seconds, then, when it disappears, the main form is loaded. Now here is the problem: the main form appears in the back, behind the windows explorer window I load the application from.

The weird thing is that this only happens on some computers, particularly Windows XP machines.I tried a lot of things like BringToFront() or TopMost = true in the on Load event of the form but nothing seems to change this.

View 3 Replies

VS 2008 : Making 'main Window' Form Acting As A Container For The Other Forms?

Mar 17, 2009

Am devloping an application with multiple forms, which reside on top of a main form. i.e the main application window. The 'child' forms do not need to be linked in any way as they do not pass information to the parent form, as all the parent form does is act as main window.Now I would like to know what is the correct way for the 'main window' form acting as a container for the other forms? So that all the smaller secondary forms stay focused on top of the main application form, that when the main window is minimized, so these forms should do also etc..

I have read other posts and they mention, leaving all the forms standard i.e. IsMdiContainer = False and then using form.showDialog() to call the secondary forms. This did not work for me as what happens is that as soon as I give focus to the main app form, the secondary form disappears underneath.I tired making the main app form IsMdiContainer = True and when it loads calling:

frmMemberForm.MdiParent = Me

Now this works, because I can click off the form and minimize the app etc and the frmMemberForm doesn't disappear. However if i close the MemberForm and reopen it, it looses this property and once again when it looses focus, it will disappear.

View 16 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved