T
Tom Shelton
Just wondering?
Tom Shelton said:Just wondering?
Tom --
I use 'My.Settings' and 'My.Resources' because both are really easy to use.
In addition, I use other methods provided by 'My' which are otherwise not
available in the .NET Framework, such as file copying showing the shell's
dialogs.
However, I disable 'My' features in class library projects because they
often do not make much sense there.
Tom Shelton said:Ok.. Sounds reasonable. There just seems to be a lot of stuff that My
makes
more difficult or just hides.
Tom,
Could you provide some examples? Just wondering...
Tom Shelton said:Just wondering?
Sanders Kaufman said:I *started* to use My Services, but then I read something somewhere that
Microsoft said it was phasing it out.
Tom Shelton said:Just wondering?
C Kevin Provance said:| Partial Friend Class MyApplication
| Public Function Question(ByVal QuestionText As String) As Boolean
| Return (Windows.Forms.MessageBox.Show(QuestionText,
| My.Application.Info.Title, Windows.Forms.MessageBoxButtons.YesNo,
| Windows.Forms.MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)
=
| MsgBoxResult.Yes)
| End Function
That is a real mess. Managed code indeed.
Fair enough. I can see where that would save some typing. But still, good
old classic VB never needed so many dots.
Michael D. Ober said:Since we're in VB.NET:
Partial Friend Class MyApplication
Public Function Question(ByVal QuestionText as String) as Boolean
Return MsgBox(QuestionText, vbYesNo or vbQuestion or
vbDefaultButton2) = vbYes
End Function
End Class
In C#, you would be correct that it's a mess. Use the VB language to your
advantage, especially if you are already using the My class functions.