Running An Application In Background?
Mar 20, 2010Is it possible to run my application in the background so there is no minimised window on the bottom bar and, if possible, so an icon appears in the taskbar? If so, how would I do it?
View 2 RepliesIs it possible to run my application in the background so there is no minimised window on the bottom bar and, if possible, so an icon appears in the taskbar? If so, how would I do it?
View 2 RepliesI'd like to create an application that will run on the background. Any sites that I can refer to or idea?
View 3 RepliesIs it possible to start an application not being visible? This application is a batch application and my application would look way better if I could hide this batch.
View 2 RepliesSo I have this in my coding:
vb Code:
file = My.Computer.FileSystem.OpenTextFileWriter("c:command.bat", False)
file.WriteLine("@echo off")
[code].....
Is it possible to have code running in the background and still be able to use other parts of the program (i.e. firing other events).For example I have a instant messaging chat in my program and when the user has a new message then the display flashes from green to red as seen below
[code]...
But I still want to be able to continue using the other functions in my program despite having this code running in the background (which highlights to the user that he has a new instant message by changing the display background colour)How can I overcome this?
I have an application where some data is stored automatically to Excel. However during the storage of data, the Excel spreadsheet is visible to the user. I need to know if there is any way to make the Excel run at the background.
View 1 RepliesI have a class that wraps up a few methods (e.g. OpenPort, SendMessage etc.). Some of the methods accept a number of parameters and return a value (e.g. SendMessage accepts port and a string that is the message to be sent and returns true or false depending on whether the mesage was sent successfully or not). I create an instance of my class when my form loads and I call the various methods throughout the lifetime of the app.In my SendMessage method there is actually a few steps that involves a delay as I send commands to an instrument and wait for a response. I'm using the AutoResetEvent class to synchronize things. Whilst this works ok I've noted that the UI is unresponsive during the wait period.
Public Class MyClass
Private _receiveNow As AutoResetEvent
Public Function OpenPort(ByVal portName As String, _
[code].....
I am trying to write up a program that has a few forms that you interact with and do various things with but I also need to have a TCP/IP client/server running in the background to handle a automated connection to a PLC. Is there anyway to have the TCP connection open and receiving/sending in the background even when the operator is doing something else?
View 1 RepliesI am working on a project and i have come to designing my splash screen... i dont want a useless one what just shows a loading bar what does nothing, im trying to make it useful and show while the main form is loading however this is proving to be a pain in the backside.. i can make the splash screen load when the exe is executed then close when the form is ready but i want to add an animation to the form (just a moving logo) this is just done by me running an timer what changes the location at each tick.. i can get it to work well on its own but when i add frmMain.show() to the code to load the program the animation will not work... i only get this when i ask the program to load the main form..
View 2 RepliesI m developing an application in vb 2008, and using background worker to copy file(s). I have my own designed form which plays an animationon on the top of the form along with copy. For playing animation i m using "AxMSComCtl2.AxAnimation", on execution i get
"ActiveX control '' cannot be instantiated because the current thread is not in a single-threaded apartment." On search i found a link :Forum Link
But still in this link Firstly i dont understand where to insert this snippet and secondly how to implement the idea on background worker.
the user of my application is able to run a diagnostic tool which is part of my application. This diagnostic tool searches every file on the computer, logs the names, and if the my program is able to then the file will be read.
My program has other uses as well. If the user wants to do something else in my program then i want the diagnostic code to run in the background. I don't want this code to prevent users from using other features of my application since the diagnostic search does take time.
How do i do this? Threading? A background worker? If the anwser is Threading which i am pretty sure it is, how do i set up a thread? My computer has 4 GB of RAM - 2GB & 2GB so i know i am able to do this smoothly.
When you click a button, the program should start op everytime your computer starts, but it must be in the background, so that you wont notice it.
View 4 RepliesIm trying to run a thread in the background. The sub would take a string as as input and the text to speech object would read the string.
1st problem is: How do I pass my value strIn to my sub SpeekEventWorker when im calling it like this
[code]...
What I'm trying to do is show a form while a background process is running. Similar to a progress bar but not a progress bar. We have a form that has an animated gif (customer request) and that's it. no other controls. They want this form to show while the processing in the background is running.
View 5 RepliesI have an app that runs from a network share/UNC path.i.e.\\networkserver\inventory\_application\systeminventory.exe.inside the app I call a 3rd party tool and run it from a subdirectory of the app. \\networkserver\inventory\_application\3rdparty\tool\tool.exe hide the window, and pull the output to a Text field.When I run the application local it runs great, it even calls the 3rd party tool from the UNC path and functions.But when I run the application from the UNC path and try to use the 3rd party tool it fails.I'm figuring it's cause the CMD prompt tries to kick off from the UNC path, and UNC paths are not supported as current paths. i.e. you can't do a "CD \\networkserver\inventory\". [code]
View 4 Repliesi've the need to close an ffmpeg conversion started in background with the vb.net process.start.I've seen that an ffmpeg could be closed by hitting the key 'q'.How can i send the 'q' key to the running ffmpeg process?
i intercept the process with this code:
Dim pProcess() As Process = Process.GetProcesses
For Each p As Process In pProcess
If p.ProcessName = "ffmpeg" Then
[code]....
So I have this in my coding:
vb
file = My.Computer.FileSystem.OpenTextFileWriter("c:command.bat", False)
file.WriteLine("@echo off")
file.WriteLine("cd " & TextBox2.Text)
file.WriteLine("adb shell dumpsys meminfo " & TextBox1.Text & " > C:Sample.txt")
file.Close()
Shell("C:command.bat")
What I want it to do is to run the batch file without it opening if that makes sense. Right now this runs on a loop for 10 minutes and on every 2 second tick it opens and then closes the .bat. Which is really annoying to see a .bat open and close every two seconds. Is there anyway to get this process to run silently in the background so the user doesnt even know that it is running?
I created a background thread that get's data and returns it to the main thread; this works. Now I want to be able to stop the SQL request from the main thread (probably on a button click). This is my test code for creating the thread (working):
[Code]....
How can I access the background thread to stop the query on demand? Do I need to set a flag on the main thread telling the background thread to stop running then have the background thread poll the main thread at intervals? I was trying to look for an example but I wasn't able to find a good one.
I think it's because I have a background image. For example when I maximize the program it lags. I mean big software companies have programs that have more pixel images and are much more colorful then my program is but never lag why. AVG has nice look but the program never lag. But the code runs fine so that is a good thing. How can I stop the lag with background image?
View 1 RepliesIs it possible to make a program, that can set passwords on folders if it is running in the background? If now I open I my schoolprojectfolder, there will come a box, where you must type in a username and password. If the username or password is wrong, det folder wont open?
View 2 RepliesI had done one application using api which send the message to given number. The working of software is very fine without any error working on windows XP SP2. I heard that vista already contain the .net frame work so didnt installed .net frame work in machine. I checked in vista it shows .net frame work is in machine. But when same code i tried to run on Vista it gives the error. Error is as follows
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at SmsSendingApplication.frmSingleMessage.InternetOpenUrl(Int64 hInternetSession, String& lpszUrl, String& lpszHeaders, Int64 dwHeadersLength, Int64 dwFlags, Int64
[Code].....
I have a per-call WCF service that serves a number of clients. I'm looking to speed up the services by running some background processes so they don't block or slow down the main function of the services.
One example is that the main function needs to return a set of data, while the background thread needs to record some statistics based on the parameter(s).
Code:
Public Function GetAccountDetails(id As Integer) As AccountDetails
Dim retVal As New AccountDetails
Dim a As New Accounts
[Code]....
If I use this background thread to record the statistic it doesn't block the main thread from returning the data to the client.
It's been working well in test scenarios, but my question is, are there any dangers with leaving this thread to execute without Joining it before returning the data to the client? Could there potentially be any loss of statistic data? Could there be potential memory problems on the server side?
I have a Class called SocketSvr which handles an asynchronous socket server. It is called via the BackgroundWorker from my main form. Basically, I just want it to display my socket data information inside a textbox in the main form, and have a server start/stop button available on the main form to do those things.
Here is the code from Form1.vb:
Public Class Form1
Dim WithEvents Socketsvr As New SocketSvr
Private Sub ToggleServerButton_Click(ByVal sender As System.Object, _
[code]....
I am uncertain how to properly shut down requests from the client when the StopServer() function is run. In the code above, I place a cancellation queue for the background process. The funny thing is that once StopServer() is run, it will accept one more connection, then stop accepting thereafter.If I remove the following line from the code above:
listener.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1)
-- it crashes when I attempt to start the server a second time (complaining that I cannot reuse the socket, obviously) My guess is that I need to add something to the bw.CancellationPending call on the background worker?
By using the code below i was able to open the folder and highlight the file that I wanted.The only problem is that I had multiple Explorer.exe's in my task manager.o my question is How can I open a folder and select the file within without Running a new explorer process? or Highlight a file in a folder that is already been opened previously
View 2 RepliesI have a spreadsheet that contains details of change requests; one row per request. This information needs to be copied into a Word form for sending off to our customer who then completes the response section. To speed up this process I have written some code that utilises the mail merge feature of Word and merges the relevant info from the spreadsheet into a Word form. This runs from Excel when a button is pressed.The problem comes when I go to save the workbook and exit Excel; it stays running in the background as a process in task manager.
[URL]
I'm fairly sure it has something to do with the merge code itself but my knowledge of VB is enough to grasp what is happening but not why it is happening. If I open the Word doc that has the merge fields in it, then open the spreadsheet that houses the info Excel says the workbook is already open.
what account for this error message in ls beta 2?'' The last change wasn't successfully persisted.Please shot down the running application.
View 1 RepliesFinal step in my application. I finally got all the requirements working, but now I need to have the application run in the background.
The application was written in Visual Studio 2010 VB, Win form app.
The requirements are as follows:
1.) run the application at start up
2.) no icon
3.) always in focas
4.) always runs in the background.
Here's the full code I have right now (working! whahoooo)
Public Class Form1
Private Property count As Integer
Private s As New Stopwatch
[CODE]...
Which is the best way to store application and user settings of an application running with multiple instances?My problem is that using the vb's "Application Settings" one instance would overwrite the other one.I want to identify each instance with a number passed via command line argument. I could use this number to identify the appropriate settings of the running instance, but I see in a local INI o XML file a better way to handle that.
View 1 RepliesLet's say 10 desktop shortcuts, all with different names/icons, point to and can start the same exe application from the same directory. Is there any means for the application to know the distinct name of the shortcut that was doubled_clicked. Also is there any means for a running application to know if it was started by command line, by a double_click on the exe, by a double_click on a shortcut that points to it, or by another process' call?
View 4 RepliesI am trying to use Setup project. Want my setup to create a desktop shortcut with my application.I donot understand how to do it. Clicked on User's desktop, I created Shortcut to User's desktop, changed the properties Target and Working Folder as 'Application Folder'But it does not connect with MyApplication.exe When I ran the setup and tested Desktop short cut, it took me to the folder where application was installed, instead of running the application.How to make the application run using this shortcut?
View 1 Replies