473,395 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

speedin up some apps

Hey this is a dumb question, but I need to speed up an app and having a
brain fart today...

So I have this code, (feel free to use it if you want)

Public Sub LoadForm(ByVal formType As Type, ByVal fParent As Form, Optional
ByVal Singleton As Boolean = True, Optional ByVal Modal As Boolean = False)

Dim cThread As System.Threading.Thread

Dim cTPool As System.Threading.ThreadPool

Dim tForm As System.Windows.Forms.Form

Try

tForm = FormAlreadyExists(fParent, formType)

If (tForm Is Nothing) Then

tForm = Activator.CreateInstance(formType)

If (fParent.IsMdiContainer) Then

tForm.MdiParent = fParent

End If

Else

If (Singleton) Then

tForm.Focus()

Else

tForm = Activator.CreateInstance(formType)

If (fParent.IsMdiContainer) Then

tForm.MdiParent = fParent

End If

End If

End If

If (Modal) Then

tForm.ShowDialog(fParent)

Else

tForm.Show()

End If

Catch ex As Exception

End Try

End Sub

basically, on the "shows" I want to spin them off on an independent thread.
I should be able to just free thread it like VB6 but wondering if someone
had a suggestion as to how to do this the best way. as you can see I was
considering using a thread pool, but thats just not going to work right.

Would appreciate if anyone has anything.

Thanks,

cJ
Nov 20 '05 #1
0 712

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Sam Watson | last post by:
Hi, I could use a little help with a project i'm going to build. I know I want to use python and wxWindows but thats about all I know. The client will be linux or windows. The server will be...
2
by: BryanEverly | last post by:
Hi, I'm struggling with a problem and was hoping that someone on this group could point me in the right direction. I'm not looking for a free ride, just a suggestion as to how best to use all...
5
by: Rod | last post by:
About two weeks ago I had an accident and have broken my left elbow and left wrist. For doing things like Word or e-mail (I use Outlook for) I have been using Microsoft's speech recognition and...
4
by: Fouad Fahim | last post by:
Hi all, My issue is that I'm working on a project that should play the role of an adaptor between internal and external application. Each change done in the internal application should be...
0
by: Glenn Engelbart | last post by:
I am trying to find out a way to get more code re-use & object orientation in the UI portion of my apps. (There already is plenty of both in the DataAccess & Business Logic portion of my apps. ...
6
by: V. Jenks | last post by:
I apologize if this is the wrong forum for this, I could not locate one that was exactly appropriate for this topic. Over the last couple of years I've been doing a lot of reading on design...
0
by: Thomas B. Johansen | last post by:
Dear group i im trying make a small apps there is testing the ip numbers and domains name found in a mail header on one or more RBL servers and when doing this it is slow to wait for one ip...
5
by: nylyst | last post by:
I've run into a rather strange situation, and can't seem to find any details on why this would even be happening, so here goes: I've created an app to force users to update their pcAnywhere...
46
by: ajba74 | last post by:
Hi fellows, I am reading some books to learn the C programming language, and sometimes I have the feeling that when somebody becomes a C expert, he must learn a more modern and object-oriented...
3
by: lds | last post by:
On our server we have both applications that have been migrated to use v2.0 of the framework as well as apps that have not yet been migrated and still use 1.1. When I tried to deploy my v2.0 app...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.