Preserve A Collection Even After Application Exits?

Jul 23, 2009

I need to preserve a collection even after application exits. In ASP if i use application object this can be acheived. But in windows application what could i do to preserve collections?

View 4 Replies


ADVERTISEMENT

Make A Message Box When An Application Exits?

Nov 1, 2009

I've made an application in Visual Basics, But I Want A msgbox to appear when the form is closed would this work?

Private Sub Form1_OnExit(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.OnExit
MsgBox("Have You Saved, If Not Your Work WILL Be Discarded!", MsgBoxStyle.Critical, "Have You Saved?")
End Sub

View 1 Replies

VS 2008 Application Exits Automatically?

Dec 15, 2010

I have developed a vb.net application which gets a folder as input with n number of .txt.When there are say 5 .txt files the application executes and produces the excel output.When there a n numpber of .txt files say 30, the application takes a long time and exits without producing the output.

View 29 Replies

SplashScreen Staying Open Even After Application Exits?

Apr 30, 2012

Windows Forms VB Application.. I added a splashScreen to my application. And it was flashing only for a second then going away so I added a sleep timer to my Form Load event... The problem is now the splashScreen stays open even After Application exits, instead of simply closing at the end of the sleeptimer.. The Part of the Form Load event that is causing this is as follows:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
Threading.Thread.Sleep(5000)

[Code].....

View 3 Replies

Preserve State Of Textbox And Checkbox When Application Is Closed And Reopened?

Oct 19, 2011

Using VB.Net, how can I save values from a textbox and checkbox when the application is closed? When the user opens the application again, the textbox and checkbox should be filled in with the same values as before.Do I have to save these values in a database, or what other options are there?

View 3 Replies

Application For User - Run As The User And Preserve Individual Settings

Jun 5, 2010

I am attempting to create an application in an attempt so it could be run as the user and preserve individual settings, by this what i am trying to achieve is when the application is installed, it is installed once but each user has their own settings saved within their own profile - a bit like Office applications. How could i start with this?

View 8 Replies

Capture Url When IE Exits?

Aug 5, 2010

I want to allow my user to add urls to a database, much as a user might add file names. I have a form with a label, a textbox, and a browse button. I would like the browse button to load the user's default browser and then have the final url appear in the textbox when the browser closes. I have not been able to do that, but I have come close. I have not found a way to capture the url from an arbitray browser, so I instead load ie.exe and then capture the url with an OnQuit handler. That works (even verified by the debugger) but I am unable to get the url to appear in the textbox without actually clicking in the textbox once ie closes. I would like a suggestion as to how to avoid making my user click in the textbox and, if possible, to load the user's default browser and still capture the url. Here is my code for the Browse button (IE is defined at the class level as Dim WithEvents IE As SHDocVw.InternetExplorer):

theURL = ""
IE = New SHDocVw.InternetExplorer
AddHandler IE.OnQuit, AddressOf HandleIEQuit

[code].....

View 3 Replies

Asp.net - Use A Dictionary-like Collection As An Application Settings Object?

Jun 8, 2009

I'd like to store a set of key/value pairs in the application settings of my ASP.NET web app, but I'm not finding a straightforward way to do that. For example, these two questions tell me that StringDictionary etc. won't serialize to XML and suggest that I'll have to roll my own implementation. But it seems like this should be easier to do; after all, web.config is XML and < applicationSettings> is essentially a collection of key/value pairs, so it feels like I'm missing something obvious. Given my specific case below, do I really have to roll my own serialization, or is there an easier workaround?

The web app in question is a basic contact form that sends email to different recipients based on the value of a parameter; e.g. [URL]...The goal is to be able add or remove recipients (or change their addresses) by editing the web.config file so that I don't have to recompile and can easily maintain different configurations in test and production environments. For example:

// I can use something like this for the sender address SmtpMsg.From = New MailAddress(My.Settings.EmailSender)

// And then just edit this part of web.config to use different addresses in different environments.
<setting name="EmailSender" serializeAs="String"> <value>webcontact@exampledomain.com</value>

[Code]...

View 2 Replies

Way To Remove All Other Cursor Types From Application Collection?

Sep 26, 2010

I have a nice mouse cursor that I attached to every event on the form and the controls, and I would like it to remain always the same cause some times it changes to cursor appstarting.Is there a way to remove all the other cursor types from the application collection?

View 2 Replies

Check If Current ID Exits In That Table Or Not?

Sep 22, 2009

I am using VB.net and Sql server 2005.

I have GridView in Application where I have my CPUserID. There can be thousands records in GridView with different CPUserIDs.

Now I have a button "Allocate Token". But before allocating the token I want to check in my Token Table that if that CPUserID has already exists in table it should not allow user to allocate token and will return some message for that user.

For Each curRow As GridViewRow In GridView1.Rows
Dim cpuserid As Label = CType(curRow.Cells(1).FindControl("lblCPUserID"), Label)
Next

[Code].....

View 2 Replies

Findby Is Not Working, Returns A Row Of 'nothing' When The Key Exits

Jan 2, 2012

I have been using the 'findby' method for sometime, but now it suddenly is failing me on a new data source I have added to the project. I have the data source bound to a form and I am trying to find values based upon a primary key. This evades me, I am able to look up rows using 'findby' with other tables, but not this one.

Dim AnsiX12Row As ansisupplementDataSet.ANSIX12Row = Me.AnsisupplementDataSet.ANSIX12.FindBySegmentElement(CurColName)
If AnsiX12Row IsNot Nothing Then

[Code].....

I have checked and re-checked, the CurColName is for a value in the table, but cant seem to find it... I always have AnsiX12Row = nothingBradford W Brown

View 2 Replies

From.SHOW() In VB 2008 Exits The System

May 14, 2010

I have just converting my VB6 project to VB.NET 2008. I have set up start with Model. It start with Main() sub, in Main sub I have declare as below:

Dim frm as new Formpwd
frm.show()

In formpwd I have UserId, PWD as test box and Two command buttons. The system executes form_load code and then PWD and UserId_Gotfoucus handler and then closes the system. Why is not waiting to accept UserId and PWD?

View 6 Replies

MsgBox No Button Exits Program

Mar 16, 2012

I created a game in visual basic. When the user answers correctly, a message box will appear and ask if they would like to play again. How would I get the program to exit when they push "No" . . .

Public Class Form1
Dim temp As String
Private Sub RadioButton7_CheckedChanged(ByVal sender As System.Object, ByVal e As

[Code]....

View 2 Replies

Updating Webservice With Objects When App Exits?

Jun 13, 2011

Im working on a silverlight application where a user can create, edit, delete objects. The changes they make are placed in a queue which is processed every 4 minutes. When it is processed, the updates are sent over an async web method call to be saved in a sql database, one at a time. When the first update finishes, the next starts.Im having a problem when a user makes a change and then exits the browser app before the 4 minute timer has expired.Currently the changes are getting lost.Ive built on what the guy working on this before me has done, and explored the Dispose and Finalize methods, trying to start the update process when the factory is being shut down, but that isnt working due to the async nature of the web service calls. I get errors saying needed objects have already been disposed of.

View 1 Replies

VS 2008 Working Directory Does Not Exits?

Sep 20, 2009

I had originally saved the project I was working on to my desktop, but now I have moved the folder to another location on my hard drive (didn't want it on my desktop anymore).

But since I've moved it I get the message:

The working directory does not exist: 'C:old folder locationResources'.

Is there a simple way to update my project to the new folder location?

View 1 Replies

VS 2010 Determining When A Thread Exits?

Nov 23, 2011

I'm running a bunch of automated tasks in a thread I'm creating via the Thread class. So I'm not using a BackgroundWorker.

During parts of the automation, the thread may exit. This is normal. But when the thread completes, I need to finish up some additional tasks. I can anticipate all of the conditions in which the thread closes, but I'd rather not to do the final tasks at each point, as this will create a lot of redundant code.

So instead, I wanted to write an event that is triggered when the thread exits. I looked through the Thread class, but all I could find was the ThreadState property, which has a Stopped property. But, when I try to add a handler to that property, it doesn't allow me.

View 11 Replies

WMI - MSDN Crashes Or Exits After 30 Cycles

Jun 11, 2012

For some reason, the next code found on MSDN crashes or exits after 30 cycles or, in other words, after processing 30th Property, exits without explanation. As I said, I found it in MSDN

[Code]...

View 9 Replies

C# - Winform Application, Does Window Minimize Force Garbage Collection?

Feb 8, 2011

Here's the scenario, winforms application, monitoring via Task Manager Processes Tab.On initial launch spins up to ~61,000K (initial data grid and data loads)If I minimize the application, not touching or doing anything the Mem usage drops to 1,380K.When I restore the application is spins back up to only 5.8K

So my question is, does the minimize send some internal message to clean up resources since the application in question is not in focus?The first app I noticed this in happens to be VB.NET, but I've observed the same behavior in my main C# winform applications.

View 1 Replies

Why Is String Collection Editor Add Button In Application Setting Disabled

Apr 3, 2009

why the button in "String Collection Editor" is disabled (Please see the graph)?My final target is to enter a name-value dictionary in App.Config file, is there any alternative method to do that?

View 1 Replies

Checking File Exits In The Absolute Path?

Sep 29, 2011

how can i check if the file exist in the absolute path. for example i have images in the absolute path from which i have to check if the image exits I can do it from FILE.EXIST(path)this method is not working for absolute path, even if the file exits its is showing the file doesnt exist.

View 3 Replies

Combobox - Dialog Exits When Enter Pressed?

Aug 29, 2009

I'm designing a Windows Forms Application, and there is a dialog that should NOT exit when the enter key is pressed, instead it has to validate data first, in case enter was pressed after changing the text of a ComboBox. I've tried by telling it what to do on KeyPress event of the ComboBox if e is the Enter key:

[Code]...

But no success so far. When the Enter key is pressed, even with the ComboBox on focus, the whole dialog is closed, returning to the previous form. The validation is NOT done at all, and it has to be done before exiting. In fact, I don't even want to exit on the form's enter KeyPress, the only purpose of the enter key on the whole dialog is to validate the ComboBox (but only when in focus, for the sake of an intuitive UI). I've also tried appending the validation to the KeyPress event of the whole dialog's form, if the key is Enter. NO SUCCESS! It's like my code wasn't there at all.

View 2 Replies

Do Data Validation When The User Exits A Control

Jan 31, 2012

What is the best method to do data validation? I want to do data validation when the user exits a control so that he gets immediate feedback. I can use the Validating event or the Leave event for that. The problem is, that if the user doesn't know the right answer, and just wants to click the cancel button and leave the form completely, it won't let him. It continues to give him an error message until he completely deletes his answer. Very frustrating. Does anyone have a good method for doing this?

View 5 Replies

VS 2008 - Program Starts And Exits Immediately

Dec 6, 2010

I copied a project I wrote on my XP machine to my other computer with Windows 7 64-bit. When I run it through VS2008 it exits immediately. It does not run a single line of code. The exit code is 0. I need to post what else it says. But I did find a posting about this saying the path to the temp files may be wrong for it but he did not know how to change this. If I create a new peoject and put a command button on it, the program runs. So I was wondering if it is something like the temp files or something else. The machine runs a compiled .exe of the program from the XP machone when installed on the Windows 7 machine. So I do not think it is the program not being compatible.

View 5 Replies

Acrobat Hangs After User Manually Exits Program

Jun 4, 2012

I'm currently having an issue with VB.Net and Adobe Acrobat. The issue comes from exiting Acrobat but the Windows Taskbar still states that there is an Acrobat.exe process open. I have tried using Marshal.ReleaseComObject(), but it still hangs there. I do not want to have to rely on the "End Process" option on the Task bar in order to remove it.

Below is a snippet of the code that I am try to using:
Try
'Tries To Close Acrobat Application
acrobatApp.Exit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(javaScriptObj)
[Code] .....

Although I am not sure if this could be a problem - I run a javascript saveAs script on the Acrobat side in order to make a copy of the file. This also could be a reason why it is hanging, but I ruled it out based on basic knowledge of saving files and exiting from other Acrobat/Microsoft Programs. Acrobat only closes when my application ends. (Currently) I am trying to make it consider the case if a user manually closes the Acrobat application.

View 1 Replies

Show A Confirmation Dialog (dlgConfirm) Before The Program Exits?

Jul 20, 2010

I want my program to show a confirmation dialog (dlgConfirm) before the program exits to prevent accidental closure.

View 2 Replies

VB2008 Method SerialPort.ReadExisting Exits To Quick?

Apr 5, 2010

i'm using the AppendText(serialPort.ReadExisting) method of the SerialPort class. i'm sending to the serial port a 12 byte frame. however in the TextBox control streams printed seem choppy as if the ReadExisting method is exiting too quick to grab all 12 bytes so i can display them at once.

View 3 Replies

.net - Preserve Objects Between Wcf Calls?

Dec 13, 2010

This should be fairly basic, but say I have a Public property as local variable on my WCF service, and I set this in one call to the service. Is there a way to preserve that data for another call to the service? (Without writing the data to xml or a db, and re-referencing it or anything like that)

Executing the calls from the Winform:

Public Class ClientSideWinForm
Private proxy As ServiceReference.Client
Private Sub Client_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

[Code]....

View 2 Replies

C# - Preserve Something I Drew On A Form?

Dec 20, 2009

Basically I drew something on a form using Graphics. Now if I move a window over the form the stuff I drew gets erased.Is there a way to preserve the drawing?

View 3 Replies

How To Preserve A Linq Querry

May 12, 2010

If I write

[code]...

View 1 Replies

Look Preserve Returns In Richtext Box?

Feb 23, 2011

I am working on a richtextbox application.When I typed text into it and hit return, the returns were preserved.However, when I opened the page up in my Microsoft Vista notepad.exe program,the returns were not preserved.The text appears as if wordwrap was unselected in my notepad.exe program.I just got one long strings and no returns.How can I fix this problem so that the returns are preserved? when I open the file back up in my richtextbox program, it appears as I had typed it with all the spacing and returns.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved