Results 1 to 4 of 4

Thread: How do i start a file with input from a textbox

  1. #1
    .NET Framework
    .NET 4.0
    Join Date
    Oct 2018
    Posts
    2
    Rep Power
    0

    How do i start a file with input from a textbox

    Hello all, so first of all i'll say i'm a beginner, though i'm learning rapidly. However this thing has me stumped. I found some solution but these seemed overly complicated.
    Anyways here is my problem.
    I'm currently creating an windows form app that has multiple forms. Form1 is the actual app Form 2 is for filepath input (these go into settings)

    What i want to do now is use the filepath from the textbox on form2 so i can start the .exe on form 1 with a button

    If some1 could tell me this can indeed be done reasonably simple i would be overjoyed.

    Greetz Floppy

  2. #2
    .NET Framework
    .NET 4.5
    Join Date
    Apr 2011
    Posts
    1,934
    Rep Power
    149
    All you're talking about is passing a String from one form to another. Yes, that can be done simply. What some people consider simple is a bit unrealistic sometimes though. I suggest that you follow the Blog link in my signature and check out my three-part post on Data Among Multiple Forms.

  3. #3
    .NET Framework
    .NET 4.0
    Join Date
    Oct 2018
    Posts
    2
    Rep Power
    0
    Thanks a lot for the quick responce an will do. When i started with this c# coding i was slowly creating something, and the coding started to make sense. I thought i was beginning to see some logic in it.
    When i ran into this however i had expected a simple solution like i have info A i know how to start B so i just put a and b together and bingo, but no seems like i have to create a C,D and E to get there.

    I will read through your blog Thanks a bunch

    Floppy

  4. #4
    .NET Framework
    .NET 4.5
    Join Date
    Apr 2011
    Posts
    1,934
    Rep Power
    149
    Programming isn't just a bag where you throw a bunch of things and magic happens. You have to follow certain structure. The sort of thing you describe would take me about 30 seconds so to imply that it's an onerous task isn't really accurate. It's like if someone asked me to drive to the shop it would be a no-brainer but for someone who didn't know how to drive it would be a big deal. All you really need to do is call a method and pass a String as an argument so it's nothing, but if you expect to have a method to call to do something useful to you then you need to write that method first. Visual Studio can't read your mind and magic a method to do the job you want done. You write the code to perform the past you want performed, then you invoke that code and pass in the required data. It IS simple. But even simple things aren't necessarily easy when you first encounter them.

Similar Threads

  1. Compare user input with each line in text file
    By Trianne in forum Console Application
    Replies: 1
    Last Post: 08-13-2018, 4:02 PM
  2. Question Doutbs on how to start learning c#
    By Richard in forum General Learning Resources Discussion
    Replies: 0
    Last Post: 05-14-2017, 5:34 PM
  3. WPF textbox.text to excel file
    By pogipogi in forum Third Party Products
    Replies: 1
    Last Post: 01-06-2016, 7:09 PM
  4. Calendar for game, where to start?
    By binga30 in forum Windows Forms
    Replies: 4
    Last Post: 01-31-2014, 9:47 PM
  5. Question Subtract a gridview textbox value from another textbox
    By lholds in forum Web Forms
    Replies: 0
    Last Post: 04-08-2013, 4:09 PM

Bookmarks

Posting Permissions

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