I'm having a problem, in vb6 there was a way to stall the application and
wait for user input from a form.
Below I have attached the code of my sub main.
I hope someone has the ability to fix this.
right now the form blinks in and out of existance as fast as the project
compiles, so that won't do.
Module codeStartup
Sub main()
Dim nFrmLogin As frmLogin
nFrmLogin = New frmLogin
nFrmLogin.ShowInTaskbar() = False
nFrmLogin.Show()
'must wait here for user input
Dim fUsername As String, fPassword As String, ftcp As String
fUsername = nFrmLogin.txtUsername.Text
fPassword = nFrmLogin.txtPassword.Text
ftcp = nFrmLogin.txtIP.Text
'
Dim nFrmController As New frmController
nFrmController.Show() 'main application form
'right now the code will exit here.
End Sub
End Module 2 4338
Thanks! That worked
"Tom Spink" <th**********@ntlworld.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Hi Shadowboxer,
nFrmLogin.Show()
Change that to nFrmLogin.ShowDialog()
nFrmController.Show() 'main application form
Change that to Application.Run(nFrmController)
-- HTH, -- Tom Spink, Über Geek
Please respond to the newsgroup, so all can benefit
"Maybe it's a game called 'Punish the User'"
"Shadowboxer" <sh*********@mac.com> wrote in message news:bi********@library2.airnews.net... I'm having a problem, in vb6 there was a way to stall the application
and wait for user input from a form. Below I have attached the code of my sub main.
I hope someone has the ability to fix this.
right now the form blinks in and out of existance as fast as the project compiles, so that won't do.
Module codeStartup Sub main()
Dim nFrmLogin As frmLogin
nFrmLogin = New frmLogin
nFrmLogin.ShowInTaskbar() = False
nFrmLogin.Show()
'must wait here for user input
Dim fUsername As String, fPassword As String, ftcp As String
fUsername = nFrmLogin.txtUsername.Text
fPassword = nFrmLogin.txtPassword.Text
ftcp = nFrmLogin.txtIP.Text
'
Dim nFrmController As New frmController
nFrmController.Show() 'main application form
'right now the code will exit here.
End Sub
End Module
Hello,
"Shadowboxer" <sh*********@mac.com> schrieb: I'm having a problem, in vb6 there was a way to stall the application and wait for user input from a form. Below I have attached the code of my sub main.
I hope someone has the ability to fix this.
right now the form blinks in and out of existance as fast as the project compiles, so that won't do.
Module codeStartup Sub main()
Dim nFrmLogin As frmLogin
nFrmLogin = New frmLogin
nFrmLogin.ShowInTaskbar() = False
nFrmLogin.Show()
'must wait here for user input
Call 'nFrmLogin''s 'ShowDialog' method instead of calling its 'Show' method.
Dim fUsername As String, fPassword As String, ftcp As String
fUsername = nFrmLogin.txtUsername.Text
fPassword = nFrmLogin.txtPassword.Text
ftcp = nFrmLogin.txtIP.Text
'
Dim nFrmController As New frmController
nFrmController.Show() 'main application form
'right now the code will exit here.
Your application needs a message loop:
\\\
Application.Run(nFrmController)
///
Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET http://www.mvps.org/dotnet This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: bughunter |
last post by:
Hi,
Consider this code:
----
Monitor.Pulse(oLock);
Monitor.Exit(oLock);
----
If a thread was waiting on oLock then will the current thread
|
by: Raymond Lewallen |
last post by:
How to wait for a process to stop completion is my goal. Obviously, the
looping while waiting for the HasExited property is not a solution.. but
thats the best I can come up off the top of my...
|
by: andreas |
last post by:
Hi,
Is it possible to stop a sub in the middle waiting for a button clic to go
further ?
F.e.
dim blnToStop as boolean
private sub test
.......
.......
|
by: Bob |
last post by:
I launch Word from within my application (Vs2005, VB) and I would like to
make it necessary for the just opened Word to be closed before the rest of
my code in the calling sub can execute. How can...
|
by: Flyzone |
last post by:
I have a list of parameters.
I need to run in thread a command, one thread for one parameter.
So i made a for loop, creating 5 threads and waiting their stop with:
for parameter in parameters
...
|
by: Lemune |
last post by:
Hi..
I am developing an application that connect to database on the other
side of the net.
And each time i want to connect to database and run some sql command,
i want my user to know that there...
|
by: telduivel |
last post by:
Can someone please help me with this:
I have a python script, that at some point calls a linux bash script (.sh). Starting the shell script is the last thing my python script needs to do, so I...
|
by: igor221189 |
last post by:
Hello everyone.
I have Access 2000 database which holds student records in the school.It stores subject grades for each student.In the 'Student Grade Form', I would like to search student surname...
|
by: erikcw |
last post by:
Hi,
I have a cgi script where users are uploading large files for
processing. I want to launch a subprocess to process the file so the
user doesn't have to wait for the page to load.
What is...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |