Astrologic
Astrologic
CC#
Created by Astrologic on 12/13/2024 in #help
MAUI: scrollviewer's child focused.
I've tried nearly everything I could think of to get rid of this undesired behavior. I have an "AbsoluteLayout" element inside of a "ScrollView" element.
I have a "Tap_event" attached to the AbsoluteLayout, and so I need to interact with it. However, I want the panning of the ScrollView to be handled in the code behind ONLY. I don't want any manual panning. No clicks, drags, swipes, scrollbars, etc. I managed to get rid of most of the default panning, but whenever I click on the AbsoluteLayout, it seemingly gets focused by the scrollview, which then automatically scrolls to it. I have tried to get rid of the behavior but to no avail. Please help me. Thank you.
1 replies
CC#
Created by Astrologic on 2/17/2023 in #help
❔ ✅ Help getting remote launch to perform task (display off)
I've got an application that just turns off a monitor, nothing super complicated about it:
internal class Program
{
[DllImport("kernel32.dll")]
static extern IntPtr GetConsoleWindow();

[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);



private static int WM_SYSCOMMAND = 0x0112;
private static uint SC_MONITORPOWER = 0xF170;

public static void Main(string[] args)
{
SendMessage(GetConsoleWindow(), WM_SYSCOMMAND, (IntPtr)SC_MONITORPOWER, (IntPtr)(2));
}
}
internal class Program
{
[DllImport("kernel32.dll")]
static extern IntPtr GetConsoleWindow();

[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);



private static int WM_SYSCOMMAND = 0x0112;
private static uint SC_MONITORPOWER = 0xF170;

public static void Main(string[] args)
{
SendMessage(GetConsoleWindow(), WM_SYSCOMMAND, (IntPtr)SC_MONITORPOWER, (IntPtr)(2));
}
}
The problem is that this application exists on a laptop which is all but dead. The keyboard barely works and if I press too hard the wifi will stop working until restart, the trackpad doesn't work, the usbs don't work, the power button barely works. I can remote into the system using SSH, but when I run the application using either start process.exe, psexec -i -d -u user -p "pass" "process.exe", or runas /user:user process.exe, it simply doesn't work. It'll tell me things like that the process has been created, but it won't turn the monitor off as it's supposed to. If I slam on the keyboard enough to run the app manually, it'll turn off the display, but that causes the wifi to stop working, so I'd really like to know how I can make the application run even when remotely executed using SSH.
21 replies