can't seem to set var
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: can't seem to set var

  1. #1
    Join Date
    Nov 2012
    Posts
    12

    can't seem to set var

    Hello!

    I am really new to this and was wondering if somebody could have a look at this. What I'm trying to do is get the selected folder value put into my dirlocation var.

    Code:
           private void dirLocation_Click(object sender, EventArgs e)
            {
      
                FolderBrowserDialog fdb = new FolderBrowserDialog();
                fdb.Description ="Please choose the directory your .rlt files are located in";
                if (fdb.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    dirLocation = fdb.SelectedPath;
                }
    Is this how you do it? I keep getting an error like Cannot implicitly convert type 'type' to 'type'

    Thanks in advance guys

    Cheers!
    Stephen

  2. #2
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,352

    Re: can't seem to set var

    You chose the wrong forum for your question.
    In this forum the problem of (native) Visual C++ are discussed.
    As for Windows.Forms look at some .NET forums or at Managed C++/CLI one.
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2012
    Posts
    12

    Re: can't seem to set var

    Sorry to have posted in wrong spot, thought I clicked the right one.

    Sorry again

    Stephen

  4. #4
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,583

    Re: can't seem to set var

    Quote Originally Posted by VictorN View Post
    As for Windows.Forms look at some .NET forums or at Managed C++/CLI one.
    Not quite necessarily here. To me the posted code pretty much looks like (perfectly valid!) C#, while the quoted error message actually does sound like being from a C++[/CLI] compiler. Perhaps the OP first should clarify in which language he actually wants to write/compile his code.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  5. #5
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,352

    Re: can't seem to set var

    Quote Originally Posted by Eri523 View Post
    Quote Originally Posted by VictorN View Post
    As for Windows.Forms look at some .NET forums or at Managed C++/CLI one.
    Not quite necessarily here. To me the posted code pretty much looks like (perfectly valid!) C#, while the quoted error message actually does sound like being from a C++[/CLI] compiler. Perhaps the OP first should clarify in which language he actually wants to write/compile his code.
    I'm confused...
    Doesn't C# forum belong to .NET?
    Victor Nijegorodov

  6. #6
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,583

    Re: can't seem to set var

    Oops! My eyes somehow simply slipped over the ".NET forums" part since it wasn't bolded. So, of course your post was perfectly complete!
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center