Zip Program.
I want to make a zip program that can zip and unzip zip files. Where do I start?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
View Logged In To Program, Listen For Program Writing To Txt File.(PartialResolution)
Ok let me see if i can describe this quickly.
I am working with the Never Winter Nights tool set. We wanted to make a small program to monitor who logs on and off the server so we can display it on the web page.
NeverWinter Nights (NWN) when running the server version writes a complete logg to a txt file. What i am getting at is what is the Best/most effecient/ or easiest way to get this information.
Obviously the program writes to the text file every time something happens, we can see that happening. Is there a way to listen on the program for when it writes, then analyze the string and get the information that way.
I know I can write a quick program to read through the text file and analyze the log ins and offs and determine who is logged in that way. But there has to be a more efficient and much easier way of doing it.
Anyone have any suggestions?
Thanks in advance for all the help and ideas.
How Do Reach Controls Information From A Form Or Program To Pass Into Ourself Program
Can anybody help me please?????????
It make stuck when I need to code a form in the project which let me get information from other forms or programs.
e.g: I create a project ave only form1(It's always @top-level of the window environment) and I want to get information from other controls of the 3rd party program.
please, come on..., come on... help me!!!
thanks
Call Another Program And Obtain Status Code After Program Is Closed
Hi,
I have program A (visual basic exe with user interaction) and program B( visual basic exe with user interaction). At the present they are two independent programs.
Say for example program A performs 5 steps sequentially.
I would like program A to call prgram B after step 3 of 5.
After program B completes its own processing it should close and pass a status code (success or failure) to program A.
Based on the status code program A either continues with Step 4 and 5 or undoes step 1 to 3 and then closes.
(I hope I have not confused anyone with my general explanation).
My questions how would I go about doing this?
How can I call program B from program A and then accepts a status code from program B once it completes?
Thank you
Cosito7777
Problem: Starting A Program From Within A Program And Wait Till It Finishes
Hi,
I've the following problem: in the CreateProcessA codeline I got a typematch error.
The code is:
Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOWNORMAL = 1
Private Type STARTUPINFO
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cdReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Private Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Declare Function CreateProcessA Lib "kernel32" ( _
ByVal lpApplicationName As Long, _
ByVal lpCommandLine As String, _
ByVal lpProcessAttributes As Long, _
ByVal lpThreadAttributes As Long, _
ByVal bInheritHandles As Long, _
ByVal dwCreationFlags As Long, _
ByVal lpEnvironment As Long, _
ByVal lpCurrentDirectory As Long, _
lpStartupInfo As STARTUPINFO, _
lpProcessInformation As PROCESS_INFORMATION) As Long
Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Const NORMAL_PRIORITY_CLASS = &H20&
Private Const INFINITE = -1&
Public strCmdLine As String
Sub Main()
intFileLog = FreeFile
strLogFile = App.Path & "Rel_Mens.log"
If Dir$(strLogFile) <> "" Then
Kill strLogFile
End If
Open strLogFile For Append As intFileLog
strLinha = Format(Now(), "d m yyyy hh:mm:ss") + " - Ini."
Print #intFileLog, strLinha
strIniFile = App.Path & "Acesso.ini"
strLinha = "strIniFile: " + strIniFile
Print #intFileLog, strLinha
Dim User As String
Dim Pass As String
Dim Database As String
Dim Source As String
Dim strConnect As String
Source = IniGet(strIniFile, "General", "Source")
Database = IniGet(strIniFile, "General", "Database")
User = IniGet(strIniFile, "General", "User")
Pass = IniGet(strIniFile, "General", "Pass")
strConnect = "Provider=SQLNCLI; " & _
"Data Source = " & Source & "; " & _
"Initial Catalog = " & Database & "; " & _
"User Id = " & User & "; " & _
"Password= " & Pass & ";"
Dim objConn As ADODB.Connection
Dim rstPedidos As ADODB.Recordset
Dim rstB As ADODB.Recordset
Dim strSQL As String
Dim strParams As String
Dim strData As String
Dim strDias As String
Dim strSQL2 As String
Dim strB As String
Dim intPos As Integer
Set objConn = New ADODB.Connection
objConn.Open strConnect
Set rstB = New ADODB.Recordset
strSQL = "SELECT distinct B FROM Perf WHERE Perfil='1'"
rstB.Open strSQL, objConn
rstB.MoveFirst
Do While Not rstB.EOF
strB = Trim(rstB!B)
Set rstPedidos = New ADODB.Recordset
strSQL2 = "SELECT Params FROM Pedidos WHERE B='" & strB
strSQL2 = strSQL2 + "' and Activo='S' and Obs='Solicitado'"
rstPedidos.Open strSQL2, objConn
If rstPedidos.RecordCount = 0 Then
strLinha = Format(Now(), "d m yyyy hh:mm:ss") + " - No records for B " + strB
Print #intFileLog, strLinha
Else
Do While Not rstPedidos.EOF
strParams = rstPedidos!Params
intPos = InStr(1, strParams, ";")
strData = Mid(strParams, 1, intPos - 1)
strDias = Mid(strParams, intPos + 1)
strLogFile2 = App.Path & "Reports.ini"
If Dir$(strLogFile2) <> "" Then
Kill strLogFile2
End If
intFileLog3 = FreeFile
strLogFile3 = App.Path & "Reports.model"
Open strLogFile3 For Input As intFileLog3
intFileLog2 = FreeFile
Open strLogFile2 For Append As intFileLog2
Do While Not EOF(intFileLog3)
strLinhaIn = ""
Line Input #intFileLog3, strLinhaIn
If InStr(strLinhaIn, "Data=") <> 0 Then
strLinhaOut = Trim(strLinhaIn) + strData
ElseIf InStr(strLinhaIn, "Dias") <> 0 Then
strLinhaOut = Trim(strLinhaIn) + strDias
Else
strLinhaOut = strLinhaIn
End If
Print #intFileLog2, strLinhaOut
Loop
Close intFileLog3
Close intFileLog2
strSQL2 = "UPDATE BES_PEDIDOS SET Obs='Fase1 (CSV)' WHERE B='" & strB
strSQL2 = strSQL2 + "' and substring(Params,1,8)='" & strData
strSQL2 = strSQL2 + "' and Activo='S' and Obs='Solicitado'"
objConn.Execute (strSQL2)
'Call Relat_Mens.exe
strCmdLine = App.Path & "Relat_Mens.exe"
ExecuteCommandA strCmdLine, True
rstPedidos.MoveNext
Loop
rstPedidos.Close
End If
rstB.MoveNext
Loop
rstB.Close
Close #intFileLog
objConn.Close
Set rstPedidos = Nothing
Set rstB = Nothing
Set objConn = Nothing
End Sub
Public Sub ExecuteCommandA(ByVal sCommandLine As String, Optional ByVal bWaitForObject As Boolean = False)
Dim tProcess As PROCESS_INFORMATION
Dim tStartUp As STARTUPINFO
Dim ret As Long
tStartUp.cb = Len(tStartUp)
ret = CreateProcessA(0&, sCommandLine, 0&, 0&, 1&, NORMAL_PRIORITY_CLASS, 0&, 0&, tStartUp, tProcess)
<<<error received here>>>>>
' Wait for the shelled application to finish:
ret = WaitForSingleObject(proc.hProcess, INFINITE)
ret = CloseHandle(proc.hProcess)
End Sub
Can anyone give me a help with this?
Thanks.
Cheers,
Paulo
Edited by - bespjl on 3/22/2007 4:53:43 AM
After Vb6 Install On Vista, Running The Vb6 App Starts A Setup Program For Another Program
This is a odd deal, i kinda remember it happening on a win2000 computer, and i've search on here to no avail.
What is happening is after I install my vb6 application on Vista business OS that was packaged on a windows 2000 professional OS it installs fine
but when I dbl click to start the application it fires off a setup program for autocad 2008 ( which was just installed on the vista OS)..... If i hit cancel
on the setup of this the vb6 application starts up and runs...
I'm thinking that it's somehow related to the setup program and how it stores it's temp files in some directory and somehow the OS is associating
the vb6 app.exe with the setup folder and the setup folder is used by "most" applications when they are installed... its quite confusing to me..
This ring a bell for anyone? I'm thinking of going to the package deployment and see what folders are used and see if i can change the dir names.. etc..
Thanks for any help here.!
Rob
Edited by - rburn2 on 4/20/2007 11:55:12 AM
Get A Handle To A Windows File Editor When Starting Program From Within Another Program
Hi,
I am trying to make a program that starts another program, and using sendkeyes to control what the new program is going to do and then close it. Basically the new program is going to open a db and store some data in a notepad file from the db.
I know how to start another program from within a program using shell, but
1) I do not want the new program to fill the screen like it does now. I know hat you can start the program and minimize it so the program icon shows at the bottom of the screen on the same line as the start button. But I would prefer the new program to not show. Can anyone help me with this ?
2) At one point in the process when using sendkeyes, the new program automatically opens/fetches a Windows list (where you can specify the name of the file and where it is going to be stored on your computer).
I need to find a way to get a grip on that windows list from my own program, so I can send a standard file name to it.
How can I do that?
Edited by - kolibri1 on 9/25/2003 1:33:40 PM
Can Anyone Tell Mi How To Upgrade My Vb Program Withoout Changing The Entire Program?
hi,
i'm currently writing a program in vb. im new to this program and need some help. if i have a program that can run. then a few months later, i need to do some update in my program, but i don't want to change my entire program. i only want to do some add on to the old program through A drive. how doo i write the program??? i need the solution urgently!!!! pls help mi!!!
thanx!!!!
p/s: if u dont really understand my que, feel free to email mi again.
Get Path Of Program When Program Is On Another System (Linux Server)
This is a little hard to explain but I will try my best to make sense.
I am a network/computer technician. I am very knowledgeable in VB 6. I have a program that I have written in VB 6. The purpose of this program is to make my life easier when I have to reformat a hard drive and reinstall windows. Instead of navigating in and out of folders on my external hard drive, I can just click the radio button for each program I want to install and click a command button. It really does make things easier and faster.
When I have my external USB hard drive connected directly to the computer this program works fine. I am using the following command to get the local drive letter of the USB drive: Split(App.Path, "")(0).
However the above command does not work for a network path. I have a Linux Server that will contain all the same programs that the external hard drive does, and in all the same folder paths and program names. I just sync them both about once a week or so.
My questions are following:
1). How can I determine if the program is running locally or from a network?
1). How can I determine the network path.
I will not be nor do I want to map a drive to the network path as once the computer has all the required software install and all the required setting changes made, the network path will not be needed again.
Sorry this is so long and I hope I have made sense, and this is easy to understand what I want.
[Solved]How Can I Uninstall Program Automatically When The Program Shutdown?
Hi all,
I have one more question, since my question about closing program automatically (schedule also) after running a period of time. I want to know how can i call uninstall.exe within the program dir to unstall itself when reached the end date? I mean after close the program when it reached the due date (period of time), I want to run uninstall.exe immediately to uninstall the program?
=============
Hi all again
I have solved it for myself, just using Call Shell() function before End the application.
.:ldlp:.
Edited by - dungla on 11/18/2004 11:13:27 PM
Find Out If Program Is Running, And If It Is Not, Activate The Program
Okay, i have searched for over 5 hours, and cant find out how to make with an visual basic program how to:
find out if a pragram is running. and if it isn't running, activate the program.
i want to do this with a timer
so i can leave my computer and the program cheks every minute if the program is running and if not, it activates the program
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
Save Program Information After Program Shutdown
Hi all!
I've done a small program which uses some values for working.
Up till now i saved these values in a file. The program also has to write into the file when something has changed.
Everything worked perfectly until i put it on a server on which a normal user doesn't have the right to write files
Does anyone know a (simple) solution, where I can store these information except files?
Bye, Jeannette
Get My Program In Top And In Focus When The User Starts The Program.
Hello. I have a problem I have not found any good solution to:
How do I get my program to be on top and in focus whenever it starts, no mater any other circumstances.
The program I'm designing is connected to a remote control. Hence it must be able to control the entire computer as the user like.
I've tried searching, but found no satisfactory solution.
Committing Suicide In VB (Deleting Program From Program)
I have a problem, I want to update my program by downloading the latest version, and replacing the old one, replace one EXE with another.
The downloading is fine.. The problem is that the program I'm trying to delete is the program that is running. And you can't delte filesthat are in use.
So my question is, how can I make my program Kill( Itself )
Thanks
Program Error Opening Office Program From VB
I have a small progam that asks for a user name querries a databse and returns a set of options based upon who they are. One option will open an excel workbook, the others open up Access reports. The querries using ADO work flawlessly. However the Excel and Access calls yield a Program error on some computers. While some others remain
un-effected. I discovered that if visual studio is loaded it will solve the porblem, but that is not an options for the mjority of my user base. Has anyone seen anything like this? Am I in DLL hell?
Thanks,
Start A Program Before Desktop And Put A Program In Listening
Hi to all, i'm new in this forum. Unfortunately i don't speakunderstand english very well, so i'm sorry if in certain occasions I won't express well me or I won't understand what you will say .
I'm searching 2 API:
1. An Api that run the exe of my program created in visual basic at starting of windows, but not when desktop is already started, but before, like if I had shaped for it asks for a password of access to the system. I use Windows XP. That because the program i need run is an application of facial recognition and i need to input my face like a password to access to my profile.
2. An Api that make my program in listening of opening of certains file I selected and, when a file of the kind specified is started, my program of facial recognition block it and run itself for ask autentication.
I hope you understand. If you have alternatives solution, please tell them to me, I need that this program works for an important examination.
Thanks very much to all.
Adding Code To My Program Through The Completed Program.
Hello,
I have a program that calculates some numbers.
Here is how it works.
1 the user inputs 2 numbers. A High and a Low into two text boxes.
Then the user presses Calculate and it does a series of mathamatics.
Once that is complete it out puts 5 different numbers to a table sort of deal.
NOW what I want to do is let the user enter a 6th number to calculate and output onto that table.
So lets say this is my code for the calculation.
VB Code:
Private Sub cmdCalculate_Click()Text1.Text = (txtHigh.Text - txtLow.Text) * 0.738 + (txtLow.Text)Text2.Text = (txtHigh.Text - txtLow.Text) * 0.093 + (txtLow.Text)Text3.Text = (txtHigh.Text - txtLow.Text) * 0.865 + (txtLow.Text)Text4.Text = (txtHigh.Text - txtLow.Text) * 0.953 + (txtLow.Text)Text5.Text = (txtHigh.Text - txtLow.Text) * 0.876 + (txtLow.Text)End Sub
Now I have a textbox on my form to enter a new number to calculate. So lets say the user wants that number to be "0.459" He would enter 0.459 into the textbox "txtNewnum" and click the cmdAdd button.
Then the program would have to add a new line of code to the 5 lines mentioned above and it would look like this.
VB Code:
Text6.Text = (txtHigh.Text - txtLow.Text) * [b]0.459[/b] + (txtLow.Text)
Does anyone know how I could pull this off?
Thank you and have a great day!
Stilekid007
Program Whites Out And Locks Up When I Change To Another Program
Ok, here's my problem: I'll start a download on my FTP app, then change programs, and all of a sudden, when I change back, the form whites itself out so I can't see what's going on and/or locks up. Is there a way to fix this, or is this just a bug in Visual Basic? I'll port the whole freakin thing to Delphi if I have to.
How To Do With When Someone Execute The Program, The Program Start Doing The Events?
i am wondering how can do like
if somebody exexute my program like
cute.exe(asume this is a program alreday being package)
then the computer automatically shutdown and no need to move mouse or push button or other events.
if the user is double click on my executable file, it does the job.
how can i do it?
any professional can tell me how to do it?
Kill A Task/End A Program (out Side Your Program)
Any one know how to end taskkillcloseetc. a program. For say I make up a program that creates a icon in the system tray but I don't want the program to "end" it self. I want to make anouther program to end task the system tray icon program. Kind of like the Ctrl-Alt-Delete taskman.exe program. Where you "end task" (I know there is a differecne between end task and close.) a program.
Calling A Command Line Program From A Vb Program
I need the ability to call a program called prep from vb. One of the parameters, source file, would be a variable. Does anyone know how to do this? Here is an example of the command line I need to pass.
"C:Program FilesMonarchProgramprep.exe" Variable pathmed.csv med.prn AD "," Y
I know this line works if I run it from a bat file, but I can't get it to work from vb.
Can I Send String From My Program To External Program?
example : program has two textbox and one submit button.
if press button it can save data from textbox to database, it worked and i can't known sourcecode.
how can i create my program to send string from my textbox to two textbox of that program?
two program is in own mechine.
how can i do?
Network - Program To Program Data Exchange
Hello,
Can someone give me an idea of how to make 2 programs exchange data in real time? One program would be running on Computer A and Computer B needs to receive data from Computer A. This needs to be accomplished via the local network.
Later on, we will need to be able to send data to a website for others to examine and/or download. Any ideas for this one?
Thanks
Ken
Passing Text From My Program To Another Program
Hello All,
Fist I figure my question would cover a broad spectrum reguarding what i want to do in the long run.
What I am developing ans a program that a user would type into and use MS word to do the spelling and grammar check (this part is not the problem) but what I am running into as an issue is figuring out a way to pass the text from my programs textbox to a textbox of another program (it is a chat program that does not support grammar and spell check) the thing is when i go to pass my text from my program to the textbox of the other program i do not know the name of the textbox. what i ould like to know is if there was a a way i could find this out or is there a way to pass the information without needed to know the textbox name?
Thanks
Telling The Program To Type In Another Program
I want to make a small program to do typing in other programs, but I have no idea how to do this. Let's say I want the program to
1) Check if notepad is opened
2) If not, then open notepad
3) Write "hello" in notepad
I have a feeling this isn't very advanced, but I'm not very advanced either yet Are there any tutorials or something for this? I dont know what to search for
Changing Program Code From Program...???
Hi,
Is it possible to change the source code of my program using textboxes within the program itself?
I have made a pricing app for my company and want to know if I can change the prices (which are set within the code) by entering a new price into a textbox.
Thanks.
A Program Icon For A Program Which Has No Form
I have a program with no form, only a module. I want to assign an icon to the project. The usual way is to go into Project Properties/Make and set the icon there. But the icon drop-down box there is only filled (I think) with icons that have been specified in the forms' properties. So if there are no forms there are no available icons.
Is there a way to set the icon in a program which has no module? I'd rather not create a dummy form whose only purpose is to provide an icon.
Openning My Program Upon Closeing Another Program
Im fairly new to VB, but not stupid on it niether lol. Heres my problem, I have made an application that runs in the background on windows what i want it to do is run a backup program for my invoiceing utility upon shutdown of the invoiceing program. is there a way I can make my program watch for the exit o Invomax.exe Any posts will be helpfull. Just to let you know what programs im useing, Invomax shop utilitys, and invoback which is the back up utility for invomax. Thank you.
Launch/close Program For Another Program
I help out at a Boys & Girls Club in their computer lab. They recently got a copy of Sim City 3000 donated, but this program is having issues with their Windows XP OS. If you go here, "SimCity 3000 restarts spontaneously when exiting", you can see the problem we are encountering. I was wondering if writing a small program to launch SimCity 3000, then catch it when it exits and force it to close down programmatically is possible? If so, how difficult would it be? I assume it would require several various API calls.
Bring A Program Up To Front From Another Program
I want that if the user starts my program a second time, that the first program is activated. The first program has one form and it can be invisible and minimized. I have the processid and hwnd of the 2nd program
Edit:
If I can send a message of something to the first program to activate some code, it would be perfect... Or raise some event
How To Make My VB Program Into An Executable Program
I have this problem that whenever I activate the Make exe command under file menu. The computer will start compiling but before completing it the system will display an error message like this one "THERE IS NOT ENOUGH SYSTEM RESOURCES AVAILABLE TO RUN THIS PROGRAM" then the system will hang.
It started acting like this almost a week ago when my pc was infected by a virus. I have the entire hard disk formatted using fdisk and installed it everything back but this time it wont compile my programs. This is the first time I encounter such a problem. Is there anybody who could advise me on how to solve this problem?
|