Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Program Doesnt Close Properly


Hi

i have created a program which has no errors at all apart from the user closes it (after use) it doesnt end properly - i use Unload and load to switch between the 2 forms during runtime.

but the user has to use CTRL-ALT-DEL in order to properly exit it from the taskbar - how can i fix this error?

i have included a copy of it for reference.

thx




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Program Doesnt Close Properly
I made a program and i run it using a Sub Main, but the problem is after i close it the program keeps running (eg in ctrl alt del u can see it) and im not sure how to get rid of it completely.

Close Program Properly
Hi,

When you click on the X in the top right corner it closes down my program visually, however it is still running in memory.

Is there a way to unload the program when a user clicks on the X.

Thanks in advance.

jono

Program Won't Properly Close
Hey guys

Simple quesion - Why won't my program close corectly? It disapears off the screen alright, but when I do an alt-ctrl-del it's still in the list.

Thanks.

Program Doesn't Close Properly
i have a program in VB5 that uses MDI form.
if i press the exit button - it exits ok
but if i press the 'x' sign (close) then it stays in the task manager.
how do i fix this??
thanx

Inet1 Doesnt Download Properly
Str = Inet1.OpenURL("http://mysite.html")

Do While Inet1.StillExecuting
DoEvents
Loop

This is how i am openeing the site but it doesnt work... It only downloads a part of the HTML code for some reason... I even tried doing it with 2 command buttons. In one i put the OpenURL statement and then i waited like for 10 seconds and pressed the second one to write the data to file, and the file showed that only partial data was taken, actually only one line in TXT...

Label Doesnt Wrap Properly.. Why?
Hello,

I just realised that the wrap property in a Label doesnt actually do anything...!!!

It doesnt do what it says it should do..!! I dont see any wrapping on my text.

But if you say drag a checkbox and type in something long (anything random) and resize it, you will see the text repositioning it self depending on its size..

How can i achieve this..??

Urgent : File Doesnt Gets Recieved Properly
hello
This is very urgent .
i need replies as fast as possible


check out the zipped file ..........


which is of a client and a server........

the file doesnt gets recieved properly by the server side

i mean there r redundancies in the recived file ...
some black boxes occurs...
plsss check the code......plss!!!!
plss reply fast
thanx
Prasad

Form Just Doesnt Close...
Never had this issue..but i have a form..on the form I have a button (an exit button) clicking it right away works fine...

But if I click another button which opens another form, and then close that form...and then try to close the original form..it doesnt close..it just sits there..

Ive debugged the code and it runs but nothing happens the form just sits there. It does close if you click the little X on the top right corner.

There is no code on the query unload or anything that would cause it to stay open. And this only happens when I open that other form from within this form...


VB Code:
Private Sub cmdExit_Click()On Error GoTo Err_Handler Unload frmSequenceOfOperations Done:Exit Sub Err_Handler:MsgBox Err.description, vbCritical, "Error #: " & Err.NumberResume DoneEnd Sub


Then I set it to nothing in the unload event...

Any clue why this form doesnt close ????

Why Me? {app Doesn't Close Properly}
I compiled a VB program in which I use several forms. The problem I encountered is with the executable and has me mystified.

If I execute the .exe file from it's installed directory or any of several other test directories, the program does not terminate properly when the Terminate button [the X in the window's upper right corner] is the means of ending the program. Although the program windows disappear from the display, the program is still runnning according to Task Manager. The program also has a startup check to see if an instance is already running and this test also says the program is already running.

However, if I execute the same .exe file from the directory in which I have been doing my VB development, i.e., the same place my .vbp, .frm, .frx files, etc., are located, it shuts down cleanly.

Also, if I use the program's command button to end the program, it terminates cleanly from any of the tested locations.

Any ideas or suggestions?

FrmLogOn.Close Doesnt Work?
I want to close my log on form, its part of a little log on system in excel. Below is the code I have, but the frmLogOn.Close doesn't work. Why?

Private Sub cmdOk_Click()
If txtUsername.Text = "andrew" And txtpassword.Text = "dave" Then
Sheets("menu").Select
frmLogOn.Close
Else: MsgBox ("Incorrect username or password.")
End If
End Sub

Any help would be appreciated!

Excel Doesn't Close Properly STILL !!!!!!!!!!!!
Hi everybody,

I'm really sorry for spamming the VBCity forum with Excel problems, but this thing is KILLING me seriously.

OK, I'm gonna explain from the beginnin', an hope that someone can help.

I create an Excel instance in the following way...

Code:
    Dim ExcelApplication As Excel.Application
    Dim ExcelWorkBook As Excel.Workbook
    Dim ExcelWorkSheet As Excel.Worksheet
    
    Set ExcelApplication = New Excel.Application
    
    With ExcelApplication
        .DisplayAlerts = False
        .Interactive = True
        .IgnoreRemoteRequests = False
        .EnableSound = True
        .EnableEvents = True
    End With

    Set ExcelWorkBook = ExcelApplication.Workbooks.Add
    Set ExcelWorkSheet = ExcelApplication.Workbooks(1).Worksheets(1)


This causes no problems. I then proceed with my data exporting/formatting, which, again, causes no problems. I must point out at this stage, that with outputing a large amount of data to the worksheet, I had problems (as have others I understand...) but got around this with a simple 'save to temp file' type thing, which goes something like this...

Code:
    If FileExists(App.Path & "Temp.xls") Then
        ExcelWorkBook.Save
    Else
        ExcelWorkBook.SaveAs App.Path & "Temp.xls"
    End If
    
    ExcelWorkBook.Close False
    
    Set ExcelWorkSheet = Nothing
    Set ExcelWorkBook = Nothing
    
    ExcelApplication.Quit
    
    DoEvents
    
    Set ExcelApplication = Nothing
    
    Set ExcelApplication = New Excel.Application
    
    With ExcelApplication
        .DisplayAlerts = False
        .Interactive = True
        .IgnoreRemoteRequests = False
        .EnableSound = True
        .EnableEvents = True
    End With
    
    Set ExcelWorkBook = ExcelApplication.Workbooks.Open(App.Path & "Temp.xls")
    Set ExcelWorkSheet = ExcelApplication.Workbooks(1).Worksheets(1)


I now have no problems outputting more than 3000 lines of data with up toi 200 columns in this worksheet.

However, at the end of my export procedure, then following code...

Code:
    ExcelWorkBook.Close False
    
    Set ExcelWorkSheet = Nothing
    Set ExcelWorkBook = Nothing
    
    ExcelApplication.Quit
    
    Set ExcelApplication = Nothing


...I seel to have the 'Excel' instance always visible in the task manager. The problem arises when somewhere else in the program, I recall this procedure, and the application terminates because (apparently) Excel is already open...??!!*$#

PLEASE, please, please, please, please, please, please is there someone who can help me, maybe with a way of automatically killing any task called 'Excel' currently running on the computer...?

Currently I'm in a certain state of mind...
If there is anybody that can help me...
I would be eternally greatful...

"Very funny, Scotty. Now beam down my clothes!" - Captain James Tiberius Kirk
"To Alcohol! The cause of, and solution to, all of life's problems" - Homer J. Simpson
"I'm particularly well-known for my seashell collection. Perhaps you've seen it? I keep it on beaches all around the world" - Antony Gibbs

Make Outlook.exe Process Close Properly
hello,
I have some VB code that automatically composes an send an e-mail via Outlook 2002 and I've been having the problem of after the VB code executable has finished running the Outlook.exe process is left running in the background, which I can see when I look in the Processes tab of Windows Task Manager.
What changes do I have to do to the code to make the Outlook.exe process properly close after the e-mail has been sent and the VB code has finished executing?
thanks in advance,
david
------------

Code:
Dim OutApp As Object
Dim OutMail As Object
Dim SigString As String
Dim Signature As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'figure out how to randomize the number to go between 2 and whatever # I'm up to'
SigString = "C:Documents and SettingsAdminApplication DataMicrosoftSignaturesdgr2.htm"

If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = "where's the signature?"
End If

On Error Resume Next
With OutMail
.To = "m.Min@RorSncis.com"
.CC = "ra@critdjume.com"
.BCC = ""
.Subject = "CABCALLS & CABLETTERS record counts for " & Format(Date, "mm/dd/yy")
.HTMLBody = "Hello Pam:<br><br>" & _
"For " & Format(Date, "mm/dd/yy") & ":&nbsp;*&nbsp;*&nbsp;*&nbsp;*&nbsp;*# of Records<br>" & _
"CABLETTERS.TXT&nbsp;*&nbsp;*" & CABLETTERSlineCount & "<br>" & _
"CABCALLS.TXT&nbsp;*&nbsp;*&nbsp;*&nbsp;*" & CABCALLSlineCount & "<br><br>" & Signature
.Display
End With

On Error GoTo 0

TimeDelay (4)
AppActivate OutMail
VbSendKeys "^{ENTER}"
AppActivate OutMail
VbSendKeys "%{F4}"
AppActivate OutMail
VbSendKeys "Y"

Set OutMail = Nothing
Set OutApp = Nothing

------------

Make Outlook.exe Process Close Properly
hello,
I have some VB code that automatically composes an send an e-mail via Outlook 2002 and I've been having the problem of after the VB code executable has finished running the Outlook.exe process is left running in the background, which I can see when I look in the Processes tab of Windows Task Manager.
What changes do I have to do to the code to make the Outlook.exe process properly close after the e-mail has been sent and the VB code has finished executing?
thanks in advance,
david
------------

Code:


Dim OutApp As Object
Dim OutMail As Object
Dim SigString As String
Dim Signature As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'figure out how to randomize the number to go between 2 and whatever # I'm up to'
SigString = "C:Documents and SettingsAdminApplication DataMicrosoftSignaturesdgr2.htm"

If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = "where's the signature?"
End If

On Error Resume Next
With OutMail
.To = "m.Min@RorSncis.com"
.CC = "ra@critdjume.com"
.BCC = ""
.Subject = "CABCALLS & CABLETTERS record counts for " & Format(Date, "mm/dd/yy")
.HTMLBody = "Hello Pam:<br><br>" & _
"For " & Format(Date, "mm/dd/yy") & ":&nbsp;*&nbsp;*&nbsp;*&nbsp;*&nbsp;*# of Records<br>" & _
"CABLETTERS.TXT&nbsp;*&nbsp;*" & CABLETTERSlineCount & "<br>" & _
"CABCALLS.TXT&nbsp;*&nbsp;*&nbsp;*&nbsp;*" & CABCALLSlineCount & "<br><br>" & Signature
.Display
End With

On Error GoTo 0

TimeDelay (4)
AppActivate OutMail
VbSendKeys "^{ENTER}"
AppActivate OutMail
VbSendKeys "%{F4}"
AppActivate OutMail
VbSendKeys "Y"

Set OutMail = Nothing
Set OutApp = Nothing


------------

Make Outlook.exe Process Close Properly
hello,
I have some VB code that automatically composes an send an e-mail via Outlook 2002 and I've been having the problem of after the VB code executable has finished running the Outlook.exe process is left running in the background, which I can see when I look in the Processes tab of Windows Task Manager.  
What changes do I have to do to the code to make the Outlook.exe process properly close after the e-mail has been sent and the VB code has finished executing?
thanks in advance,
david
------------
CODEDim OutApp As Object
    Dim OutMail As Object
    Dim SigString As String
    Dim Signature As String

    Set OutApp = CreateObject("Outlook.Application")
    OutApp.Session.Logon
    Set OutMail = OutApp.CreateItem(0)

    'figure out how to randomize the number to go between 2 and whatever # I'm up to'
    SigString = "C:Documents and SettingsAdminApplication DataMicrosoftSignaturesdgr2.htm"

    If Dir(SigString) <> "" Then
        Signature = GetBoiler(SigString)
    Else
       Signature = "where's the signature?"
    End If

    On Error Resume Next
    With OutMail
        .To = "m.Min@RorSncis.com"
        .CC = "ra@critdjume.com"
        .BCC = ""
        .Subject = "CABCALLS & CABLETTERS record counts for " & Format(Date, "mm/dd/yy")
        .HTMLBody = "Hello Pam:<br><br>" & _
                "For " & Format(Date, "mm/dd/yy") & ":&nbsp;&#160;&nbsp;&#160;&nbsp;&#160;&nbsp;&#160;&nbsp;&#160;# of Records<br>" & _
                "CABLETTERS.TXT&nbsp;&#160;&nbsp;&#160;" & CABLETTERSlineCount & "<br>" & _
                "CABCALLS.TXT&nbsp;&#160;&nbsp;&#160;&nbsp;&#160;&nbsp;&#160;" & CABCALLSlineCount & "<br><br>" & Signature
        .Display
    End With

    On Error GoTo 0

    TimeDelay (4)
    AppActivate OutMail
    VbSendKeys "^{ENTER}"
    AppActivate OutMail
    VbSendKeys "%{F4}"
    AppActivate OutMail
    VbSendKeys "Y"

    Set OutMail = Nothing
    Set OutApp = Nothing

*solved* Why Wont Project Close Properly?
Hi I can't figure out every time I close the form (I use red X top right to close project it hangs.

I have ADO database and closed like FAQ said.

I have no Form Unload proc? Do i need one? how can i find my BUG? i F8 on Unload Query, and dissapears at the end.?

Do you want my code? If so Which piece or the Whole Thing?

I can post little cut n paste but don't know how to post entire code?

pls Help...Maybe Tomorrow I can finish it! Yay!



Edited by - Hopeless on 2/29/2004 7:36:37 PM

Make Outlook.exe Process Close Properly
hello,
I have some VB code that automatically composes an send an e-mail via Outlook 2002 and I've been having the problem of after the VB code executable has finished running the Outlook.exe process is left running in the background, which I can see when I look in the Processes tab of Windows Task Manager.
What changes do I have to do to the code to make the Outlook.exe process properly close after the e-mail has been sent and the VB code has finished executing?
thanks in advance,
david
------------

Code:

Dim OutApp As Object
Dim OutMail As Object
Dim SigString As String
Dim Signature As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'figure out how to randomize the number to go between 2 and whatever # I'm up to'
SigString = "C:Documents and SettingsAdminApplication DataMicrosoftSignaturesdgr2.htm"

If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = "where's the signature?"
End If

On Error Resume Next
With OutMail
.To = "m.Min@RorSncis.com"
.CC = "ra@critdjume.com"
.BCC = ""
.Subject = "CABCALLS & CABLETTERS record counts for " & Format(Date, "mm/dd/yy")
.HTMLBody = "Hello Pam:<br><br>" & _
"For " & Format(Date, "mm/dd/yy") & ":&nbsp;*&nbsp;*&nbsp;*&nbsp;*&nbsp;*# of Records<br>" & _
"CABLETTERS.TXT&nbsp;*&nbsp;*" & CABLETTERSlineCount & "<br>" & _
"CABCALLS.TXT&nbsp;*&nbsp;*&nbsp;*&nbsp;*" & CABCALLSlineCount & "<br><br>" & Signature
.Display
End With

On Error GoTo 0

TimeDelay (4)
AppActivate OutMail
VbSendKeys "^{ENTER}"
AppActivate OutMail
VbSendKeys "%{F4}"
AppActivate OutMail
VbSendKeys "Y"

Set OutMail = Nothing
Set OutApp = Nothing

------------

WINWORD.EXE Process In Task Manager Doesnt Close
Hi all,

I've a program that read and write a microsoft word file from vb6. It works fine but after closing the file, the process in the task manager (WINWORD.EXE) doesnt close.

Here is how my code goes:
Code:
Private Sub Command1_Click()
Dim wApp As Word.Application
Dim wDoc As Word.Document
Dim wRange As Word.Range

Set wApp = CreateObject("Word.Application")
Set wDoc = wApp.Documents.Open(FileName:="c:doc1.doc")

' Do something here

wDoc.Close
Set wRange = Nothing
Set wDoc = Nothing
Set wApp = Nothing
End Sub
The process in the task manager shows that the WINWORD.EXE takes about 5x,xxxK of memory usage. And the worst thing is that every time i lunch the above code it will generate one WINWORD.EXE process, that means if i run the code 3 times it will use about 150,000K of memory. Is my way to close the file wrong?

Thanks..

Help! Program That Doesnt Run On Another Computer
please help me, I built a data base program that works just fine on my PC.
The program uses the components ADO, DAO for managing the databases using Jet engine 4.0 . I edited the databases in access 2000 and I programmed my program on visual vasic 6 sp5 enterprize on my P4 win XP.
It worked just fine.

but I needed it to run on another computer, which I dont know, so i dicided to make a setup program for it. the setup program included all the files the program needed in irder to work, plus the databases it used. I even added a seperated installation of Jet 4.0 for win 98se just in case.
I went to my other computer which was formated just hours ago and was white clean. It runned on P2 win 98se.
After the installetion and the restart I run the program just to get the following messages:

ADODC; Unknown error. [ADO];
and:
run time error 430:
class does not support automaion or does not support inspected interface

please advice, how to fix this???
mail: tom_meir@012.net.il
ICQ : 57741336

Program Doesnt Exit
hi,
When i click on a cancel button or click on the "X" in my program it still shows in taskmanager, why is this?
My cancel button code is just "Unload Me"

Any help appreciated

Closing Program Properly
Is there any good way to fix the problem that a program will stay in the task manager's processlist after you have closed it with the "x" button?
If the user exits the program in a way that calls the "end" functiom, then it is closed correctly, but closing a program by force with the "x" button always leaves the program in the processlist even when it's not visible anymore.
Then if the user tries to open the program again, an error will appear that the program is already open, because it's in the processlist.

Now I can't stop the user from exiting the program using the "x"-button, so how do i fix the problem?

Properly Quitting A Program
Hi!

I did some searching on previous threads about ending a program properly. I found a lot of good stuff and basically got the stuff that I was looking for. But there is 1 minor problem, the msgbox pops up twice if I place an unload sub in my mainform (check the code). My program is a basic executable with 7 forms and with no objects other than 'f'(at least that I know off).

I have this code on my mainform:

Code:
Public Sub ProgramQuit()
Dim f As Form
For Each f In Forms
Unload f
Next
Set f = Nothing
End Sub

'I have the following in all of my forms...
'if I included this in my mainform, the msgbox appears twice when i try
'to end the program from any form other than the mainform
'but if i took this out, there will be no msgbox when I try to end the
'program from the mainform
Private Sub Form_Unload(Cancel As Integer)
Dim Response As Integer
Response = MsgBox("Do you really want to exit?", _
vbQuestion + vbYesNo, "Exit?")
If Response = vbNo Then
Cancel = True
Else
frmMainform.ProgramQuit
End If
End Sub

basically, I want to ask the user only once when he/she tries to quit the program from any form.

Program Not Closing Properly
I have an application that I just developed. Its a VERY simple app and I've noticed that about half the time that I "x" out of the program, it still leaves the EXE process open.

There is no other way to close the Application except with the X on the form. So, how can I remedy this?

Should I run a process kill command on Form Unload? If that was the case, I'm imagining that I would need to make that an IF statement to see if the process is running FIRST, and if so, then kill.

Any ideas?

The only thing I can think of, as to why this may be occuring, is that I'm using the MB Task Control (something I've never done before) and perhaps it's (the program) getting confused...

Program Does Not Terminate Properly
Well, after reading various posts in this forum, I use the following code to terminate my application :

Dim frm As Form
For Each frm In Forms

Unload frm
Set frm = Nothing
Next
App.TaskVisible = False
End


But still, the program does not terminate properly. Recommendation ?

Program Not Terminating Properly
When my VB program ends it leaves something running. If I run the program three times then press CTRL, ALT, DEL I can see three "remnants" of my code still running. Any thoughts?

Closing A Program Properly
Hi folks,

I have been told just using End is not the best way to properly end a program.

I have definately seen how to do this on the forum before but cannot for the life of me seem to find it. I know it's something about looping round all the active forms, but can't seem to figure it out?

Anybody got any ideas?

Cheers


Nige

Program Installs But Doesnt Load!
Hi...
I have developed this software in VB...on an WIN 2000 machine. When I package it and the install the software on the machine(on which it was compiled) it works fine. But when I install it on another 2000 machine it installs it but the program does execute...I click on it and it just flickers and nothing more happens. I have checked all the dll's required but cant seem to figure out the problem.
Can anyone think of something obvious or common that I am not aware of?
Thanks
Tanya

Program Doesnt StartUp With Vista ?
Hello,

Ok my program is able to start up when the pc is restarted. Now in my manifest the program requres to run as an Admin, therefore you get little box in vista asking your permission to carry on. Now because of this when Vista is started my program is not loaded and Vista says 'some programs were unable to be started'.

I know this is because of the adminRequest manifest.

So what is the way to run my program without asking the user for permission?

Do I have to sign up with the 'Works with Vista' Logo program? where they check the software and provide you a digigtal signature ?

Why Doesnt This VERY Simple Program Work?
Alright, in VB class, I was supposed to write a program using ForWhile Loop. The program is supposed to roll random numbers between 0 and 1 until the number rolled is .95 or higher. Well, here is the code that I wrote to do such a thing, but it freezes. I assume that it freezes because it doesnt roll the number, at least for a while.


Code:

Option Explicit
Private sub form_load()
Dim x as single
x = rnd
Randomize
Do While x <=.94
print x
loop

End Sub

Maybe I did something wrong (loops have been giving me trouble since we started them, and I dont know why). So, why doesnt it work?

How Do I Make My Program Work On A PC That Doesnt Have Vb And The Ocx That I Used.
Maybe people will laugh at my question but I don't know how to do it!

I made a program that use some ocx and I want him to work on anybody's PC but if I give my program in .exe format to somebody
the program doesn't work with the ocx and say that these ocx are not installed on the PC.

so I how do I make him work on anybody's PC with the ocx and my program in .exe format?

Please if you could answer my It would help me a LOT.

Program Appears To Freeze But Doesnt...
I have a VB program that is used to load tif files into a database...I have abotu 2000 or so to load, and after the first few, the progress bar stops, the program and mouse lock up, and I get the "Not Responding" box...if I ignore it and check it later, it's done, and all the work was completed, and the program is working normal again...anyone know how I can get it to quit doing this.

Program Doesnt End With Unload Is Called
When I call the Unload Me or Unload form command it just hides the form and the process continues to run... How do I make it end the program the correct way? (Or any other way thats relatively simple to Quit or Close the program?)

My Program Doesnt Work On Notebooks..
Hello All,

I have developed a software for serial communication using Mscomm control and it is working just fine on desktop PCs, but when I installed it on notebook computer (Sony , P-3, 128MBRAM with windows98) it doesnt behave properly.

Any gurus got any idea !!! What could be the problem?


Thanks in advance


Kapil

Using Eof Properly? I Want To Make A Logfile(.txt) Of My Program..
i want to record the times when that button was clicked.. it's for my record keeping.. tnx.. when i tried to use the

Code:
open "yo.txt" for output as #1
if eof(1) then
write #1, "PC" + cmdbutton(index).caption
end if
close #1
it keeps on overwriting.. i expected that in my logfile which is yo.txt, it would go to the next line everytime i clicked that button..

Program Wont Exit Properly
Hello.
My **** program wont exit properly. I have tried multiple way to close it "end" unload the forms And then end. The program is just simple chat program it contains an array of winsock controls and 1 form. When I close the program it is still in Task Manager. I have tried this on 2 diffrent computers so it's not just a corrupt dll or something.
Please tell me how to do this even if it involves ending the process with an API or something I really need this fixed.

Program Not Closing And Exiting Properly.
I have forgotten one of the first things I learned.

How do you properly exit a program.

I have clicking exit "end"

But I know theres some other way, thats better, that sorta unloads the program.


Sometimes after closing the program, taskmanager shows it still running.

Even clicking the menubars "x" sometimes leaves it running.

Unable To Unload And/or End Program Properly
I have tried so many things, and I have tried posting in DivX forums, and so far have been unable to obtain help. I am up against it on this one. I have tried everything I can think of. Visual Basic isn't my language of choice, but jobs are jobs, and you have to do them. Please help me in my problem.

Read the thread here. To see everything I have tried.

Basically I cannot get the program to end properly. I have tried many configurations! I am about to pull my hair out.

I would greatly appreciate any time and help someone can offer to assist me in this endeavor.

JS

Program Not Terminating Properly[URGENT]
When i exit my application i unload all the forms and set the form object to nothing like this

for each frm in Forms
unload frm
set frm = nothing
next

Still i get the runtime error and couple of errors from the VBXPMenu custom control. The error message screens i have attached with this thread. So, if anybody knows how to solve this problem, Please reply ASAP. very URGENT!!!!.........

Closing A Program Properly Code...?
does anyone know of a could the will make sure the program is completely closed and out of the memory. When i close my program and the just in the Task Manager it's still there. i have to End Task on it.

Program Occassionally Not Unloading Properly
my project consists of an MDI form, and a bunch of other forms (not all are MDI childs). occassionally, however, the program doesn't unload properly (ie. i have to use ctrl+alt+del to close it).

i have this code in the MDI form module


VB Code:
Private Sub MDIForm_Unload(Cancel As Integer)    Dim frm As Form        For Each frm In Forms        Unload frm        Set frm = Nothing    NextEnd Sub


but my users are saying that it still sometimes doesn't close properly. any ideas, or could this just be something to do with windows that's beyond my control?

Installed Program Will Not Work Properly ...
I have now made an installation of my VB6SP6 program. When I make the installtion on my own computer (=also the development computer) everything works fine, including two Datareports. When I make the installation on a another "new" computer everything in the program works fine, but not the two Datareports. When I come to that part in the program a faultmessage appears, something like

Run time error 713 ....undefined object

My guess is that it has something to do with the Datareport-object. Both machines has WinXP installed
Q is: Do I need to send some special files along with the installation package, besides those found by my Installer program (similar to PDW but from 3rd party).
I'm a real newbie on this matter



Edited by - kon on 8/1/2004 6:34:12 AM

Program Not Running Properly On Win95
hi all,
im back to vb for a while!

i have a really very simple example program (see attachment) that uses Kernel32.dll(for BEEP), msvbvm60.dll (all vb6 programs require this) and mscomctl.ocx (activeX control to give me access to slider control.)
The program works fine on my pc, and other XP machines.
however, when i come to use it on a Win95 machine, it will just "beep" at a mono frequency, regardless of whether or not i change the slider value, which should update the frequency.

Now, according to this post made by me earlier this year, i simply need to put the appropriate dll's and controls onto the same cd as the executable. I have done this and i try to run the program. It runs fine, except for the mono-frequency. I have tried placing the above files in %systemroot%system and %systemroot%system32 and registering the control, but to no vail. I get an error when tryin to register a dll, but the ocx registers ok.From what i could tell, the above dirctories are actually void of any dll's, which is quite strange...

i could use package and deployment wizard, but is a bit pointless for such a small program.

any ideas any1?

cheers

Program Doesnt Compile Because Variable Not Defined?????
Everytime i try and compile the program it gives me an error saying:


Quote:




compile error:

variable not defined






The piece of code where the error is cumin from is this:


VB Code:
Public Sub UpdatecboProductID()    Adodc1.Recordset.MoveFirst    Do While Not Adodc1.Recordset.EOF        cboProductId.AddItem Adodc1.Recordset.Fields("ProductID")        Adodc1.Recordset.MoveNext    Loop    Adodc1.Recordset.MoveFirstEnd Sub


it saying this is not defined:


VB Code:
cboProductId


anyone has any ideas?

Still Detect A Keypress Even If Program Doesnt Have Focus
i need to know how to detect a keypress while another program has the focus. how do i do this?

and while im starting, how do i play wav files in my program?

thanks
Stuart

Stored Procedure Not Run Properly When Called From VB Program
Hi,

I modified an existing VB program that executes some Stored procedures in a Microsoft SQL Server 7 database and created a new .exe file.

When I deployed the program it doesn't seem to run one of the stored procedures properly. I don't get any errors. The stored procedure updates 80,000 records when it works properly. But when called from the program it onl updates 60,000 and I don't get any errors. After I noticed that the program hadn't run the stored procedure properly I manually exectued the Stored Procedure against the database. It converted the correct number of records then.

I then rolled back to the previous version of the exe and the correct number of records were also converted. This leads me to believe that there is a problem with the new .exe file that I created.

Has anyone experienced similar problems? Do you know why it happened.

Any help ideas appreciated.

Thanks

ERROR::program You Have Installed May Not Display Properly!!
hi everyone,

earlier i was using oracle 9i lite5.0.1 and evb3.0 on WINCE.

Now my Pocket pc has new Windows mobile 2003 and when i try to install
the mobile client onto pocket pc ,i see the below warning message on pocket pc.

""the program you have installed may not display properly because it was designed for
a previous version of windows mobile software""

my query is whether i have to purchase new Oracle 9i lite 5.0.2 [supports-pocketpc 2003] ?
 or
reinstall my pocket pc with WINCE.

please suggest me the best way out of this OR any better alternative.

thanks in advance
regards
Naveen

How Do I Make It So A Program Doesnt Show In The Task Manager?
How do I make it so a program doesnt show in the task manager?

Program Crashes If Directory Doesnt Exist On Host Computer
ok question i have is this:

i have a program that checks a certain directory that can be set manually by the person useinga browse button...ok this works fine....

what i wanted to do was to make the program when it started to have a path already set in the text box to start....just to be user friendly....ok i got this to work fine also.....

where i ran into a problem was when i had someone beta test it for me when they went to hit the browse button it came up with a error saying path not found and it closed the whole program...we found out what it was was the main path i have set as default...becouse he doesnt have that path originally...so he created it himself and the program worked fine.....

what i want to know is is there a way that i can still have my program start with this default path but if they dont have it keep my program from showing a path error and letting them use the browse button to selct there own.....

im thinking its gonna be a error command but im not sure or if i have to use a "check to see if path exist on form load"

so any help on this thanks in advanced

Task Manager Reveals Program Doesn't Shut Off Properly
ITtoolbox visualbasic-lHello all,
The problem is the following :
I have some project myProgram.vbp which becomes myProgram.exe after compilation.
When using the "x" button top right of the form, the program shuts off as expected, but when I check in the task manager, it is still running.
What is going wrong ?
willibrord oomen

Close Program After Excel Program Executes
I am having a problem unloading my program after I complete an automation to excel process. Basically I pump a bunch of data to an excel workbook, save it as a file name, shut down excel. Now I want to close the exe, but it is not unloading. What am I missing (maybe I need to set focus back to the exe, how can I do that if that is the case?)

Thanks!

oapp.ActiveWorkbook.SaveAs FileName:="\master log" & Format(Now, "m-d-yyyy") & ".xls"
oapp.Quit

Set oapp = Nothing

Unload Me

Copyright 2005-08 www.BigResource.com, All rights reserved