|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Access of shared member, constant member, enum member or nested type through an instancegetting the subject diagnostic on DialogResult.OK and I can't figure out what I am doing wrong. Any Help? ADVthanksANCE Private Sub BTN_Browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_Browse.Click Dim sMyPath As String FolderBrowserDialog1.ShowDialog() If FolderBrowserDialog1.ShowDialog() = DialogResult.OK Then Jeffrey,
>I took the code below from an example of FolderBrowserDialog but I keep I think it's because the name "DialogResult" resolves to the form's>getting the subject diagnostic on DialogResult.OK and I can't figure out >what I am doing wrong. DialogResult property (which returns an instance) rather than the System.Windows.Forms.DialogResult type. Try to fully qualify the type name. Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. Mattias,
"Mattias Sjögren" <mattias.dont.want.spam@mvps.org> schrieb: .... or alternatively use a namespace alias:>>I took the code below from an example of FolderBrowserDialog but I keep >>getting the subject diagnostic on DialogResult.OK and I can't figure out >>what I am doing wrong. > > I think it's because the name "DialogResult" resolves to the form's > DialogResult property (which returns an instance) rather than the > System.Windows.Forms.DialogResult type. Try to fully qualify the type > name. \\\ Imports WinForms = System.Windows.Forms .... If Foo.ShowDialog() = WinForms.DialogResult.OK Then ... End If /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Thanks. That did it. I changed the line to -
If FolderBrowserDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then Which works fine. Thanks again. Show quoteHide quote "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message news:%23AhM40e0GHA.5048@TK2MSFTNGP05.phx.gbl... > Jeffrey, > >>I took the code below from an example of FolderBrowserDialog but I keep >>getting the subject diagnostic on DialogResult.OK and I can't figure out >>what I am doing wrong. > > I think it's because the name "DialogResult" resolves to the form's > DialogResult property (which returns an instance) rather than the > System.Windows.Forms.DialogResult type. Try to fully qualify the type > name. > > > Mattias > > -- > Mattias Sjögren [C# MVP] mattias @ mvps.org > http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com > Please reply only to the newsgroup.
SQL parameter: what is wrong here?
Exporting a vb.net datagrid to excel Formatting text w/VB.NET Abstraction question Calling a VB.NET-DLL FROM VB6 Iterating through the records in a dataset Crystal Reports in VB.NET Determining max number of characters in a TextBox Two threads are accessing my Synclocked code Save Radio Button setting |
|||||||||||||||||||||||