Results 1 to 4 of 4

Thread: something challenging ... for me

  1. #1

    Thread Starter
    Junior Member Novice's Avatar
    Join Date
    Nov 2003
    Location
    Stuttgart
    Posts
    19

    something challenging ... for me

    Hello,

    I've got a little problem.

    I am attending to create a new form in my
    (first great project) painting programm.

    Now here's the prob:

    I have a button to open a new subform into my MDIContainer.
    But before it opens, I would like to have the user to enter the
    height, width, resolution, backcolor and so on.

    I've already made a form which contains all the textboxes,
    comboboxes and radiobuttons. They are grouped into several
    GroupBoxes.

    Now my big problem is, where to start.

    How do I save the Information (which the user entered) to
    that point, where the OK Button is clicked?

    Is it advisable to copy the Information to the clipboard?
    Because saving it to a file doesn't fit in my plans.

    I'm sorry that there is no existing code by now.
    But I don't want you to code it, I just need some
    advise, suggestions and/or examples.

    Thanks
    I know that I know nothing, therefore I know something.

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Well, definitely not to clipboard.

    Just grab the data, stick it in variables, and pass them along to the form when it is created.

    You could write an overloaded New(), or preferably, a public method that takes size, resolution, and sets them.

    VB Code:
    1. Public Class MyMdiChild
    2.         Public Sub New(formSize As Size, resolution As Integer, backColor As Color)
    3.  
    4.         End Sub
    5.  
    6. ''''or a public method
    7.  
    8.  Public Sub SetFormParameters(formSize As Size, resolution As Integer, backColor As Color)

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    There should be no need for the clipboard here just store the information in memory and pass it to the new child form in its constructor. If you want you could also change what the form that chooses the size returns instead of the DialogResult enum.

  4. #4

    Thread Starter
    Junior Member Novice's Avatar
    Join Date
    Nov 2003
    Location
    Stuttgart
    Posts
    19
    Thanks for the reply,

    I'd like to test your suggestions, but I'm not able to do it before Monday morning. Therefore I'm going to test it next week and post the results here.

    Until then
    I know that I know nothing, therefore I know something.

Posting Permissions

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



Click Here to Expand Forum to Full Width