Latest WACUP public preview for x86 & x64 is build #21640 (May 11th 2025) (x86 & x64 changelogs)
Latest restricted WACUP beta release is build #21640 (May 11th 2025) (x86 & x64 changelogs)


NOTE: Beta testers are added in a limited & subjective manner as I can only support so many people as part of the beta test program to keep it useful for my needs.

Unless I think you're going to be helpful, not all requests will be accepted but might still be later on. Remember that beta testing is to help me & the limitations currently works for my needs for this project.

Author Topic: How to restore main windows to main screen?  (Read 607 times)

lgabryel

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
How to restore main windows to main screen?
« on: April 22, 2025, 06:24:14 AM »
Hi!

I'm working on laptop and time to time connecting additional 3 screens. I moved main windows of WACUP to one of three additional window and after this I disconected additional screens. Now I can't see WACUP window. In alt+space menu I can't see "move". After reboot main window is still not in main screen. After run "C:\Program Files (x86)\WACUP\wacup.exe" /RESETCLASSICSKINPOS will apear some additional windows like art album etc. but not main window.

How can I bring main window do main screen?

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 5106
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: How to restore main windows to main screen?
« Reply #1 on: April 22, 2025, 09:14:43 AM »
Need to know what skin you're actually using along with what build of wacup.

lgabryel

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: How to restore main windows to main screen?
« Reply #2 on: April 22, 2025, 01:24:48 PM »
Build version: 1.99.16.19517
Build date: Jun 27 2024
Build type: 32-bit native
Skin: Winamp Classic Modern

lgabryel

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: How to restore main windows to main screen?
« Reply #3 on: April 23, 2025, 07:39:58 AM »
Need to know what skin you're actually using along with what build of wacup.

I really need WACUP back in my laptop screen. When WACUP saving position and screen of main window? In some file, env var, registry key, app data, in some database? How can I edit this position manually, even in some hexedit? I'm also developer so please help me and tell how to change main window location manually. Thx!

Eris Lund

  • The Skin Guy, Official Modern Skin tech support
  • Beta Tester
  • Hero Member
  • *****
  • Posts: 311
    • View Profile
    • Eris Lund's Github
Re: How to restore main windows to main screen?
« Reply #4 on: April 23, 2025, 10:09:20 AM »
Check the %APPDATA%\WACUP for a studio.xnf file.
« Last Edit: April 23, 2025, 10:09:52 AM by Eris Lund »
Maker of Plugins, I suppose.
gen_native:
https://github.com/0x5066/gen_native
vis_sdl2:
https://github.com/0x5066/WinampVis
(I know, creative names)

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 5106
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: How to restore main windows to main screen?
« Reply #5 on: April 23, 2025, 01:57:15 PM »
That's an old preview build (19516) so you first need to update to the current beta preview & then check the known issues for the build to avoid other issues before messing with the studio.xnf file.

lgabryel

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: How to restore main windows to main screen?
« Reply #6 on: April 23, 2025, 03:31:24 PM »
In newest 64bit build is better but not perfect.

1 If I open WUCUP on external monitor, close when is on exteral monitor, disconected monitor, run again - then I will not see any window of WACUP - propably location is out of screen and any standard windows "move" not working... I have to connect screen again, move WACUP to main window and disconect external monitor.

2 If I open WUACUP on external monitor and disconected monitor without closing app, then main window of WACUP will appear in random location of main screen and rest of WACUP windows will appear on one edge of screen.

2 - this is ugly but we can live with it. 1 - this is blocker, becouse we need external device to bring back main windows do laptop screen.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 5106
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: How to restore main windows to main screen?
« Reply #7 on: April 23, 2025, 04:11:45 PM »
If you're using the x64 build then as long as WACUP is the focused program then Windows key + shift + left/right arrows should be able to move the main window on to the monitor & then when you click on the main window the other windows should snap back around it. I can't get modern skins to follow that & if I ever manage to make my own modern skin engine plug-in then it's something I've got to try to code.

I've previously had things try to force windows that were off-screen back on to the main monitor & I got a load of crap for doing that & so removed any of that. Until I can come up with a solution that doesn't suck I'm not going to be having the windows try to go back on screen.

tl;dr: my code is crap & I don't have a solution that'll make you happy.

lgabryel

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: How to restore main windows to main screen?
« Reply #8 on: April 23, 2025, 09:08:15 PM »
I'm fighting with windows and screens a lot in WPF but using WinApi low level interfaces. I wrote some snipped that with success move offscreen wacup to main screen. Maybe can you add this method or adapt and add to main menu of wacup? If you will share me access to some control version I can try to help with this.

Code: [Select]
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows.Forms;

class Program
{
    [DllImport("user32.dll")]
    private static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter,
        int X, int Y, int cx, int cy, uint uFlags);

    private const uint SWP_NOZORDER = 0x0004;
    private const uint SWP_NOSIZE = 0x0001;
    private static readonly IntPtr HWND_TOP = IntPtr.Zero;

    static void Main(string[] args)
    {
        string exeName = "wacup";

        Process[] processes = Process.GetProcessesByName(exeName);
        if (processes.Length == 0)
        {
            Console.WriteLine($"Process: {exeName} not found.");
            return;
        }

        foreach (Process proc in processes)
        {
            IntPtr hWnd = proc.MainWindowHandle;

            if (hWnd == IntPtr.Zero)
            {
                Console.WriteLine("Missing main window");
                continue;
            }

            Screen primaryScreen = Screen.PrimaryScreen;
            int x = primaryScreen.WorkingArea.X;
            int y = primaryScreen.WorkingArea.Y;

            bool result = SetWindowPos(hWnd, HWND_TOP, x, y, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
            Console.WriteLine(result
                ? $"'{exeName}' window moved."
                : "Move window failed.");
        }
    }
}