收录日期:2020/06/02 20:25:12 时间:2009-08-07 16:18:32 标签:vb.net,winforms

onload i do a msgbox (my.settings.mytext)

it returns a value, but i cannot find where in the project i have set this value!! it was definitely set by me, but i cannot find it anywhere. please help

it is attached to textbox1.text, but that has no value either

Please see My.Settings:

The My.Settings object provides access to the application's settings and allows you to dynamically store and retrieve property settings and other information for your application. For more information, see Managing Application Settings.

and also How to: Add or Remove Application Settings:

Application settings allow you to store and retrieve property settings and other information for your application dynamically. There are two types of application settings, based on scope: user-scoped and application-scoped settings.

At design time, you can add application settings either using the Settings pane of the Project Designer, or using the Properties window for a form or control, which allows you to bind a setting directly to a property.

This last line that I have emphasized is most likely where you want to look.

Maybe you could goto the Edit menu and do a Quick Find on the Settings name, if it finds it you'll probably find out where you've set the value.

Also, have you checked the Program.vb file? I always forget about that file.

Hope this has helped.