Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
AnswerRe: Saving Unicode characters Pin
For_IT27-Jun-06 9:58
For_IT27-Jun-06 9:58 
QuestionDebug CompactFramework app on local PC? Pin
QuiJohn27-Jun-06 9:06
QuiJohn27-Jun-06 9:06 
AnswerRe: Debug CompactFramework app on local PC? Pin
Gavin Roberts27-Jun-06 23:20
Gavin Roberts27-Jun-06 23:20 
QuestionSaving the current state of a form Pin
3Dizard27-Jun-06 7:56
3Dizard27-Jun-06 7:56 
AnswerRe: Saving the current state of a form Pin
Josh Smith27-Jun-06 9:21
Josh Smith27-Jun-06 9:21 
AnswerRe: Saving the current state of a form Pin
BoneSoft27-Jun-06 12:36
BoneSoft27-Jun-06 12:36 
QuestionOne more question Pin
3Dizard28-Jun-06 3:49
3Dizard28-Jun-06 3:49 
AnswerRe: Saving the current state of a form Pin
Rojan Gh.28-Jun-06 3:14
professionalRojan Gh.28-Jun-06 3:14 
Hi!
In C# v2.0 (Visual Studio 2005), there is a file, named Settings.settings in the properties folder in the Solution Explorer window, there you can assign some settings in different types and so you can assign a property like this:


Name: FormPosition
Type: System.Drawing.Point
Scope: User (Take care of this, it made me crazy to get this point: Application scope, is read-only and it will be the same as the value you gave to it at the beginning and you can not change it at runtime! But User scope is made to be assigned both at the beginning and at runtime. Cool | :cool: )
Value: 100, 100


and then at runtime, you can access this settings by using this code:

<br />
Point formPosition = global::YourNamespace.Properties.Settings.Default.FormPosition;//YourNamespace = (The main namespace of your application)<br />


and even you can change the value at runtime this way:

<br />
Point formPosition = new Point(MyForm.Left, MyForm.Top);<br />
global::YourNamespace.Properties.Settings.Default.FormPosition = formPosition;//YourNamespace = (The main namespace of your application)<br />


These values will be automatically stored in the registry of windows, and in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\RNG and in binary mode that is coded and not recoverable by users, but by your application.Laugh | :laugh:

Hope you could use it!Rose | [Rose]

Sojaner!
QuestionDataGridView and Database Pin
Wouter Van Ranst27-Jun-06 6:02
Wouter Van Ranst27-Jun-06 6:02 
AnswerRe: DataGridView and Database Pin
led mike27-Jun-06 9:33
led mike27-Jun-06 9:33 
GeneralRe: DataGridView and Database Pin
Wouter Van Ranst28-Jun-06 0:21
Wouter Van Ranst28-Jun-06 0:21 
GeneralRe: DataGridView and Database Pin
led mike28-Jun-06 4:47
led mike28-Jun-06 4:47 
GeneralRe: DataGridView and Database Pin
Wouter Van Ranst28-Jun-06 4:50
Wouter Van Ranst28-Jun-06 4:50 
GeneralRe: DataGridView and Database Pin
led mike28-Jun-06 5:20
led mike28-Jun-06 5:20 
GeneralRe: DataGridView and Database Pin
Wouter Van Ranst28-Jun-06 5:36
Wouter Van Ranst28-Jun-06 5:36 
GeneralRe: DataGridView and Database Pin
led mike28-Jun-06 7:39
led mike28-Jun-06 7:39 
QuestionDelegate Beginner stage Pin
kurangu27-Jun-06 5:52
kurangu27-Jun-06 5:52 
AnswerRe: Delegate Beginner stage Pin
Robert Rohde27-Jun-06 6:12
Robert Rohde27-Jun-06 6:12 
GeneralRe: Delegate Beginner stage Pin
kurangu27-Jun-06 9:27
kurangu27-Jun-06 9:27 
Questiongridview to textbox Pin
johnes777927-Jun-06 5:38
johnes777927-Jun-06 5:38 
AnswerRe: gridview to textbox Pin
eggsovereasy27-Jun-06 10:55
eggsovereasy27-Jun-06 10:55 
QuestionRe: gridview to textbox? Pin
johnes777927-Jun-06 11:37
johnes777927-Jun-06 11:37 
AnswerRe: gridview to textbox? [modified] Pin
eggsovereasy27-Jun-06 11:54
eggsovereasy27-Jun-06 11:54 
GeneralRe: gridview to textbox? Pin
johnes777927-Jun-06 12:33
johnes777927-Jun-06 12:33 
QuestionXML documentation problem Pin
Super Lloyd27-Jun-06 5:20
Super Lloyd27-Jun-06 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.