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


ADVERTISEMENT

VS 2008 2 Threadpool - One Threadpool For Scanning Files And Second Threadpool For Moving File's Into Drive's

Jun 4, 2011

I m trying to move all my drive's files into h drive firstly i have added all drives in threadpool for scanning and when scanning of any drive finish (Without waiting for other drive's complete ) it will move file's to h drive but it is not working as i wanted that's why i need two threadpool - one threadpool for scanning files and second threadpool for moving file's into drive's

View 11 Replies

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

Forms :: Threadpool With Progress Bar?

Jul 2, 2009

currently i am using a threadpool that contain a number of thread. This number of thread can be different everytime, sometimes 5, sometimes 10, sometimes 15 and so on (multiple of 5). So now i have it working good by using for loop to queue the thread into threadpool. Now the problems is i do not know how to make the progress bar depending on my threadpool. I want my progress bar to complete only when all the thread are done. After searching google, i found that maybe it can be solve by using AutoResetEvent(false), but after i apply to my program, it still did not work, my program hang at xEvent.WaitOne() method and didnt proceed further, anyone can explain to me how to solve the problem? Or got any other ways? For your information, only 5 threads can be running at the same time as the requirement state so (so i set the setmaxthread to 5 already).

View 1 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 :: 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

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

Possible To Use DLL For Opening Forms?

Jan 23, 2011

I got a question can I make a dll for opening forms?

View 3 Replies

Opening Forms In Tab Control

Jul 9, 2009

I'm new to non internet programing. But I got to start somewhere. So i'll try and make this simple I have a MDI parent form with a tab control section. From a link in the toolbar i would like to open a diffrent form in my tab section. This is what I figured out so far if its even close.

[Code]...

View 2 Replies

Opening Random Forms?

Apr 10, 2012

on visual basic how can you open random forms? (im doing a quiz with questions on separate forms and would like to open random forms to show the random questions)

View 24 Replies

Dynamic Buttons Opening Different Forms

Nov 13, 2010

Firstly though, I'll have to mention that I'm a relative newcomer to vb.net and don't really know that much about advanced functions.I have my main form which dynamically generates 15 buttons.

Each of these buttons will need to open another form, depending on which form has been assigned to that button in a config file (the config file isn't yet done, as I want to get it working simply by hardcoding the name of the forms for the time being)

The way I have it in my head is that I would assign the form name that needs to be open to the name of the button, if that makes sense....However, I have absolutely no clue how to do it, I've tried a couple of things but to no avail.

Here's my code, and I have no problem changing any part of it if it will help things along, this is just the only way I know how to create dynamic buttons.[CODE...]

View 8 Replies

Forms :: Opening An App Over All Other Open Windows?

Sep 17, 2011

Is there any switch that will allow you to open an application over all the other currently open applications? My problem is getting Explorer to open over all the other currently open applications. Right now, it only opens in the background......

View 5 Replies

Multiple Forms Opening When Not Desired

May 16, 2012

I have a group of buttons all with different labels. I want to have each of these specific buttons open up the same form, but my problem is when I write the code of form1.show it pops open twenty or so different windows. How to I make one button open just one window?

View 15 Replies

Multiple Projects And Opening Forms?

Apr 29, 2010

Over the past months I have been working on small windows forms applications and learning vb as i go along. The aim was to pull these altogether into one big application.

I am now at the stage of pulling these together I have created a new project (called MainMenu) and designed all the buttons and interface. I have added my other projects (SISApp, CURApp) to this project. File > Add > Existing Project. I can see these projects in the solution explorer.

Now my problem. How can show Form2 in the SISApp project when I click ButtonX in the MainMenu project.

I dont just want to show Form2, i want all the functionality and the database connection in form2 to also work etc.

View 1 Replies

Switch Between Forms Without Opening A New Window?

Jan 16, 2012

I might be going about this the wrong way, but I'm trying to create a form that will include a single button, for instance "Enter". When "Enter" is clicked, I want the form to then display the contents of form 2, which might include more buttons and/or a textbox, etc. I want to do all this without ever opening or closing a form.

View 3 Replies

VS 2008 : Opening MDI Child Forms?

Dec 29, 2010

In a MDI application, for opening a form in the MDI, I am using the following code

Private Sub RoleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RoleToolStripMenuItem.Click
Dim lobj_ChildForm As frmRole
'Check if form is already open
lobj_ChildForm = Nothing

[code]....

As you can see, I need loopong through all the open child forms.

View 2 Replies

Dynamic Buttons Opening Specific Forms?

Jun 6, 2011

I have a form which gets populated by 15 buttons dynamically at runtime (these need to be dynamic as there will be a user config file at some point)What I need these buttons to do is to open a specific form when clicked. Which form that opens will be dealt with in the config file.

Public Class frm_MainScreen
Private Sub frm_MainScreen_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim count As Integer
Dim ImageDir As String

[code].....

View 2 Replies

Forms :: Prevent Browser From Opening New IE Windows?

May 19, 2010

I am making a webbrowser,how to prevent my browser from opening new IE windows. Because what happens is, there are some links that will open new windows and therefore IE comes in place because it is set as default windows browser which I really don't want because my browser looks really bad if it opens links in another webbrowser.I want it to be just a basic browser, it has only one window, and it should navigate within that window. This is because the browser is integrated in a bigger application only for some website applications that are related to this main application.I am using VB.net 2008 Express Edition?

View 9 Replies

Forms :: VB Web Browser Opening .html Files

Jan 20, 2011

i have my web browser made by visual basic have some futeurs like history , bookmarks , downloader, HTML Editor, Source, etc i make my it my default web browser but when i open .html or .htm files how can i make it navigate to the HTML File (and please without using open folder browser) i wanna make it like mozilla or internet explorer navigate to the site i have saved befor or make it

View 1 Replies

Multiple Forms - Quickly Opening All Tabs?

May 11, 2010

I'm just having a small problem with tabpages. I have a program that have multiple forms (on startup they are all created and hidden, except for the one being viewed by the user). When the user open one particular form, I has a tab control with two pages. I also have a toolbar. when the user click a menu option, I call a method that assigns all my controls to a variable (to be used in an insert statement later).

Here's an example of that Sub:
Public Sub SetValues()
'page 1
DateCreated = Date.Now
DateEdited = Date.Now
DateCompleted = Me.DateTimePicker2.Text
[Code] .....

The problem is, the controls on the second page cant be "seen" (this is confirmed by placing a msgbox in the above sub, which comes up blank) until the user open the second tab, at least just once. Then its ok. I know I can just run a small method to quickly open all tabs, but is there a reason this is happening, and a better way to do this?

View 11 Replies

Opening Different Forms Depending On Account Type?

Apr 13, 2012

I've just finished creating a basic login system which enables you to create an account and select either a "Student" or "Teacher" account.

Once the account is created it's stored in an Access 2007 database. The field the account type gets stored in is called AccountType. When users log in with their unique username and password I want the program to take them to a different form depending on whether they have a student or teacher account.

View 2 Replies

Anti Multiple Opening Of Same Dynamic Child Forms?

Sep 14, 2009

I have a program that will let you open a certain table in the database and query it on a child form in a MDI parent form. Of course the child form is a new instance of an existing form.The thing I want to do is that the opened table in the child form cannot be reopened again in the other child form. So I did was to create a childform name on every new instance of a childform depending what is the name of the table.

The first thing I did to do this restriction is to put the names of the opened table to an public array and when the user tried to reopen the table, the program will check if the childform name is already existing... and if it exist it will not let the user to open the table in new childform.When the childform is close it will erase it's name to the public array. And it can be open again.If you don't understand what I want to do this is the situation for example in a microsoft office when a word document file was open it will be put in a childform, and when the user tried to open the word file again and still the word file is open in the microsoft word the application will tell it's user that the word document file is still open.

View 3 Replies

Buttons Are Opening Wrong Forms Inside A Panel?

Mar 18, 2010

not quite sure why this is happening but I am just debugging right now and the buttons I am using are opening the wrong forms, I have made sure of the form names, button names etc and it looks all good but specifically the btnPrintReport is opening up the form enterAuditForm while btnProcessAudit is opening printAuditForm instead of their correct ones.

Here's my code, it is rather simple. The reason why I am using a separate sub as my btnPrintReport is because I am using that also on the baseForm's OnLoad Event, which again is also opening the wrong form.

[Code]...

View 4 Replies

Forms :: Opening Childform Creates New Instance Of ParentForm

Dec 31, 2011

I am in the process of upgrading a VB6 Project to Vb.net. My problem is that when I open a child form in my project from within the Parent form a new instance of the Parent form is created. The code is fairly simple:

frmnewContract.MdiParent = Me
frmnewContract.Show()

View 3 Replies

Multiple Windows Forms Opening Upon Program Launch

May 8, 2012

I am running Microsoft Visual Basic 2010 Express. I created a simple program that is nothing more than dozens of Windows Forms that are linked together by the various clickable buttons I put on each form. The program is like a "book" with several pages, and you jump to a specific page by clicking on specific buttons on the current page ("Windows Form").

My question is, how do I change my program so that when it is launched, instead of just 1 Windows Form opening, the program opens up several Windows Forms (of my choosing) automatically? In other words, instead of my "book" (VB program) opening "page 1," when I run it, I want it so that pages 4, 7, 8, 10, and 15, are "opened" whenever I run my "book."

Is there some code I need to insert into each Windows Form I wanted opened automatically when the program is loaded? Or is this a MS VB 2010 Express environment option I need to set?

View 7 Replies

VS 2010 : Make A Form With Multiple Buttons Opening Different Things Than Having A Form That Has Lots Group Boxes For Each Tab?

Jul 25, 2011

Is there a better way to make a form with multiple buttons opening different things than having a form that has lots group boxes for each tab. So in the begining each box will be invisible and when you click the button the corresponding group box will become visible. Is there any other way?It will be like a background image and it'll have buttons that will mask it with invisible buttons. when the button is clicked it will open the corresponding group box.

View 5 Replies

Error While Opening Form In Designmode, Pressing F5 Opens Form

Jan 15, 2009

Whenever I want to reopen a project that I didn't worked on for several month and want to view my form in design mode I receive following error.

Warning1Method not found: 'Void System.Windows.Forms.Design.ParentControlDesigner.WndProc(System.Windows.Forms.Message ByRef)'.00

[Code]....

I used this project in VB2005 express, but also in VB2008.

View 4 Replies

Winforms - Know The Event Order Of Form Which Is Executed While Opening Form

Jun 30, 2011

I would like to know the event order of form which is executed while opening form. I am showing my form using following code and the code in form_load event executes twice. Once when the form variables are initialised and second when form is displayed. I want it to execute once only. form showing code:

[Code]...

View 1 Replies

VB 2010 - Opening And Closing Child Forms Inside MDI Parent?

Oct 29, 2011

It is my goal to write a program to run a retail store. I am an intermediate Access developer, so I have a good grasp of the basics.However, I find that developing in VB 2010 is quite different.I will have forms for:

Company Information
Employee Information
Supplier Information
Customer Information
Invoices & Purchase Orders

All I really need to know at this point is the code to open and close each form.

View 4 Replies







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