How To Make Persistent Application Setting

Dec 7, 2009

I have an application that has two states based on the value of a Boolean variable: a read_only=true state and read_only=false state. The value of this state is stored in an external settings file. My application has a feature called deploy that generates a copy of itself in the same folder with the read_only=true state. But, the read_only variable value is stored in an external file so now both files will be in the read_only=true state. What I want to do is make one of them(the original one) always be read_only = false and the other read_only=true

View 3 Replies


ADVERTISEMENT

Make Graphic Persistent In VB And GDI+?

Sep 24, 2010

I have a converted VB6 App that would draw irregular shapes on a PictureBox when I click on a button, and these irregular shapes would persist until I either close the App or erased the PictureBox to start the display anew.I converted my App to VB.Net to do the same, i.e. draw on a PictureBox again, but the drawn lines appear briefly and then, at the end of the drawing process, when my App returns control to the Operating System in wait for another event, the graphics disappear as if erased by the App (which I don't do of course).I have created a Graphics Object associated to my Picture Box as:

Dim CurrGraphics as System.Drawing.Graphics
CurrGraphics = PictureOut.CreateGraphics

I then use the DrawPolygon and DrawLine methods to add the irregular shapes I want:

CurrGraphics.DrawPolygon(CurrPen, Pts)
CurrGraphics.DrawLine(CurrPen, Pts(I).X, Pts(I).Y, Pts(I+1).X, Pts(I+1).Y)

where CurrPen is a defined Pen, and Pts is the Points() array with the coordinates of the displayed shape. Several dozens irregular shapes are drawn and then the subroutine stops, and returns to waiting for another request from the user.What could be the prime reason why graphics do not persist in a PictureBox, and are erased immediately after they are created ?

PS: I do not use the PainEvent of the PictureBox PictureOut, as in the example given in the VB documentation (below), as the display process is initiated by clicking on a button, and I cannot relate how to transfer control to the PaintEvent as below:

Private Sub Form1_Paint(sender As Object, pe As PaintEventArgs) Handles _
MyBase.Paint
' Declares the Graphics object and sets it to the Graphics object

[code]....

View 10 Replies

VS 2008 How To Make ToolStripMenuItem Persistent

Feb 23, 2010

here is what i want to do have a ToolStripMenuItem in a ToolStripDropDownButton menu what i want to do is have an option to not hide the menu when the ToolStripMenuItem is clicked so i wrote the following:

[Code]...

View 3 Replies

Storing Persistent Objects In VB Application

Aug 31, 2011

point me to the best way to store persistant objects ( of my own class) in a vb application? I am putting together a simple family recipe application and have created a food item class. I would like to store the instances ( food items) indefinately so that they are there each time I start the program complete with all properties and meethods

View 14 Replies

Making Settings Value Persistent?

Sep 19, 2011

how to make the settings in my app persistent When i save in the previous run using this

my.Settings.setting_name= some_value
my.Settings.save()

when getting the values using this

some_value=my.Settings.setting_name

i still see the old values in the IDE settings options.How can i make the changes reflect even in the vs ide

View 1 Replies

Usercontrol Properties Not Persistent?

Jan 31, 2011

i've created a usercontrol in a win forms project + the properties work as expected, but when i recreated my usercontrol as a win forms usercontrol class library, the properties changed at runtime aren't persistent.i tried adding a DesignerSerializationVisibility attribute to the property but that didn't work.

View 2 Replies

Create Persistent Graphics On Top Of An Image?

Mar 1, 2011

I am building a program which offers solutions to the travelling salesman problem (finding shortest tour between a set of cities while visiting each only once).

My program loads a bitmap image of a map into a picture box. From there, graphics which point out the cities as well as tour paths are drawn onto the map. My problem is that when the option to plot ALL cities is enacted, the user may choose to pinpoint a specific city with a separate control. When the user erases that pinpoint via an invalidation routine, though, it erases all graphics beneath it, which is undesirable. How can I make my tour graphics and city plots semi-permanent by drawing them directly on the image? I tried drawing them on a separate bitmap, but it 'covered up' the map image.

View 1 Replies

Persistent File Change Within An Executable?

Jan 25, 2011

I was wondering if it is possible to have persistent changes to resources in an executable. I am using VB 2010. I don't know how to be much clearer than that but I will try.

> User opens program and picks 'File A'

> 'File A' is now copied into the executable, thus storing it forever (or until deletion of .exe

> .exe is now slightly larger because 'File A' is inside the program

> User can extract or delete 'File A'

View 2 Replies

Using My.Settings.something To Store Persistent Data?

Dec 27, 2011

You know how using My.Settings.something to store persistent data is done only for user settings and not application settings. This information is stored in the registry on the local user section.My problem here is that even if it is in the same machine, when a user changes some setting it is not reflected on other users. This is desirable for some of them but there are a few I would like to keep for all users.Is there a way to do it with the settings? Do I need to write to the registry in the machine section? or do you just recomend I create a configuration file?

View 5 Replies

Asp.net - SrReader.GetValue(1) - Persistent Data Flow

Apr 19, 2012

I am very New to Vb.net. We are using fortify software for projects when it is going to LIVE. In that process I got some cross-Site Scripting : persistent Data flow issues.

[Code]...

View 1 Replies

Click Event Temp Values Remaining Persistent?

Dec 13, 2010

I'm trying to create a version of the game Spill and Spell. I'm having problems with a click event for Labels that is supposed to exchange the .Text value stored from the previous mouse click with the current .Text value on the new Label clicked. The labels are initialized and stored in an array on the form load.

What's happening is that the values are remaining persistent to the label being clicked.

Desired Results (example):

User clicks on lblDice1 (sender), tempLetter is set to mouseLetter.CurrentLetter, mouseLetter.CurrentLetter is set to lblDice1.Text (sender.text), lblDice1.Text is set to tempLetter. (this part works)

User clicks on lblDice2 (sender), tempLetter is set to mouseLetter.CurrentLetter (s/b initial .Text value from lblDice1 above), mouseLetter.CurrentLetter is set to lblDice2.Text (sender.text), lblDice2.Text is set to tempLetter.

What's Happening:

The tempLetter and CurrentLetter values are remaining persistent to the Label being clicked on. Ie: lblDice1 click will only display the original text associated. If I click Dice1 then Dice2 and then Dice1 again, the original Dice1 text is displayed (same for Dice2).

This is a lot easier to see. All of the controls with the exception of a button ("btnStart") are defined in the code below. Click the Start button to show values in the DiceLabels grid.

The area that's the problem is Public Sub DiceLabel_Click

(this is a work in progress...)

[Code].....

View 8 Replies

Setting An Application's Icon?

Sep 29, 2009

I Want To Make An Application To Set Other Applications Icon (For Example : EXE ) But I Don't Know How To Set An Application's Icon

View 4 Replies

Set Keyboard Not To Make 2 '' After Each Other The Socalled Word Setting?

Aug 8, 2011

set keyboard not to make 2 '' after each other the socalled word setting?

View 7 Replies

VS 2008 Make Database Setting Secure?

Oct 9, 2011

i have a program that connects to mysql database to check username/password.I have a line like this in the project:

conn = New MySqlConnection("server=myserver.info;Port=3306; user id=dbusername; password=dbpassword; database=dbname")Anyways, a user managed to get this info from the program

How can i make it so they can NOT grab this info from the program ?

View 12 Replies

C# - Setting A Timeout In A .net Desktop Application?

Aug 27, 2009

I have created a little application to move some files around and put them into a database. This is working well except that the application needs a timeout. If my app has not completed the task within 2 hours it re opens and locks out everything. I need to say that if my application has been open for 2 hours close it. One thought was can you set a time out in an application.

View 3 Replies

C# - Setting External Application Focus?

Dec 17, 2009

In VB.NET, you can set focus to an external application using

AppActivate("Windows Name")

or

AppActivate(processID As Integer)

Now this works fine if you do for example:

Dim intNotePad As Integer = Shell("C:WINNTNotepad.exe",
AppWinStyle.MinimizedNoFocus)
AppActivate(intNotePad)

But when I do:

For Each theprocess As Process In processlist
If InStr(theprocess.ProcessName, "DWG") Then
strProcessList += String.Format("Process: {0} ID: {1}", theprocess.ProcessName, theprocess.Id) + vbCrLf
AppActivate(theprocess.ID)

[code]....

then it doesn't find the window, even if it's open and even if it finds the window using the window title.But I need it by process ID.How can I do that?I need it to set focus on a 3rd party installer in a windows installer setup project.

View 2 Replies

Preserved Application Setting For New Upgrade?

Jul 31, 2010

When upgrading my old app, how do I preserved those old Application Setting that had been set by previous app, so that the new app can use back the old app setting?

View 1 Replies

Setting An Application As An Active Window?

Apr 13, 2009

I've tried everything to set my window as active after I've been working on another external App... I have my system on auto and need to send some keystrokes to the program using sendkeys, so I need that app active. I've tried almost everything I can think of, bringtofront, setfocus, windowstate, setactivewindow, setforegroundwindow (For the last 2, hwnd doesnt work - I'm using VB 2008 Express) but none of them seem to be working.

View 4 Replies

Setting Focus On An External Application?

Jun 12, 2009

I have an application which calls an external process. I would like this process to be open as soon as it is called. i.e. with no user interaction.This is because I would like to send Keys to it to interact.I know how crude this is but this is a thrid party application that my boss has promised will open is a specific way. Dim procSungard As System.Diagnostics.Process = _

[Code]...

View 3 Replies

Setting The Application Automatically When It Is Run On Different Computers?

Jul 1, 2011

I have written an application. It works fine on some resolutions but most of the controls are over lapped when it is run on some other computers.Is there any way of setting the application automatically when it is run on different computers?

View 1 Replies

Setting Up A VB.net BitCoin Transfer Application?

May 26, 2011

I need to create an application that can accept BitCoin donations. I will have clients sending the data and a server to collect the results. Now, I have my own BitCoin account (on http://ww.MyBitCoin.com) but how would I transfer coins automatically from the client to my server where it will then be added to my account?

View 1 Replies

Setting Up A Way To Connect To The Application From A Web Link?

Oct 9, 2009

im currently improving my mp3 player (some info can be found here http:www.dreaminco...h...7&t=113445) application and would llike some help in setting up a way to connect to the application from a web link (such as the way itunes does it)i click a link in a website for opening a web stream in cisco(the application name)it opens the application then tells the media player(np_player) to connect to the stream

View 1 Replies

Setting Up Voice Commands In Application?

Jan 2, 2012

I wanted to put voice command options into my application.I read stuff online about grammers and SAPI but I can't seem to figure out how to actually use it in my VB.net applications.

View 1 Replies

Application Setting Change By Software Version?

Feb 25, 2012

I am developing a software and give to user sevaral time. When i give them i change Assembly version of my software. But problem is that when they update new version they lost all application setting. Application setting save with new root with version. Is they any way application version not to change with version. save only one root by application name or something.

View 9 Replies

Application Setting In Web.config Not Appearing In Email?

Jan 9, 2011

I am receiving an email from the forgot password page. The email contains the information however there is a link which cannot work because the concotanation isn't working for some strange reason.

[Code]....

View 1 Replies

C# - Setting Expriy Date. For Windows Application?

Jul 3, 2010

Created one windows applcation.now i would like to give licence for it by keeping expiry date.am planning to keep expiry date in registries.how can i get the actaul date. ie; when user changes the system date also- this should not change.(i meran expiry date.) Am looking for logics to acheive this..!!date will be encrypted with the encryption algorithm- defined by our team.

View 1 Replies

Change Application Screen Size Setting

Jul 27, 2010

I am working on an application using vb 2008 express. I have built test programs over the past few weeks and shared them for feed back. Today when I finished some work, I built another test application, but when I install it the start-up screen maximizes but is set between one and two desktop icons from the top of the screen.

In debug mode it looks fine. In the past it looks fine. Each time I start the program the screen is in a slightly different location. It is set to start maximized and to the best of my knowledge, I did not change any settings in the property area. I have tried loading on three computers and the results are the same. Any ideas on what I could have done to produce this strange result?

View 4 Replies

IDE :: Setting The Same Properties For All Forms In A Single Application

May 15, 2012

Most of the apps I write have a base / home form and a few other forms (three of four typically) which pop up in response to controls clicked by the user. I'd like to be able to set some properties to be the same for all the forms in an app; particularly properties like BackColor and FormBorderStyle. Yes, I can manually set the individual properties for each form in the VB IDE, but I'd prefer to be able to have one line of code in the base / home form for each property along with one line for each dependent form which says something to the effect of "use the same property value as the base / home form has". Overall, my objective would be to have one single line of code in the app which, when changed, would apply the changed property to all the forms. For example, a single line which I can change to take the BackColor from Apple to Orange for all the forms ...

[Code]....

View 11 Replies

My.Setting Value Is Wrong Aftar Application.Restart

Apr 14, 2012

I'm using my.settings to save the load time of the solution. When my.settings.load_time value is changed and use my.settings.load_time.save() to save them. When I quit the application and manually start it again, the newly saved settings are used.When I use either application.restart. The application will use the old values for my.settings.Is there a way to restart the application using either application.restart which will use the newly saved my.settings values?

View 6 Replies

Setting File Attributes After Deploying An Application?

Nov 20, 2009

I have an application that uses a text file for its settings. This file is placed in the application folder but deployment sets its file attributes as "Read Only". I have to manually change this attribute every time I deploy the application or an upgrade. I tried (successfully) to place the text file in the "Documents and settings|All users|Application Data" folder, creating a specific folder for my application in which to place my file. The folder and file were created by the setup process but then, users who did not have admin rights still did not see the file, let alone open it.

I have gone back to placing my text file in the [Programs files]|[Manufacturer]|[Application name] folder but am saddled with manually changing the attributes. Is there a way I can do this programatically during deployment (e.g. by some post-deployment process)?

View 4 Replies







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