Click here to Skip to main content
15,889,335 members
Home / Discussions / C#
   

C#

 
GeneralRe: fonts are Changing alone in a strange way - Windows CE , i update my first question Pin
goldsoft22-Sep-15 4:15
goldsoft22-Sep-15 4:15 
GeneralRe: fonts are Changing alone in a strange way - Windows CE , i update my first question Pin
OriginalGriff22-Sep-15 4:24
mveOriginalGriff22-Sep-15 4:24 
AnswerRe: fonts are Changing alone in a strange way - Windows CE , i update my first question Pin
Pete O'Hanlon22-Sep-15 4:49
mvePete O'Hanlon22-Sep-15 4:49 
QuestionHow to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr22-Sep-15 1:06
Benjamin.Buhr22-Sep-15 1:06 
AnswerRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen22-Sep-15 1:15
professionalEddy Vluggen22-Sep-15 1:15 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr22-Sep-15 1:36
Benjamin.Buhr22-Sep-15 1:36 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen22-Sep-15 2:12
professionalEddy Vluggen22-Sep-15 2:12 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr24-Sep-15 1:09
Benjamin.Buhr24-Sep-15 1:09 
Tried UiAccess-methode seperate times => doesn't work Frown | :(

So I tried this:
Keep my application on top[^]

It is now implemented in the App.xaml.cs this way:
C#
namespace Technewlogic.Samples.WpfModalDialog
{	
	/// <summary>
	/// Interaction logic for App.xaml
	/// </summary>
	public partial class App : Application
	{
        public bool TopMost { get; private set; }
        // couldn't find a .NET-way to bring the window
        // to top, reverting to old Win32 functions...
        [System.Runtime.InteropServices.DllImport("User32.dll", CharSet = CharSet.Unicode)]
        public static extern Int32 FindWindow(String lpClassName, String lpWindowName);
        [System.Runtime.InteropServices.DllImport("User32.dll", CharSet = CharSet.Unicode)]
        public static extern Int32 SetForegroundWindow(int hWnd);
        
        private void triMain_Click(object sender, System.EventArgs e)
        {
            int hWnd = FindWindow(null, "Test"); // Win32 API, don't want to use this
            SetForegroundWindow(hWnd); // Win32 API, don't want to use this
            TopMost = true;
            Show();
        }

        private void Show()
        {
            throw new NotImplementedException();
        }
...

Is there a method to put a timer in this so the application always becomes TopMost (about every 10 seconds)?
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen24-Sep-15 1:20
professionalEddy Vluggen24-Sep-15 1:20 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr24-Sep-15 2:23
Benjamin.Buhr24-Sep-15 2:23 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen24-Sep-15 3:46
professionalEddy Vluggen24-Sep-15 3:46 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr25-Sep-15 0:08
Benjamin.Buhr25-Sep-15 0:08 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr28-Sep-15 1:39
Benjamin.Buhr28-Sep-15 1:39 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen28-Sep-15 5:38
professionalEddy Vluggen28-Sep-15 5:38 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr28-Sep-15 22:49
Benjamin.Buhr28-Sep-15 22:49 
QuestionRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen29-Sep-15 1:25
professionalEddy Vluggen29-Sep-15 1:25 
AnswerRe: How to remain WPF Window always on top of all windows? Pin
Benjamin.Buhr14-Oct-15 0:37
Benjamin.Buhr14-Oct-15 0:37 
GeneralRe: How to remain WPF Window always on top of all windows? Pin
Eddy Vluggen15-Oct-15 4:38
professionalEddy Vluggen15-Oct-15 4:38 
QuestionMemory leak deterioration in performance in working with weight in rs232 Win-CE Pin
goldsoft21-Sep-15 21:20
goldsoft21-Sep-15 21:20 
AnswerRe: Memory leak deterioration in performance in working with weight in rs232 Win-CE Pin
OriginalGriff21-Sep-15 21:40
mveOriginalGriff21-Sep-15 21:40 
GeneralRe: Memory leak deterioration in performance in working with weight in rs232 Win-CE Pin
goldsoft21-Sep-15 23:04
goldsoft21-Sep-15 23:04 
GeneralRe: Memory leak deterioration in performance in working with weight in rs232 Win-CE Pin
Pete O'Hanlon21-Sep-15 23:08
mvePete O'Hanlon21-Sep-15 23:08 
GeneralRe: Memory leak deterioration in performance in working with weight in rs232 Win-CE Pin
OriginalGriff21-Sep-15 23:30
mveOriginalGriff21-Sep-15 23:30 
GeneralRe: Memory leak deterioration in performance in working with weight in rs232 Win-CE Pin
goldsoft23-Sep-15 22:28
goldsoft23-Sep-15 22:28 
GeneralRe: Memory leak deterioration in performance in working with weight in rs232 Win-CE Pin
OriginalGriff23-Sep-15 22:37
mveOriginalGriff23-Sep-15 22:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.