Visual Basic Program Not Releasing Resource?
Dec 22, 2009
I have a program written in VB.NET which stops a service that uses file x, modifies x, and restarts the service.
I have modified my code for testing so that it just reads in the file as a string and immediately writes it back out.
Shell("net stop " & SERVICE_NAME, , True)
Dim myReader As System.IO.StreamReader
myReader = My.Computer.FileSystem.OpenTextFileReader(x)
fileString = myReader.ReadToEnd()
[Code]....
The stopping of the service is no problem, and modifying the file is no problem, but when the service starts it stops immediately because, as best I can guess, the file is in use. Even when I try to start the service manually, it stops immediately. However, I found that I can open file x, click save without modifying anything, close the file, and start the service and everything works correctly.
If I comment out the writing part, everything works fine.
Also, the file I'm modifying has a .conf file extension. I don't know if this is relevant.
View 4 Replies
ADVERTISEMENT
Jan 26, 2010
im currently developing a program, and i have run into some trouble: you see i have 24 pictures shown in 6 pictureforms (timer) the problem is i wanna delete the pictures in an undo function (after taking them from a webcam), but the system tells me that the pictures is currently in use. i have tried disposing them and everything but i cant seem to get them released and then deleted?
View 2 Replies
Oct 19, 2010
1st i make resource file 2nd in module i make this : I don't have errors but it is not working here's i want to do; i want to move a file that a player/person who is using this doesn't see how it copy and past into folder
[Code]...
I don't have errors but it is not working here's i want to do; i want to move a file that a player/person who is using this doesn't see how it copy and past into folder
View 1 Replies
Jan 22, 2010
I am trying to make a console program in Visual Basic on Visual Studio 2008. I want to ask the user of the program if he wants the premium version or the standard version. If he chooses the premium version, then I want it to say premium in his "receipt" later on and if he chooses standard, then standard in the receipt.
[code]...
View 1 Replies
Jan 31, 2010
I have visual studio 2008 installed and was using C#. I am now trying to find Visual Basic. I can't find it. Is there a way to download it or should it be somewhere in my visual studio program? I don't want to use vbexpress, just regular VB 2008.
View 1 Replies
Apr 8, 2012
I have a procedure at the end of my console application that ask the user to either hit enter to end the program, or type s to perform another search. The issue I'm having is no matter what the user types in the program end. What I would like to happen is if the user types s, then the program starts over and lets the user perform another search. The program is procedural and I need to find a way to start back off at the top of the program which ask the user to type a name to search.
[Code]....
View 1 Replies
Aug 26, 2009
i'd like to make a tiny program that shows an image 2 images selected by a scrollbox that can be zoomed and pannedthere also would need to be a coordinate system added to the image so that the user can ad points of intrest (small cross apears on map)to the picture by entering the coordinates. these points of intrest should then be saved in a db file so they can be reloaded when the program is stopped and rerun.
View 6 Replies
Jul 15, 2009
I've been trying to send a test-version of my program to the person who has instructed me to create it.Now, the problem is, every method I try seems to fail, either by crashing on start-up or saying it requires Visual Studio to be installed.I've tried giving him the '.exe' from Debug, Release and it just crashed the moment you start it up. (And Windows automatically starts looking for a solution but of course finds none.)
And if I use the "Publish" function and put it in an install, that's when it says it requires Visual Studio to be installed.Is it so difficult to distribute something made in Visual Studio? :< I'm probably overlooking the obvious here..
View 5 Replies
Sep 30, 2010
[code].....
View 3 Replies
Oct 19, 2010
i am trying to make a auto updater built into my program.[code]not it kinda works only its telling me i have updates when its the same version!
View 6 Replies
Jun 20, 2010
When I have tried to run a program in vb 2008 I get the following error message BC32400: Class 'CLSID_CorSymWriter' could not be created: System Error &H8004015 I have tried to uninstall and re install visual studio 2008 (academic) (several times) to no avail.
View 3 Replies
Feb 17, 2009
Anyone know of a way to do addon's with a visual basic program? I want to create a program that has some basic functions, but to stay away from bloatware and unused functions. How would you create a main program when it is installed and then be able to add and remove features to it?
View 4 Replies
Feb 12, 2010
i need to know how to make my Visual Basic program install onto the computer. right now my program is a simple .exe file and does not require instalation.
View 3 Replies
Aug 6, 2010
How would I open a program within Visual Basic 2010? (Like running "Application.txt" from "C:" within a Visual Basic project.
Public Class getfrom
Dim getfrom As String
Dim saveto As String
Dim download As Boolean
[code]....
View 2 Replies
May 6, 2011
How do you remove a Reference from a Visual Basic progam?
View 3 Replies
Apr 17, 2009
What is the code to shut down my computer with visual basic?
View 9 Replies
Feb 24, 2011
I'm doing a baseball program for a class project. And I almost have it complete, but it's giving me a syntax error. I can't figure out what i'm doing wrong. I'm using two functions to return a value for different type of baseball tickets to the button that calculates them. Here are the instructions 1.)User selects whether to purchase season tickets or single-game tickets 2.) User enters the number of tickets needed and the type of seats based on whether they selected season single-game tickets.3.) User clicks the Compute Ticket Cost Button to display final cost4.) User clicks the Clear Form button to clear the responseI just can't figure out what I did wrong. I know it's something stupid that i'm doing.the errors are happening inside the btnCompute sub routine. with syntax erros on SingleGameCost() and SeasonalCost() line 114 and 118
Public Class Form1
'Global Variables
Dim intTicketChoice As Integer
[code]...
View 2 Replies
Oct 19, 2010
I have made a Medical software writen in VBA and now I want"transfer" (?!) the same softwareto a Visual Basic program that can be run in a computer without Microsoft Office(Excel) installed. How can I do this? I dont want to write all theVBA program again because it is very large and full of spreadsheets and mathematical formulas.
View 1 Replies
Feb 18, 2011
I want to use firefox as a default browser for a webbrowser control in a form in Visual Basic Express. How do I do this? How do I launch firefox or an external .exe program from within my application and send a page for it to open or load automatically?
View 4 Replies
Oct 10, 2009
make program in visual basic 2008 to covert .flv to .mp3?
View 6 Replies
Dec 26, 2009
Im trying to make a "database" in VB 08 and i donīt have a clue how to do it. I Want that my program will be able to update itself when i want it to update Ex: My friend downloads my program and lets say 2 days later i want to update it becuse i have discovered a flaw how would i do it? Do i have to use a installer so my friend gotta install it or what?. I donīt think that its a code im looking for or im i wrong. IS it a code im looking for or what ?
View 1 Replies
Jan 9, 2012
[code]....
View 12 Replies
Jan 24, 2011
How do you extract source code from a VB.NET .EXE file?
View 3 Replies
Sep 13, 2011
I have Visual Basic 2005. I want to be able to adjust the Master Volume programmatically. In the recent versions of Visual Basic it is much easier but in VB2005 it is a little more involved from what I have read on previous posts. Is there a way to adjust the volume in the code of a Visual Basic 2005 program?
View 8 Replies
Dec 4, 2011
I am creating a program for League of Legends to create your own build and save it and load it. the masteries i want to make it like this [URL] i have made it so if label1 text is "0" "/" "1" then i click on picbox1 the label1text changes to "1" and right click mousebutton on the picbox reverse it to "0" but how can i make the Offence = 0, Defence = 0, Utility = 0 count the masteries selected how can i make so if label text is "0" then on first click it changes to "1" then second click "2"
View 1 Replies
Feb 21, 2012
When I try to print my record using ReportViewer.exe error that given is - "The Array s Fixed or Temporarily Locked (Run Time error When I debug through the code error is - "Method 'AddRows of object 'ICrystalDataObject' failed"
Dim cdoRecordSet As CrystalComObject
Set cdoRecordSet = CreateObject("CrystalDataObject.CrystalComObject")
[code].....
View 2 Replies
Sep 12, 2009
i'm designing a program ........ i just wanted to know how to hide my program form (alt+tab) screen .........and how to hide my program from (task manager)..... and also how can i delete my program after its "FIRST OPEN" and after that it copies itself to the desktop folder.
View 8 Replies
Mar 15, 2012
I am trying to get my program to run at windows startup. Not just load the VB project but to run it.
So that the user just turns on the computer and the project is up and running.
I have seen and tried lots of code suggestions (all different) none seem to work!
View 6 Replies
Sep 18, 2009
how I can start a program with Visual Basic Express Edition 2008? I mean do you have any code I can use as a base to start another program? If that made sense.
View 3 Replies
Oct 28, 2010
I need a Visual Basic Program to search and upload to a form a picture(of any format) saved in access database using a unique field(Verification Number). The access database(2003 version) has the following fields; 1. Picture 2. Verification Number 3. ID
View 4 Replies