Results 1 to 13 of 13

Thread: Form Position [RESOLVED]

  1. #1

    Thread Starter
    Member
    Join Date
    May 2005
    Posts
    46

    Resolved Form Position [RESOLVED]

    Hi All,

    I want to make my form so it is NOT on top, I want my form to be pinned to the desktop so to speak. I have been trying to find a way to do it but I cannot and it is driving me mad now.

    Can anyone help?

    Many Thanks,

    TrUz
    Last edited by Hack; Apr 4th, 2006 at 09:29 AM. Reason: Added green "resolved" checkmark

  2. #2
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Form Position

    Quote Originally Posted by Truz
    Hi All,

    I want to make my form so it is NOT on top, I want my form to be pinned to the desktop so to speak. I have been trying to find a way to do it but I cannot and it is driving me mad now.

    Can anyone help?

    Many Thanks,

    TrUz
    Can you either more clearly state your question or attach an image of what you are looking to do.
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  3. #3
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Form Position

    do you want your form to be on top always or not
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  4. #4

    Thread Starter
    Member
    Join Date
    May 2005
    Posts
    46

    Re: Form Position

    No I do not want my form to be on top. I want it to be always on the bottom so nothing can be under it.

    Hope this is a little more clear.

    Many Thanks,

    sfx

  5. #5
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Form Position

    Quote Originally Posted by Truz
    No I do not want my form to be on top. I want it to be always on the bottom so nothing can be under it.

    Hope this is a little more clear.

    Many Thanks,

    sfx

    If you want it to be last form why not make it invisible? Also do you want to for to be the last form in your application or for windows?
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  6. #6
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Form Position

    please explain the reason why do you want to make so, it might help people to help you
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  7. #7

    Thread Starter
    Member
    Join Date
    May 2005
    Posts
    46

    Re: Form Position

    I want it to be the last form for windows. So no other application can be under it. The form cannot be invisible as there is controls on it that users need to use.

    I want this for to be under everything because I call other DLL's from this form and when ever I call a DLL the form comes to the top and it is very annoying.

    Thanks,

    sfx

  8. #8
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Form Position

    mmm....the form will come into focus when you try to execute any statement in it...
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  9. #9
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Form Position

    Quote Originally Posted by ganeshmoorthy
    mmm....the form will come into focus when you try to execute any statement in it...

    Good point!
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  10. #10
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Form Always on Bottom

    This will keep your form always at the bottom

    VB Code:
    1. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
    2.                 ByVal lpClassName As String, _
    3.                 ByVal lpWindowName As String) As Long
    4.                
    5. Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" ( _
    6.                 ByVal hWnd1 As Long, _
    7.                 ByVal hWnd2 As Long, _
    8.                 ByVal lpsz1 As String, _
    9.                 ByVal lpsz2 As String) As Long
    10.                
    11. Private Declare Function SetParent Lib "user32" ( _
    12.                 ByVal hWndChild As Long, _
    13.                 ByVal hWndNewParent As Long) As Long
    14.  
    15. Private Sub Form_Load()
    16.     Dim ProgMan&, shellDllDefView&, sysListView&
    17.    
    18.     ProgMan = FindWindow("progman", vbNullString)
    19.     shellDllDefView = FindWindowEx(ProgMan&, 0&, "shelldll_defview", vbNullString)
    20.     sysListView = FindWindowEx(shellDllDefView&, 0&, "syslistview32", vbNullString)
    21.    
    22.     SetParent Me.hwnd, sysListView
    23. End Sub

  11. #11
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Re: Form Position

    Neat trick, just set the desktop as parent.
    Frans

  12. #12

    Thread Starter
    Member
    Join Date
    May 2005
    Posts
    46

    Re: Form Position

    Thanks bushmobile,

    I will give it a bash.

    Thanks,

    TrUz

  13. #13
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Form Position

    Don't forget to mark this thread resolved.
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


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