i am stucked with a procedure in my app. this procedure do monitor application.startuppath folder. if this folder is opened by user my application should close it.i have tried it to be done with system.Diagnostics.process. but wont be able to make it possible.
I'm currently in the process of building a text editor type program, and have run into a brick wall. I haven't done VB in years, so I may just need a little reminder on some things. I have coded everything so far as far as opening files, saving them, changing fonts, colors, etc. However, I'm looking to add a Close button to my menu strip that will just close the currently opened file, and not the entire program, while also ask the user if he/she would like to save before closing the file, and then if they select yes, it will show the save dialog, and if not, it will go ahead and close the currently opened item.
i create a mdiparent form and a form1, all i wanted to do is to close the mdichild form(form1) with a close in the menustrip.When i want to close the opened childform with menustrip (i create a button close in the menustrip)
I am trying to write text to a file in this path "C:\Test\test.txt" and when I want to save image filenames to this path I need to check if the file is opened and if it is opened I need to close the ".txt" file and write the text to the text file.[code]...
I have a master form which uses the SplitContainer control. The PANEL1 of the split carries the MenuStrip and Panel2 is used to call related external forms
Code (refer below): Function ResetSplitContainerPanel2 clears the Panel2 and loads the new form using the SetFormAttributesToLoadInPanel2
Issue: Although SettingSplitContainer.Panel2.Controls.Clear() clears the Panel2 but the form still maintains the form in the editable mode. If I call the same form again, I can see the values which I typed earlier
Output Expected: On Load of new form, the previous loaded form in PANEL2 should be disposed completely
Private Sub ResetSplitContainerPanel2() SettingSplitContainer.Panel2.Controls.Clear() End Sub Private Function SetFormAttributesToLoadInPanel2(ByVal formNameToChange As Form) As Boolean On Error GoTo errHandler [Code] .....
ErrHandler: MsgBox("Error Description: " & Err.Description, vbOKOnly, "Error") SetFormAttributesToLoadInPanel2 = True Exit Function End Function
I'm Using VB.NEt 2005.... the Problem is...If I close Mdiparent When i've opened many MdiChild Forms All Forms Also Closed.I Want that when MdiChild Forms opened if i Press Close Button of MdiParent Form there Should be a Msg that "First Close MdiChild Forms " then Close Mdi Parent.
I have set up a notify icon for my form. I want to make it so that when the user clicks the close button that it doesn't close the form it just takes it to shows the notify icon. They can exit the program from the notify icon. Can someone tell me how to keep it running?
Since it will be run by the user I don't want the user to have to do anything but send the IT department the log file it creates.
What I want to do is see if a folder on the network can be opened successfully. I do not want to ping it, but actually open it and see if it loads. I can do this for a website by retrieving the http status code, but I can't find any references to something similar for explorer.exe. Here is a basic flowchart of this part of the program:
ping server --yes--> access \server_namefolder --no--> access \server_IPfolder --no--> Authentication Issue --yes--> DNS Issue
Note also that just checking authentication won't work because it could also be a DNS problem. I guess I could check them both, but I would rather do it this way if possible (and I don't know how to go about checking either one)
I have a couple of files which I have to update periodically through a process written in VB.net . These files are on a server and part of a domain that many users can access. These files should never be written to as they are for reference only. I need to be able to overwrite some of them even if a user has them opened. Is it possible to do this? Presently the files permissions are not set as read-only but I can do this as long as the user under which the process runs will still have permission to overwrite them.
UPDATE: thx for your responses. The files are pdf and are opened by clicking on them from windows file explorer. This also happens when a user simply has the file selected in windows explorer.
My program opens 4 excel spreadsheets updating info. I update one at a time and then close it before opening the next one.I want to add code to my program to test if the file is already open, before trying to open it. Occasionally someone will have one of the files opened and it causes a crash. If I test to ensure it is not open, then I can avoid this.
I have a WinForms application that I have taken over support for and it was build using Visual Studio 2005 with VB.Net. The application makes use of an Access database. It runs fine when it is installed as a standalone application, but the install cd for the application also allows for a network install and this is where I am currently encountering issues.
To test the network install I created a folder on my server (Windows Server 2003 SP2) and copied the Access database to this folder. I created a share for this folder and gave everyone full permissions to the share. Then on the workstation I installed the application and gave the path to the database as follows:
\myservermysharemydb.mdb
(The install steps here are as per the instructions given on the installation cd)The workstation that I installed it on is Windows 7 Ultimate. When I run the application, I get the error message given in the title when the application tries to read the database file. I have confirmed that I am able to write to the shared folder on the server, so I don't think this is a permissions issue. Also, the database file is not in use at all, so it is definitely not opened exclusively.
UPDATE:I have tested the workstation installation on a computer with a fresh install of Windows XP SP3 and it is able to access the database file without a problem. So it seems that this error that I am getting is somehow specific to Windows 7. Is there maybe a known issue with Oledb drivers on Windows 7? My version of Windows 7, btw is 32 bit.
Basically I am trying to enable the user the ability to select a folder and the folders music files populate a list box. I want two list boxes on the page, one with all the contents of the folder and then the other one for files selected from the first box. I have no clue on how to do this at all...
How can I do it so every time the user loads my application it will automatically (without prompt, or user selecting) upload all the files in a folder i select beforehand and add them into ListBox1
I have Example and i need to kill the session when user close his browser window. i tried page_unload() not working. the example is:i have parent windows and window will open from it i need to delete session when user close the child window.
this maybe an easy one for mos of you! I have a windows that is displayed as full screenThe window contains a series of images (movie posters) and the name below it. When you user clicks on a movie poster a new window appears (smaller window) in the middle of the screen.I want to force the user to close close on the small window before procedding. Currently if the user clicks outside the small window the full screen window comes to the front thus hiding the smaller window.
I am trying to show a message box when a user clicks the red cross in the top right hand corner of the screen (to close the current form) and I want to code the OK and Cancel buttons so that when the user clicks OK butto the form closes. This is what I have
Code: Public Function Save() As Boolean Dim valid As Boolean = True Dim Message As String = String.Empty
[Code].....
What I want to do is when The toolbarbutton1 is clicked it checks for the Save () - if txtprojend.Text = "" then it displays the message. So far, it does that but then it closes the form. I don't want it to close the form unless the user adds text in txtprojend, as it is a mandatory field.