Click here to Skip to main content
15,906,626 members

Comments by badrelmers (Top 8 by date)

badrelmers 5-Sep-23 3:57am View    
good
badrelmers 4-Sep-23 4:27am View    
@merano, thank you, yes now it compiles fine after doing what you told me. but nothing happens when I run it, I don t know where is the problem.

@merano @Richard SetWindowPos does not change the taskbar position, it works with the self created appbars but not with the default windows taskbar, so the taskbar_resize.exe is not meant to change the taskbar position at all. to change the taskbar position I use another method but it uses autohotkey, I don t have a C code:
met1:
WinExist("ahk_class Shell_TrayWnd")
SendMessage,0x0231
;WinMove 1866, 0, 58, 1080 ; right
;WinMove -1866, 0, 58, 1080 ; left
;WinMove 1866, 1866 ; bottom
WinMove -1866, -1866 ; top
SendMessage,0x0232


met2: better
;https://github.com/gerdami/AutoHotkey/blob/master/TaskbarMove.ahk
;
; AutoHotkey Version: 1.0.48.5
/*
** TaskbarMove.ahk - Move the taskbar (startbar) around the screen with Hotkeys
**
**   Updated: Sat, Nov 19, 2011 --- 11/19/11, 4:19:19pm EST
**  Keywords: move taskbar, move startbar, move task bar, move start bar
**  Location: r.secsrv.net/AutoHotkey/Scripts/TaskbarMove
**
**    Author: JSLover - r.secsrv.net/JSLover - r.secsrv.net/JSLoverAHK
**		 Web: http://jslover.secsrv.net/AutoHotkey/Scripts/TaskbarMove.ahk
*/

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


#SingleInstance force

; TaskbarMove("Top")
; TaskbarMove("Bottom")
TaskbarMove("Left")
; TaskbarMove("Right")


TaskbarMove(p_pos) {
	label:="TaskbarMove_" p_pos

	WinExist("ahk_class Shell_TrayWnd")
	SysGet, s, Monitor

	if (IsLabel(label)) {
		Goto, %label%
	}
	return

	TaskbarMove_Top:
	TaskbarMove_Bottom:
	WinMove(sLeft, s%p_pos%, sRight, 0)
	return

	TaskbarMove_Left:
	TaskbarMove_Right:
	WinMove(s%p_pos%, sTop, 0, sBottom)
	return
}

WinMove(p_x, p_y, p_w="", p_h="", p_hwnd="") {
	WM_ENTERSIZEMOVE:=0x0231
	WM_EXITSIZEMOVE :=0x0232

	if (p_hwnd!="") {
		WinExist("ahk_id " p_hwnd)
	}

	SendMessage, WM_ENTERSIZEMOVE
	;//Tooltip WinMove(%p_x%`, %p_y%`, %p_w%`, %p_h%)
	WinMove, , , p_x, p_y, p_w, p_h
	SendMessage, WM_EXITSIZEMOVE
}
badrelmers 3-Sep-23 11:04am View    
thank you for this excellent solution, unfortunately I could not compile it with VS 2013, i got this errors
LNK2001: unresolved external symbol _main
LNK2001: unresolved external symbol _wprintf
LNK2001: unresolved external symbol _wcstol
badrelmers 3-Sep-23 0:07am View    
I uploaded a compiled version for xp+ if someone need it, here: https://github.com/badrelmers/taskbar-resize/releases/tag/v1
badrelmers 3-Sep-23 0:06am View    
it should be reversed I don't know why, it did not work for me otherwise!