It is currently Sat May 25, 2013 8:44 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: ToolbarWindow32 open trayed window
PostPosted: Mon Jun 18, 2012 3:14 am 
Offline
User
User
User avatar

Joined: Sat Sep 12, 2009 3:06 pm
Posts: 51
How would you go about opening a certain trayed application?

_________________
Edward B. Howington
http://www.triplexcorp.com


Top
 Profile  
 
 Post subject: Re: ToolbarWindow32 open trayed window
PostPosted: Mon Jun 18, 2012 3:58 am 
Offline
Addict
Addict

Joined: Wed Aug 24, 2005 8:39 am
Posts: 2559
Location: Southwest OH - USA
So it's running but has an icon in the tray area?

Like open with a rightclick menu or via clicking on the icon or via a hotkey or when another instance is attempted to open or ???


Top
 Profile  
 
 Post subject: Re: ToolbarWindow32 open trayed window
PostPosted: Mon Jun 18, 2012 4:12 am 
Offline
User
User
User avatar

Joined: Sat Sep 12, 2009 3:06 pm
Posts: 51
like to open via command of the control for ToolbarWindow32 first by locating the text of the command then sending the command to show that window.

_________________
Edward B. Howington
http://www.triplexcorp.com


Top
 Profile  
 
 Post subject: Re: ToolbarWindow32 open trayed window
PostPosted: Mon Jun 18, 2012 7:14 pm 
Offline
Addict
Addict

Joined: Sun Apr 12, 2009 6:27 am
Posts: 1475
Code:
If OpenWindow(0, 100, 200, 195, 260, "ToolBar example", #PB_Window_SystemMenu | #PB_Window_SizeGadget)

  If CreateToolBar(0, WindowID(0))
    ToolBarStandardButton(0, #PB_ToolBarIcon_New)
    ToolBarStandardButton(1, #PB_ToolBarIcon_Open)
    ToolBarStandardButton(2, #PB_ToolBarIcon_Save)
   
    ToolBarSeparator()

    ToolBarStandardButton(3, #PB_ToolBarIcon_Print)
    ToolBarToolTip(0, 3, "Print")
   
    ToolBarStandardButton(4, #PB_ToolBarIcon_Find)
    ToolBarToolTip(0, 4, "Find a document")
   
    ToolBarSeparator()
   
  EndIf


  If CreateMenu(0, WindowID(0))
    MenuTitle("Project")
      MenuItem(0, "New")
      MenuItem(1, "Open")
      MenuItem(2, "Save")
  EndIf
 

  DisableToolBarButton(0, 2, 1)

  ButtonGadget(1,10,200,60,24,"TEST")
 
  GetWindowRect_(WindowID(0),w.RECT) 
  Repeat
    Event = WaitWindowEvent()

    Select Event
   
      Case #PB_Event_Menu
         Select EventMenu()
            Case 0
           
            Case 1
                Pattern$ = "Text (*.txt)|*.txt;*.bat|PureBasic (*.pb)|*.pb|All files (*.*)|*.*"
                Pattern = 0
                File$ = OpenFileRequester("Please choose file to load", StandardFile$, Pattern$, Pattern)
           
            Case 2
           
         EndSelect

     
      Case #PB_Event_CloseWindow
        Quit = 1
       
      Case #PB_Event_Gadget
          Select EventGadget()
           Case 1
              SendMessage_(ToolBarID(0), #TB_GETRECT , 1, r.RECT)               ;Hit Button Index 1
              SetCursorPos_((w\left + r\left + 15),(w\top + r\top+60))
              mouse_event_(#MOUSEEVENTF_LEFTDOWN,0,0,0,0)
              mouse_event_(#MOUSEEVENTF_LEFTUP,0,0,0,0)
                       
          EndSelect
       
       
       
    EndSelect

  Until Quit = 1
 
EndIf

End

_________________
Egypt my love


Top
 Profile  
 
 Post subject: Re: ToolbarWindow32 open trayed window
PostPosted: Mon Jun 18, 2012 11:14 pm 
Offline
User
User
User avatar

Joined: Sat Sep 12, 2009 3:06 pm
Posts: 51
keep in mind this application im wanting to open is not written by me or in purbasic im using autoit etc

_________________
Edward B. Howington
http://www.triplexcorp.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Num3 and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye