Hello,
I want information about how can I place my application always on desktop.The best example for this is vista sidebar.Please Help me in doing this.
I tried to override wndproc method but im not understanding how to reach it..
Thanks in advance
10 13372
Hi dmnreddy!
Did you found any solution for this issue?
I need exactly the same.
Checkout the SHAppBarMessage Windows API function here
There is also a Visual Basic implementation here
Regards,
Alex.
Checkout the SHAppBarMessage Windows API function here
There is also a Visual Basic implementation here
Regards,
Alex.
Hello Alex,
Thank you for the response, but is not exactly I'm looking for.
This API function makes my form as TaskBar - it reduces the desktop area.
I need to create a form that appears on desktop even if a user minimize all windows (show desktop, minimize all, etc.).
Actually, I'm looking for non mimimizable form.
Hello Alex,
Thank you for the response, but is not exactly I'm looking for.
This API function makes my form as TaskBar - it reduces the desktop area.
I need to create a form that appears on desktop even if a user minimize all windows (show desktop, minimize all, etc.).
Actually, I'm looking for non mimimizable form.
Oh, I do not think that's possible in a direct way, the show desktop command is sure to try minimizing your window all the time. A work around would be to detect when the window is about to or gets minimized and get it back immidiatelly or discard the minimize message. If you want you could try subclassing it's winproc function.
Regards,
Alex.
You could also try to handle the SizeChanged event. Then, test if the form's WindowState is equal to FormWindowState.Minimized. If so, set the WindowState = FormWindowState.Normal
The only issue is you will see a bit of a flicker.
EDIT:
This still won't stop the Show Desktop command. But even the Vista Sidebar is minimized when you Show Desktop
You could also try to handle the SizeChanged event. Then, test if the form's WindowState is equal to FormWindowState.Minimized. If so, set the WindowState = FormWindowState.Normal
This is almost what I need, but in this case my form stay always visible over another windows, that is to say "always on top" window
This is almost what I need, but in this case my form stay always visible over another windows, that is to say "always on top" window
What about the this.SendToBack() method? You can implement a timer for it too?
joedeene
Hello
I think i got it.
Imports System
Imports System.Windows.Forms
Imports System.Runtime.InteropServices
Imports System.Text
Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
_timer.Interval = 1000
_timer.Start()
' Add the CheckTcpListner method as the handler for _Timer Tick events
AddHandler _timer.Tick, AddressOf CheckTcpListener
End Sub
Private Sub CheckTcpListener(ByVal sender As Object, ByVal e As System.EventArgs)
Me.TopMost = False
Dim chars As Integer = 256
Dim buff As New StringBuilder(chars)
' Obtain the handle of the active window.
Dim handle As IntPtr = GetForegroundWindow()
' Update the controls.
If GetWindowText(handle, buff, chars) > 0 Then
'Console.WriteLine(buff.ToString())
'Console.WriteLine(handle.ToString())
Me.TopMost = False
Else
Me.Activate()
Me.Visible = true
End If
End Sub
<DllImport("user32.dll")> _
Private Shared Function GetForegroundWindow() As IntPtr
End Function
<DllImport("user32.dll")> _
Private Shared Function GetWindowText(ByVal hWnd As IntPtr, ByVal text As StringBuilder, ByVal count As Integer) As Integer
End Function
Well i noticed that the application wasnt always visible for som reason.
So i added a button and made it visible = false and then changed the code below to
The code is now:
Else
Me.Activate()
Me.Visible = true
ToolStripButton3_Click_1(Nothing, Nothing)
End If
Also decreased the timer so one want see the switching beween application and desktop.
There is a program (the only one i found) that makes this happen in a really smooth manner. It is a sticky notes utility and you can find it here: http://bradcoweb.com/tim/programs.html. I don't know, however, how he does it. It is for sure, though, that it is a win32 application not a .net one.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: WebRod |
last post by:
Hi,
i use Net_POP3 from PEAR to get emails.
I realized today that the UIDL associated to an email is not always the
same!!
That's terrible.
I really need to find a way to download only NEW...
|
by: bradwiseathome |
last post by:
I have this in my <head> tag:
<script type="text/javascript">
function overlay() {
document.getElementById("divoverlay").style.visibility = "visible";
}
</script>
And this in my <body>:
|
by: David N |
last post by:
Hi All,
I just wonder if in C#, I can develop a user defined control that can call
its parent function which is not yet developed. For example, how do I make
my user control call a...
|
by: JavaConvert |
last post by:
I would like to create form that simply hold textboxes that I log info to during the execution of a single-thread application. In Java, I found JFrame ideal for the task, but I can't recreate the...
|
by: ad |
last post by:
I use the codes below to clear the cookie:
HttpCookie myCookie = new HttpCookie("us_id");
myCookie.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(myCookie);
It do well when the...
|
by: kjheaney |
last post by:
Hi, Im new to all this and i have bluffed my through to designing a few websites, but i now have a problem with a form .
I am using Matt Wrights formmail.pl, and i have used dreamweaver to build a...
|
by: active |
last post by:
At the statement:
FormEdit.ShowDialog()
I get the following:
Form that is not a top-level form cannot be displayed as a modal dialog box.
Remove the form from any parent form before...
|
by: Max58kl |
last post by:
Hi
I am trying to setup a form that automatically sends the form values
via email to a specific address.
I have uploaded the script, which when I run loads a page with the following
error...
|
by: vidishasharma |
last post by:
Hi,
I have a windows from with few controls over it. Now I have to see if
the cursor goes outside the bounds of the windows form then I have to
close the form.
I added mouse leave for the...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |