Scale Posted November 23, 2007 Share Posted November 23, 2007 I have a nice tool that i use but it has the nasty property of always on top (topmost),I reasonably experienced with assembly but i always have a hard time with VB.Anybody know how i could remove the top most,No idea where to start or how to trace it.Thanks Link to comment
ChupaChu Posted November 23, 2007 Share Posted November 23, 2007 try compiling one test form app. with top most turned on, and the same witout it, then check bytes around form caption in hexeditor for differences.. Link to comment
Pimp.exe Posted November 23, 2007 Share Posted November 23, 2007 (edited) You would use the SetWindowPos api with HWND_NOTOPMOSTExample:Private Const HWND_NOTOPMOST = -2Private Const SWP_NOSIZE = &H1Private Const SWP_NOMOVE = &H2Private Const SWP_NOACTIVATE = &H10Private Const SWP_SHOWWINDOW = &H40Private Declare Sub SetWindowPos Lib "User32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)Private Sub Form_Activate() SetWindowPos Me.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZEEnd Sub Edited November 23, 2007 by Pimp.exe Link to comment
Departure Posted November 25, 2007 Share Posted November 25, 2007 vb6 forms dont come standard with topmost, so your little tool you wrote must have code for being on top, remove that and you form wont be topmost....I first thought you wanted topmost but i read your post again, does'nt make sence because there is no topmost in vb6 unless you write code to do so Link to comment
Scale Posted November 25, 2007 Author Share Posted November 25, 2007 vb6 forms dont come standard with topmost, so your little tool you wrote must have code for being on top, remove that and you form wont be topmost....I first thought you wanted topmost but i read your post again, does'nt make sence because there is no topmost in vb6 unless you write code to do soYe but how do you find that code?I have no idea how to trace or find it stupid VB :S Link to comment
Scale Posted November 25, 2007 Author Share Posted November 25, 2007 So i placed a break point on the SetWindowsPos and createwindow API,And looked for a TOPMOST flag but i didnt see it :S Link to comment
Pimp.exe Posted November 26, 2007 Share Posted November 26, 2007 (edited) From what I read, he didnt code the tool. He has a tool that puts itself TOPMOST. Edited November 26, 2007 by Pimp.exe Link to comment
Departure Posted November 26, 2007 Share Posted November 26, 2007 (edited) settel down pork chops, I dont know where you get that from ( 4th time I have done something to you). I never corrected anyone, I was'nt sure if he wanted topmost in vb for a tool he was writting after seeing his second post I relized he want to remove topmost from an external vb6 app, The reason I thought it was for his own app is the code you supplied.Private Const HWND_NOTOPMOST = -2Private Const SWP_NOSIZE = &H1Private Const SWP_NOMOVE = &H2Private Const SWP_NOACTIVATE = &H10Private Const SWP_SHOWWINDOW = &H40Private Declare Sub SetWindowPos Lib "User32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)Private Sub Form_Activate() SetWindowPos Me.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZEEnd SubThe misconfusion was when you wrote "Me.hWnd" meaning the app he has written in vb, because from what I understand he would need to find the handel of the external app then call setwindowpos api. Sorry if I missunderstood but the code given was clearly for the app written to be topmost not an external app.P.s sorry if that upset you that was'nt my intention.......... Peace pimp Edited November 26, 2007 by Departure Link to comment
Pimp.exe Posted November 26, 2007 Share Posted November 26, 2007 Well my code was an example of how to use the API and the concept. I see where u got that though. Perhaps I have read some of your posts wrong Departure. No problems then. Link to comment
DrPepUr Posted January 17, 2008 Share Posted January 17, 2008 Search for text string "SetWindowPos" Find Where this address gets Pushed, should be around MSVBVM60.DllFunctionCall Goto the location where this gets called from and up above there should be Push -1 Change to Push -2 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now