VS 2010 Saving State Of The Application?
Jun 28, 2011
how i could save te state of the application.
i'm working with an usb interface and i control relays with it. when i close my exe. and re open i don't see witch relays where switched on.
and because my program shows a light bulb witch indicate turned on or off but when i open it, it first shows everything of also those who aren't.
so i think i need a script that every time i toggle a button it also save the state into a database ore something.
View 8 Replies
ADVERTISEMENT
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
Nov 30, 2010
Firstly i'm not asking for the exact code here but the below is what i'm trying to do:I have a gridview with DropDownList and CheckBox and I have a button outside the gridview that will add a new row within the gridview.I have no problems with the adding row but I have a problem with saving the state of the checkbox/drop down list.Everytime I checked the checkbox and add a new row, all the DDL/CB will be reset.So how can I do it so that when I add a new row, the checkbox that I've checked before will still remain check.
View 3 Replies
Jun 11, 2011
I'm trying to program a personal project, but I've hit a bit of a bump in the road.I've got a Button, a Textbox, and a CheckedListBox; when the button is pressed, whatever is in the TextBox is added to the CheckedListBox. However, when the form is closed and reopened, all of the CheckedListBox's items are no longer present. My CheckedListBox's name in the code is ZapList.
Can someone assist me in, not only saving all of the CheckedListBox's items, but retaining whether or not they were checked as well as the order they were in? I've run out of hair to pull (figuratively) and I really don't want to quit this project, too much effort has gone into it and I'd hate to see it go unfinished like my numerous other projects. :icon_cry:
View 3 Replies
Feb 12, 2012
Currently I am saving data from my applications by saving a text file via a stream reader as a string. I have come to a problem. In my current application, I have an array of the following structure:
[Code]...
View 7 Replies
Mar 19, 2011
How do I detect the state of the INS-key on the keyboard? MS somehow forgot to implement it in My.Computer.Keyboard...
View 3 Replies
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
Dec 19, 2010
I have the following code that goes to a webpage and is suppossed to wait until the webpage has fully loaded.[code]
View 4 Replies
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
May 23, 2012
Error: The database has been placed in a state by user 'UserName' on machine 'ComputerName' that prevents it from being opened or locked.
View 5 Replies
Jan 14, 2012
I haven't used VB in decades and I'm restarting with what I thought would be a simple program. I have two fields on a little form, both of which display a date (dd/mm/yyyy). Field1 is an entry field except on load where is contains a date calculated from field2 (which is 'now' upon application load). Field1 is 'now' + 10 days. This is the default state.
Once loaded (with the data described above), the user can input only in field1. Field2, an inactive field used only for display, is field1 - 10 days. After 15 seconds, fields 1 and 2 revert to their default states as described in the first paragraph. I'm getting all messed up with the 'on load' state. I'll start playing with the timer once I get the initial stuff done.
View 6 Replies
Dec 22, 2011
Public Class Form1
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
[Code]....
As you can see, when I enable/disable my checkbox it enables/disables my textbox.
The thing is, I have more than one textbox, how can i add more textboxes to be enabled/disabled?
I tried using If TextBox2.Enabled = True AND TextBox1.Enabled = True Then
TextBox2.Enabled = False And TextBox1.Enabled = False. (of course fails)
View 5 Replies
Jan 28, 2012
how can I get the current cursor state (Hand or IBeam or ...etc) .. at any active window not only at my form
View 3 Replies
Aug 24, 2011
Does anybody know how to sort a Listview by checkbox state, so all checked items are at the top of the list. I'm targeting Framework 2.0.
View 2 Replies
Feb 21, 2012
During Loading of form I call connectpaybox to show the list in the combobox, but after that it will result in the error "Operation is not valid due the current state of the object" but the combobox items that was taken from the database shows. I tried "select CAGECOST from CAGETYPE where CAGENAME like 'Normal'" where Normal is one of the items in cagename and it works.
[code]...
View 1 Replies
Sep 22, 2011
I've searched the forums but never seems to find an answer for this one.. I recently connected to MySQL database server "Automatically" in Visual Studio 2010. I want to know if there's a way to determine the connection state for "Automatically created" connections in Visual Studio 2010. I know how to do it for"programmatically created" connections but just want to know how on the auto-generated ones.
View 1 Replies
Nov 19, 2010
I want to use property bindings under application settings to store settings for my program. However I have run into a problem. For some reason the checked property is not binding to drop down menu item's checked state. The binding works for text boxes and other controls. I have tried to bind both using the checked property, and checked state property. Auto check on click for the menu items are set to true.
Anyone have any recommendations in getting the app-settings property binding to work without the need to manually set that info and manually run My.Settings.Save?
View 2 Replies
Dec 12, 2011
If you have ever noticed in the Task Manager, when you right-click on the running task, you have many options which include 'Minimize' and 'Maximize'. Is there anyway to do achieve this in vb?
View 1 Replies
Jul 26, 2010
I have a thread in an application which calls a sub routine Main(). The Main sub routine in turn call several sub routines/functions from with the same module,several different classes in the same application. Also some sub routines/functions call routines from a class library. Now say the routine/function in class library goes into a infinite loop and never returns. I would like my thread in the application to raise a event and display message to the users about the infinite loop. I am giving some sample code for the application.
Imports System.Threading
Module VMain
Public gbSuspend As Boolean
[CODE]...
View 7 Replies
Dec 11, 2010
I'm using the following code
' Visual Basic
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
[CODE]..........
Its straight off the Microsoft site found here: [URL]
When I add the required components and click on the button, my app simply disappears, closes, goes right back into a stopped state. No errors, No Warnings, No issues. Nothing. Its as-if there is a stray "END" just before the IF statement. (But there isn't) Its stopping right at the IF statement. My app (THEIR CODE) just makes it disappear and "Stop". The code was working about an hour ago, but now nothing, and thats the only code on the project.
View 39 Replies
Aug 7, 2009
Unfortunately my settings do not get saved.[code]...
View 3 Replies
Aug 19, 2011
I have a small application that consist of five tables. The main table is called inventory. I have four tables linked to the Inventory table
[code...]
I can go in and enter data, create a new record and add more data and then click Save - nothing happens. I can cycle through the records and they will show. However when I exit and reenter the program (stop/start debugging) done of my new data is displayed.
I am thinking the problem has to be with the four tables connected to the main table via the ID's. Although a record is not being added to these subtables. So, I am not sure what's going on.
I have provided the code below. Please take a look and give me some direction.
[code...]
View 1 Replies
Oct 28, 2009
I have main form in which there are 5 buttons to go to 5 diffent forms. lets say main form as form1 and i have 5 sub forms.
in the form2 there is textfield(i name it as txtid).txtid is refrerred as a base for form3,form4,form5 and form6 to pull up the data. in form3 i have a textbox having same value of form2 txtid.
i can get the txtid values into all other forms only when form2 is open if i close form2 and try reopening form2 or anyother form the value in txtid is empty.
I want to know how do i save the value of txtid permanently.
View 9 Replies
Aug 22, 2009
Alright i have a Setting's form and when someone changes it and exit's out the whole form will save over the old one. And when they start the application again the settings will be the same from exited.
View 7 Replies
May 10, 2010
I have made an application and I have many listviews, dockable menu bars etc and I want the user to be able to save the layout of the design of the application once they make changes to it.
For example on my listview I have 3 column, "column 1", "column 2" and "column 3" and they might want to place "column 3" between 1 and 2 as they might prefer this view instead.
How can I code it so that "column 3" wont go back to the default location when they load up the application again after they exit it?
View 1 Replies
Mar 10, 2011
Dim Connection As New OleDb.OleDbConnection
Dim dbProvider As String = "Provider=Microsoft.ACE.OLEDB.12.0;Jet OLEDB:Database Password=cSSO3sEEhrM4vY3je0qC;" 'connect to the access 2010 database, including DB Password
[code].....
View 11 Replies
Feb 2, 2011
i have this code but it doesnt save in Application.StartupPath :
Public Class Form1
Private Property voice As SpVoice
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstyCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
[code]....
but if change the address like this one :
mciSendString("save recsound e:\rec-sound.wav", "", 0, 0)
it is saving... whats wrong with the code? and when i test the value of the wrong code (by msgbox), it says 295.the right code says 0.
View 10 Replies
Dec 9, 2011
I'm trying to save my application settings at run time, but im not noticing any change in the application settings window. Basically, whenever a change is made to the price of a room, i want to save it to the settings so it can recalled later on in run time and when the program is started up again at a later day. Heres the code im using;
[Code]...
View 5 Replies
Aug 24, 2010
I'm a newbee with VBnet , I use vbnet2005 I have a major form called FORM1, and when I click the bottons in it it shows another form for example-I have these some forms (printscreen):
FORM1 - major form
FORM2 - calculation form ( there are few forms like this)
FORM3 - result form
What I need is:When I open FORM2 and get results I push the botton SEND and then it should send the values into FORM3 I don't know if the public variable will be good here because they are not constant , I can get different results in FORM2 ,and these results should be writen in textboxes only after I push send bottom.
I hope it is clear , I don't know how to do it,if you can give me a code for this or detailed answer , I would be very glad.
View 3 Replies
Jul 27, 2011
In VB.net I have a matrix object which I'm trying to save away in application settings and Im not recovering the settings correctly.
[Code]...
View 3 Replies