|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
taskbar iconhow do you add a icon to the task bar and when clicked on trigger a
event this is the program im making " Set WMP = CreateObject("WMPlayer.OCX.7" ) ' vbscript Set CDROMs = WMP.cdromCollection If CDROMs.Count >= 1 Then For i = 0 to CDROMs.Count - 1 CDROMs.Item(i).Eject Next End If " it ejects the cdrom drive i need to have a icon on the taskbar to trigger the event for this and can you get vbscript in to vb.net code thank you in advance Are you talking System Tray or Taskbar? I think you are talking about System
Tray If you mean Taskbar then you can use the IsIconic property to check to see if the program is minimised in Form_Resize() If you are talking about about system tray then that makes more sense for what you want to do Add a Notifyicon to your application with a Context Menu You will need to look into the WMP SDK for some info you require, but for ejecting the CD-ROM is just simple API. See below: Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Int32, ByVal hwndCallback As Int32) As Int32 Open CD Drive: mciSendString("set CDAudio door open", vbNull, 127, 0) Close CD Drive: mciSendString("set CDAudio door closed", vbNull, 127, 0) I hope this helps Crouchie1998 BA (HONS) MCP MCSE
Problem to write a good serie of bytes in a file.
Printing using margins Subclassed Textbox OnLeave Overrides Additional information: Cast from string "" to type 'Double' is not valid. error Visual Basic 2005 PostMessage ComboBox Report writers for VB.NET Variable declarations.... in VB.Net IIS Making Bitmaps and Graphics objects - two ways |
|||||||||||||||||||||||