1. Moving a borderless window - Is there a way?
- Posted by Evan Marshall <1evan at sbcglobal.net> Jan 19, 2004
- 661 views
I have a window with no title bar or borders. I'd like to be able to grab it with the mouse and move it where I want. Is this possible?
2. Re: Moving a borderless window - Is there a way?
- Posted by Guillermo Bonvehi <knixeur at speedy.com.ar> Jan 19, 2004
- 617 views
Evan Marshall wrote: > > I have a window with no title bar or borders. I'd like to be able to > grab it with the mouse and move it where I want. Is this possible? Take a look at PatRat's library: http://www.rapideuphoria.com/dragwin.zip Best Regards, Guillermo Bonvehi
3. Re: Moving a borderless window - Is there a way?
- Posted by Evan Marshall <1evan at sbcglobal.net> Jan 19, 2004
- 624 views
Thanks. That's what I needed. Guillermo Bonvehi wrote: > > Evan Marshall wrote: > >> >> I have a window with no title bar or borders. I'd like to be able to >> grab it with the mouse and move it where I want. Is this possible? > > > Take a look at PatRat's library: http://www.rapideuphoria.com/dragwin.zip > > Best Regards, > Guillermo Bonvehi > > > > TOPICA - Start your own email discussion group. FREE! > >
4. Re: Moving a borderless window - Is there a way?
- Posted by Evan Marshall <1evan at sbcglobal.net> Jan 20, 2004
- 619 views
I found an easier way. When the window receives a WM_NCHITTEST message, send a NTCAPTION response back. This fools the window into thinking that the title bar has been clicked on. A drawback is that the window will no longer be able to respond to any other mouse events. > Thanks. That's what I needed. > > Guillermo Bonvehi wrote: > > > Evan Marshall wrote: > > > I have a window with no title bar or borders. I'd like to be able to > grab it with the mouse and move it where I want. Is this possible? > > > Take a look at PatRat's library: http://www.rapideuphoria.com/dragwin.zip > > Best Regards, > Guillermo Bonvehi > > > TOPICA - Start your own email discussion group. FREE! >
5. Re: Moving a borderless window - Is there a way?
- Posted by Isaac Raway <isaac-topica at blueapples.org> Jan 20, 2004
- 738 views
I have used this algorithm in VB for years. It is as solid as any I know of: without warning include win32lib.ew constant mainWin = create( Window, "Drag test", 0, 0, 0, 300, 100, 0 ) -- we use two global variables. because it is not possible to drag more than one window at a time, -- we only need these two no matter how many windows use them. sequence refPos refPos = {0,0} integer mouseDown mouseDown = False procedure mainWin_onMouse(atom event, atom x, atom y, atom shift) sequence extent sequence size -- we need to store the position the mouse was at when the button is pushed down -- otherwise, the window's upper-left corner will "snap" to the position of the mouse. -- uncomment the second line to see what I mean. this also sets the mouseDown flag. if event = LeftDown then refPos = {x, y} --refPos = {0, 0} mouseDown = True end if -- if the left mouse button is down, we will now actually move the window if event = MouseMove and mouseDown then -- the extent is used for it's left (1) and top (2) properties extent = getRect(mainWin) -- getCtlSize is more convienient to use as the 4th and 5th arguments to -- setRect, because it expects width and height, not right and bottom size = getCtlSize (mainWin) -- move the window, and repaint it setRect(mainWin, extent[1] + x - refPos[1], extent[2] + y - refPos[2], size[1], size[2], True) end if -- clear the mouseDown flag. if event = LeftUp then mouseDown = False refPos = {0,0} end if end procedure onMouse[mainWin] = routine_id("mainWin_onMouse") WinMain(mainWin, Normal)
6. Re: Moving a borderless window - Is there a way?
- Posted by "Elliott S. de Andrade" <quantum_analyst at hotmail.com> Jan 21, 2004
- 620 views
>From: Isaac Raway <isaac-topica at blueapples.org> >Subject: Re: Moving a borderless window - Is there a way? > >I have used this algorithm in VB for years. It is as solid as any I know >of: > Only thing is, you should use setHandler(). setHandler(mainWin, w32HMouse, routine_id("mainWin_onMouse")) and of course change the parameters of the procedure. > >onMouse[mainWin] = routine_id("mainWin_onMouse") > >WinMain(mainWin, Normal) >
7. Re: Moving a borderless window - Is there a way?
- Posted by Isaac Raway <isaac-topica at blueapples.org> Jan 24, 2004
- 642 views
Elliott Sales de Andrade wrote: > > Only thing is, you should use setHandler(). > > setHandler(mainWin, w32HMouse, routine_id("mainWin_onMouse")) > > and of course change the parameters of the procedure. > I did that, and made a few changes, then submitted it to the Archive as "Drag".