I have a program which when you press a button it minimises to a notifyicon in the system tray then you right click to bring up a contextmenu which allows it to be maximised again. What I want to do is add a shortcut, ctrl+shift+P for example so when that's pressed the program maximises again. But at the moment the only shortcut I can get to work involves right clicking the notifyicon before it works?
Decided to move from VB6 to VB 2005.Net.I want my form (remember these are early steps) to maximize into the top 10% of the screen.remember am a VB3,4,6 developer for the last 17 years, old habbits die hard
how can i get contextmenu information from my system tray programs? i have the process handle + the notifyicon handle, but GetMenu doesn't find the contextmenu
vb Public Declare Function GetMenu Lib "user32" Alias "GetMenu" _ (ByVal hwnd As Integer) As Integer
I've create a VB2008 app that upon clicking the applications Start button it creates an icon in the taskbar that is visible to the user upon creation, it also shows a balloon tip at the time of creation. This all works great when the program starts but once the balloon tip timeout value has elaped, the icon, in Windows 7, disappears from the visible portion of the taskbar and becomes hidden, which is only visible if the user shows the hidden icons.
My question is this...... In the VB2008 program is there any way to set the behavior of the icon so that it remains visible on the taskbar instead of allowing the icon to become hidden?
The original design of the program was to get an environmental variable, display the value of that variable in the balloontip, hide the form and then check every 10 minutes for a change in that environmental variable. Once the form was hidden the user could see that the program was running by the presence of the icon in the taskbar and if they hovered over the icon it would display the current value of the external variable. Also if the user wanted to return the form to it's full size all they had to do was click on the taskbar icon. With Windows 7 if I hide the form and the icon is not visible in the taskbar because it too is also hiddem this may create a problem for the user as they may not even be aware that Windows 7 hides the icon. So....Is there anyway to insure that the icon remains in the Windows 7 taskbar or is this a case where I need to re-evaluate my program design?
I'm trying to extract the icon from a shortcut (lnk file), but I end up with the shortcut symbol in the lower-left hand corner of the image. How can I extract a shortcut's icon without this symbol?
Here's the code I'm using:
Dim ico As System.Drawing.Icon = System.Drawing.Icon.ExtractAssociatedIcon("C:shortcut.lnk")
Iv'e got a label with the text property set to "Na&me" so Alt M should be set to do something when pressed, I want the focus to got into the NameTxt box?
how can I create Global short key that can be executed in my whole project while my program is running and no matter what kind of control that I'm focused,such as by pressing 'F1'... or Alt, CTRL SHIFT combination shortcut,.A shortcut key that can open and close forms and execute desired function.Also a shortcut that is only specific in one form, and cannot be execute if that form is not in focus or in use.[code]
I am trying to create a shortuct key that when you press alt-enter together it will make the media player control full screen. I tried adding the following code to the onkeypress event of the media player control but it didn't work. How can you make shortcut keys?
If e.nKeyAscii = Keys.Alt And e.nKeyAscii = Keys.Enter Then mediaPlayer.fullScreen = True End If
I'm developing a relatively quick-and-dirty approach to copying some files over. The situation is that I have a point on the network where a master directory is located. This directory includes the official directory structure as well as all official files. The user's local machine should have a place in their C:Program Files directory that has the exact same directory structure.
If it doesn't, the application should create it and copy files over based on the network master. If the user's local machine does have the appropriate folders in place, then any newer files found in the network master directory should be copied over to update the user's local files. It seems to me that this would require knowledge of the root directories up to the point of the network master and the same for the local directory.
At first glance, this looks to be a bit more complicated to accomplish than I was thinking it should be. Are there any shortcuts to using say the Directory/DirectoryInfo, File/FileInfo classes, etc that would allow this to be accomplished? I'm trying not to overcomplicate it as I need to get something out pretty quick. But the answer just doesn't seem to be showing itself.
This code is allowing me to drag and drop a desktop shortcut to a picturebox on my form. Then allows me to click the picturebox to launch the program.
how can i save each shortcut in each picturebox when the form closes , so next time i open my program the shortcuts saved are displayed and functional ?
Imports System.Runtime.InteropServices Public Class Form1 Private Structure SHFILEINFO
I need to capture what keys the user presses and put it in a textbox. However, I need to capture multiple combination. For instance, if the user presses (and briefly holds) SHIFT and 1 (number one) the text box should say "SHIFT + 1." I also want "real time" capturing, meaning as the user presses the keys the value changes.
How can I get all the names of the shortcuts icons in the desktop into a String? Like: Computer, Microsoft Office Word 2003, Internet Explorer....etz. I tried to use "My.Computer.FileSystem..." , but didn't find a way.
So I'm getting annoyed with this ffriend of min that keeps on asking for code off me for a VB assignemnt. Now I'd like to give him some code, but not the right code, (play a joke on him...he...he..). So thats the reason I'd like to write a infinite loop program for Internet Explorer. Would such Visual Basic program be possible?
I'm not going to write anything epic, but probably just the event handler to a button that keeps uploading internet explorer on a infinite loop after clicking. I know morally, this is wrong. I would rather be an ass than a lazy bastard.
I'm trying to build an application that when I press a keyboard shortcut, say CTRL + ~, if the window is minimized to the system tray it is displayed.
I have seen a few programs do this and have always wondered how to do this, but haven't had the opportunity to do learn it until now and I really don't know if its something simple or complex.
The program goes and "Hides" itself as the very last step (InitializeNotifyIcon - does a close which triggers the Form1_FormClosing), but for some reason it shows back up right after it hides iteslf.Here is my code:
Public Class Form1 Private contextMenu1 As System.Windows.Forms.ContextMenu Friend WithEvents menuItem As System.Windows.Forms.MenuItem
how do i change the notifyicon during runtimeif i have series of icons in the application resource, how do i refer to a particular icon in the resources from my codeif the application icon is made of different combination of icon, how do i specify the icon i want to use in th ni=otifyicon, somthing like notifyicon.icon = me.icon,index, where index is the index of the icon in the compiled ico file
I don't want my application's main form to be displayed when it opens; I just want the notifyicon control in it to show in the taskbar.This is the code I have been using:
Module: Code: Module mdlStartup Public Sub Main()
[Code]...
The NotifyIcon control is in my frmMain. However, when I run my program I get mulitple instances of the Notify Icon being displayed. I even get two frmMains getting launched if I try clicking the other tray icon that has been made. I'm guessing this has to do with the New instance.If that's the problem, is there a way I can move the notifyicon control to some completely separate class?
I'm currently coding a multi-form project that requires a NotifyIcon. The first form is the Login form which then opens a 'logging-in' form and then finally another form (they're all opened using FormName.ShowDialog() and they hide themself before opening the next form).Login Form -> Logging In Form -> Final Form.When the final form is opened, the NotifyIcon's visible property is set to true and it appears in the tasktray like normal. But when I use Me.Hide on the final form, the NotifyIcon disappears with the form.Any ideas about what is going on? The program still runs in the background despite no forms are visible (which is how it's intended to be) but without a NotifyIcon, there's no way of making the forms appear again.