The Form Properties!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rave3085
    New Member
    • Apr 2007
    • 27

    The Form Properties!

    In my project i want the forms to be maximized always and the option of draging it with a mouse should be disabled!

    Though i can make all the form to the condition i proposed, i donno what to do to some of the forms as to stop them from being dragged, And also how can i make the startupform fro being dragged!

    Please suggest!!!!!!!! !!!!!!!???????? ??????????
  • Geoff
    New Member
    • Feb 2007
    • 17

    #2
    From what you've said I'm guessing that you're wanting to change the form(s) so they're in windowstate maximized. In the form properties there is an option near the bottom of the list "Window state" with 3 options, normal, minimised, and maximised. Changing this changes how the form loads in form load. Hope this helps.

    Geoff.

    Comment

    • SanjuMtr
      New Member
      • Mar 2007
      • 47

      #3
      Originally posted by rave3085
      In my project i want the forms to be maximized always and the option of draging it with a mouse should be disabled!

      Though i can make all the form to the condition i proposed, i donno what to do to some of the forms as to stop them from being dragged, And also how can i make the startupform fro being dragged!

      Please suggest!!!!!!!! !!!!!!!???????? ??????????
      Use the property of Form
      Set Moveable=false
      Windowstate=Max imize.
      2nd Question???? conffusing.Plz Explain in Details.

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by SanjuMtr
        Windowstate=Max imize.
        If it's VB6, the actual name of the constant to use is vbMaximized (value is 2).

        Comment

        • isotope11
          New Member
          • Mar 2007
          • 10

          #5
          To prevent it from clicking the maximize button you should disable it.
          You can do this by changing the MaxButton property of the form to False.

          Comment

          • Killer42
            Recognized Expert Expert
            • Oct 2006
            • 8429

            #6
            Originally posted by isotope11
            To prevent it from clicking the maximize button you should disable it. ...
            Good point. Thanks, isotope.

            Comment

            • SanjuMtr
              New Member
              • Mar 2007
              • 47

              #7
              Originally posted by Killer42
              If it's VB6, the actual name of the constant to use is vbMaximized (value is 2).
              Yes, its a spelling Mistake. thank u for pointed out.

              Comment

              • rave3085
                New Member
                • Apr 2007
                • 27

                #8
                yeah i was maximize my form but i want to prevent the form from being dragged by mouse! how can i do this?????

                Pls Help!!!!!!!!!!! !!!1

                Comment

                • Killer42
                  Recognized Expert Expert
                  • Oct 2006
                  • 8429

                  #9
                  As SanjuMtr pointed out, set .Moveable = False.

                  Comment

                  • rave3085
                    New Member
                    • Apr 2007
                    • 27

                    #10
                    I typed this in the form_load event

                    form1 is my form's name

                    with form1
                    .moveable=false
                    end with

                    and also simply wrote form1.moveable= false

                    Either ways i got this error:

                    Compile Error:
                    Function or interface marked as restricted,or the function uses an automation type not supported in visual basic.

                    Pls Help

                    this was the complete code in my form_load event

                    Code:
                    Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
                        Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
                        Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
                        Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
                        Form1.Moveable = False

                    Comment

                    • rave3085
                      New Member
                      • Apr 2007
                      • 27

                      #11
                      Though i got the form not to be moved by the mouse by making the moveable property in its property's table to FALSE, i would like to know why the same cannot be done with the code i gave in the previous post.

                      Please explain the error i mentioned above!

                      Thanx a lot!!!!!!!!!!

                      Comment

                      • Tig201
                        New Member
                        • Mar 2007
                        • 103

                        #12
                        It is because in vb6 the forms Moveable property is read only at run time.

                        Comment

                        • rave3085
                          New Member
                          • Apr 2007
                          • 27

                          #13
                          what is the difference there in typing it as a code!
                          Even it is gng to be run only at runtime, isn't it!

                          Pls do explain clearly!

                          thanx!

                          Comment

                          • Killer42
                            Recognized Expert Expert
                            • Oct 2006
                            • 8429

                            #14
                            Originally posted by rave3085
                            what is the difference there in typing it as a code!
                            Even it is gng to be run only at runtime, isn't it!
                            DEsign mode and run-time mode are quite differnt. Some things can only be done in one mode or the other. It's not always clear why, though presumably there are reasons.

                            Comment

                            Working...