Programming Theory - Save The State Of A Program

Mar 23, 2012

What is the best way to save the state of a program. Maybe that is not the right way to describe it but, what I mean is almost any application you can input a whole bunch of data make selections and choices and then save these in files unique to the application your working with.

For the time being I will ask my question in term of VB.NET since it is what I am currently working with. I understand the use of the stream writer to write data to a file (any file extension can be used even your own made up one) and then you can later open the file with the stream reader and load the saved application state. At least that is what I know how to do. Are there other ways to approach saving the state? In my case I have a dictionary that is defined through user input to store a lot of data and I am trying to find the best way to save the dictionary so I can load it again.

View 2 Replies


ADVERTISEMENT

Way To Save Program State

Feb 8, 2010

I am making a program for my workplace. The program is going to close explorer.exe on start up and launch only applications i select. (I know that there are other ways to do this, but I'm getting paid to make a custom program W/ Co. Logo)

1st question: How do i make the program close explorer.exe on start up

2nd question: End users will be able to change the background of this app. My question is, How do i save the background the end user pick on program exit and load it on program start? [code]...

View 2 Replies

Microsoft Execute Save State Of Program To "CTR + Z"?

Jan 8, 2010

HoW can microsoft safe state of programe every it changes to undo again.

View 2 Replies

Theory Behind EventLog And TraceListeners

Apr 6, 2012

What is the benefit of using TraceListeners and EventLogs. If I can write some code that writes information about the the status of my application to a text file or to a database, why would I bother working with the complicated EventLog and Tracelisteners.

View 6 Replies

ASP Table Doesnt Save State?

Jan 30, 2012

I created an ASP Table Control and added a row to it programatically. I then repeated the process to add another row. The first row that I added disappeared and only the newest row is being displayed. Is there a property that needs to be set to allow the state of the table to be saved?EDIT:All I do is click a button on the page and it adds a row to the table. Repeated clicks of the button only add one from to the table., here is the function that adds the rows.

Protected Sub addItemButton(sender As Object, e As EventArgs)
'get the id of the item they selected
Dim id As String = CType(sender, Button).Text

[code]....

View 1 Replies

Save The Checkbox State To The Registry?

Apr 1, 2010

I need a form width a checkbox "Don't show this again" for my winform, but how can i make this so when my Form1 loads it checks the state of the checkbox using the getsettings option?

How can is save the checkbox state to the registry? and how do i get the state?

If Form2.Checkbox.checked = Getsettings() Then
Form2.showdialog
Else
Goto Skip
End IF

View 2 Replies

Save Window State To Config?

Apr 20, 2009

Is there any way to save a form window state including all of the controls etc that it has on it in their current state? I'm having to write long functions for each control just to save and reload from a config file, so I'm spending more time on user saved settings than on my actual project.

View 3 Replies

VS 2010 Using XML To Save Objects State?

Sep 25, 2011

I want to create a "Project file" feature. so the user can resume their work right from they left off.Let say I have object Car and that object have some properties. How do I save this properties using xml so I can load it again later?The tricky part is I have many Car object, not only one, and they all have the same variable name. I dont know how it works but it was setup like that.so when the user click save project my program will save all the Car properties and when the user resume their work everything is will be the exact same thing from they left off. So they dont have to start from scratch.Here is the code when the user click the Create Car button[code]....

View 4 Replies

Save Checked State Of A Listview Checkbox?

Mar 25, 2011

On the form that i have there is a listview with checkboxes enabled it all works fine but when i close and reopen the form all the previous checked checkboxes are uncheched . Is there a way to save the state of the checkboxes and on form load to restore them ?

View 5 Replies

Programming A Save Button?

Nov 12, 2010

how to code a save button on visual basic.

View 2 Replies

C# - Save/merge Rows In DataTable To Database Without Depending On Row State Accuracy?

Jun 3, 2012

I need to write a method in C# to save all rows in a given datatable back to the database, but I cannot depend on the rowstate of each row. I can't think of how best to do this without extensive looping through the database table data or constant database querying.

I want to essentially perform the following insert / update for each row in the datatable, but more efficiently:

[Code]...

View 2 Replies

Save The Form Settings Like A Save State Of The Form

Sep 17, 2010

I need to save the form settings, like a save state of the form. Because the program allows the user to add controls. I would like to be able to save them and load them. BTW: The controls are Panels and Labels. BUT! The Panels are a modified version of the control, known as NewComp. This simply allows the user to drag the panel around the form.

View 11 Replies

Game Programming :: Getting A Highscore To Save And Load Using My.Settings

May 20, 2011

I've tried to implement this highscore saving feature, so that when my application closes, the highscore saves within the my.settings storage function, and when my program loads up again, the same highscore loads up from this file. atm, it works ONLY within the application (I can close forms and it's still there, but if i end the program it resets to 0 next time it's loaded).it's basically 2 lines of code..1 for saving and 1 for loading..is this the best way to save a highscore for a game? I was initially thinking of making a database and linking it to that, but apprantly it's easier with the My.settings. even thought of using stremawriter but it's more uneccessary work over my.settings.[code]

View 7 Replies

Check For Program State And Act Upon That

Aug 15, 2011

Here is, basically, how my application works:

When windows starts, my app starts. Whenever my app is running, it hides the desktop, taskbar, etc... When a button is clicked in my application ("Start program"), then my application will set its visible property at false and another application will start.

Everything seems to work perfect except I need a way for my application to set its visible property back to true, but only once the other application that was started earlier, is closed (no longer running.)

My thought was that I could use a timer to check for the applications state every so many seconds:[code...]

I have 2 concerns with this:

1. A timer checking this every few seconds will invoke unneeded stress on a computer since they are running for sometimes very long periods of time.

2. There is a better way to accomplish this that doesnt rely on a timer.

View 2 Replies

Make An State Look Up Program?

Jun 15, 2010

Displaying the State Abbreviation am using radio buttons to look up state and state Abbreviation also.My issues is the box where the State and State abbreviation show become invisible and cause error[code]...

View 21 Replies

VB Programming - Raptor - User Enter Number Of Days They Wish To Save

Mar 24, 2010

I have a program for class that requires you to have the user enter the number of days they wish to save for and then the program takes 1 penny and doubles every day for the amount of days the person enters. I was able to get this to work in Raptor but not VB.

'Description: Taking one penny and doubling it over the number of days the user enters.

Dim decPennies As Decimal = 0
Dim intTotaldays As Integer = 0

[CODE]...

View 3 Replies

Disable View State In Program?

Oct 15, 2011

How can i disable view state in vb.net,so that i have the properties of labels as i left,when i return to a page.i am developing a windows application.

View 2 Replies

Manage The Keys State In Program?

Nov 27, 2010

I Want manage the keys state in my program(in vb 2010) but 'key press event' cant manage more than a key in a time.i want manage keys for commanding something.(for example if "CTRL AND AIT AND Shift And "A" and "S" was pressed do something)

View 3 Replies

Saving Checkbox State Between Program Runs?

Mar 16, 2011

Iam looking for a way to save a checkbox' state between runs. So that if a checkbox is checked and the program is the closed down, it will remain checked when the program starts up again and vice versa. I've found som deferent guides around the web but i cant seem to get it to work..

Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim ExtApp As Integer

[code].....

View 5 Replies

.net - Creating A Program That Runs As A Service And Submits A State To A Database (over The Internet)?

Dec 2, 2011

What I am looking to do is write a VB.NET program, as a service that reports anything on client1 that I want (say the fact it is online) to a database on the internet, so I can look on management1 and see the online status of the machine (assuming management1 has a connection to the online database).

What is being reported doesn't matter, what I am looking at is a starting point to create a system like that. I have googled obviously and come up with nothing, I'd just like a "starting point" or some documentation to look at for creating something like this. The service doesn't look too difficult but the periodic reporting of online status or ANYTHING to any kind of database is not something I am sure how to deal with.

I already have setup a VBS that reports information to an ASP script that then places it in a database but I don't know how I would create say a "keep alive" connection for a vb.net service.

View 1 Replies

Error# 18456, Severity: 14, State: 8. Coming From Visual Basic Program

May 17, 2010

I've been hired at a company to fix some bugs and make some improvements to their in house programs. The program I am currently working has been written in Visual Studio 2005, in Visual Basic specifically. The program is used to connect to a database on a server and provide various information. However, I have run into a snag where the program will refuse to connect to the database when it using a user account and password that has been set up on the database. When I look at the logs i see it is giving the error as stated above, however, I have double and triple checked the password both on the database and the one hardcoded into the program and they are identical yet it still logs that there is a password mismatch. Has anyone run into this problem or figured out a solution towards fixing it, I will be much obliged.

View 6 Replies

VS 2010 : Program To Save Settings To Another Program Without Running The Program That Is Being Edited?

May 5, 2012

is it possible by 1 program to save settings to another program without running the program that is being edited?

View 6 Replies

Create FLASH Tutorials For Programming ( Or For Something Else ) With This Program.>>

Jun 29, 2010

Create FLASH tutorials for Vb.Net programming ( or for something else ) with this program.>>

[URL]

View 1 Replies

Game Programming :: Openfiledialog Breaking Program ?

Apr 10, 2009

I have used the openfiledialog on numerous occasions, and it has never caused a problem. (This is also happening to savefiledialog as well...) Put simply, its breaking my application..

Code:

Private Sub LoadMapToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadMapToolStripMenuItem.Click

[CODE]...

Even this bare minimum code, is causing most of my application to stop working. I have an onpaint method which should be drawing my map, it starts throwing exceptions(file not found), I checked my paths they are correct, I have a listbox linked to a picturebox, clicking a image' name in the listbox, loads the corresponding image to my picturebox, this stops working too..The program isn't hung, I can navigate my listbox, open menu's etc,.. It's breaking everything that has to do with images. I would post code, but, it's quite extensive, and the problem seems to be centered on the opensave dialogs.. (again, I have used this same code without trouble, so many times I have lost count, I'm at a loss as to why its acting up now...) Well, for now I created my own open file dialog, its a little crude compared to the real one, but, mine works..(ie, a standard dialog control, Ok, Cancel, with a ListBox loading the file names..)

View 2 Replies

VS 2010 - Creating A Program - To Secretly Save When The User Clicks On Save

Feb 7, 2011

I'm creating a program and i want it to secretly save when the user clicks on save.

In other words, i have made it so that it saves twice. Once for the user to read (like a fancy copy) and another that the program uses to open up the form.

Currently when pushed, 2 save dialog boxes come up after each other. I don't want this to happen. I want 1 to come up (the user friendly, fancy version) which is the easy part, but i also want the other 1 to save automatically and secretly without asking the user to set the destination.

View 39 Replies

Game Programming :: Dice Rolling Program - When Using Rnd Fucntion How To Make It 1-6 Only

Dec 17, 2008

So my question is, I'm wiriting a VERY basic dice rolling program for my computer programming class in high school. I'm using a randomize function to generate numbers but I only want it to do numbers 1 - 6....how do I do this?

Dim x As Integer
Randomize()
x = CInt(10 * Rnd())

Dim Y As Integer
Randomize()
Y = CInt(10 * Rnd())

That is my code for my x and y (each die) to generate code, but how do I make it do 1 - 6 ONLY? Develope a game that in which a player rolls two dice. Each die has 6 faces. Each face contains 1, 2,3,4,5,6 after the dice have come to rest the sum of the spots is calculated, if the sum is 7 or 12 on the first throw, the player wins. If the sum is 2,3, or 11 on the first throw, the player loses, and the house wins. If the sum is 4,5,6,8,9,10 on the first throw the sum becomes the player's point. To win, a player must roll the dice until the plater rolls the point value. The player loses by rolling a 7 before rolling the point. I also have another question, How would I set this up to keep up with points and stuff? and the part that says "The player loses by rolling a 7 before rolling the point." I have no clue what to do on that. I'm not asking for code hand outs. I'm just asking what functions and such I'd use to write the code.

View 6 Replies

Game Programming :: Make The Program Know When A Black Stone Is Surrounded?

Oct 23, 2009

I'm not positive if this should be here or in graphics so I'm sorry if I'm posting it in the wrong section.I'm trying to make a program for the game Go. Now before getting upset that I want to make the game go I just want to say that I have looked for months for this specific thing and I still have yet to find it. I want to make something to simulate go so that two people can play on the same computer. The problem I ran into was capturing stones. Stones are captured when surrounded and then they are taken from the board. The problem is that I don't know how to make the program know when a black stone is surrounded.

I have thought of a grid detecting but the possibilites on a 19x19 area are too high for anybody to sit down and program. I have also thought of using picture boxes and the edges to detect other pictures, but there are ways for stones to group together and the opponent must surround all stones to capture them.

View 3 Replies

Game Programming :: Creating A Hangman Program Using VB 2008 Express Edition?

Nov 30, 2008

Basically i am creating a Hangman program using VB 2008 Express edition and need some help.I would like some help on when a user is entering a letter for the word how can i make it so for example if the target word is "MAX" and they enter "M" i would like the lblstatus to update as "M--" obviously i would want it to be able to do it with all 3 letters.

View 2 Replies

Text Editor Program - Save And For Save As?

Feb 28, 2010

I almost have this text editor/Stopwatch/Calculator program done. I am having mojor difficulties to get this code for Save and for Save As to work properly. I do not have code for save yet. When I click on Save I want it to save without popping up the dialog box. I do not have code for Save yet. When I click on Save As I want the popup box to show. Here is the code I have for Save As:

[Code]...

View 6 Replies

Game Programming :: Program Is Designed To Generate A Random Hand Of Cards Out Of Our List?

Aug 19, 2008

Below is the code that we have been working on. We have bolded the parts which we are unsure about - they are producing errors. (its near the bottom)The program is designed to generate a random hand of cards out of our list of them. This program is a smaller version of what we hope to have in the full one - ie. It tries to get a random hand of 3 cards out of a possible 5.

The part we are having errors with is getting the images to display on each of the 3 'picturebox' objects using a loop (so we don't have to type each picturebox individually).

[Code]...

View 8 Replies







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