SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-13-2004, 01:14 PM
Jack_PVR Jack_PVR is offline
Sage User
 
Join Date: May 2004
Posts: 58
Visual Basic and Sage: Send Message Help

I'm trying to use VB 6 to control SAgeTV via SendMessage, just not working, any suggestions?

The popup box returns the correct handle but the message (info) is not sent...

'In a module
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( ByVal lpClassName As Any, ByVal lpWindowName As Any) As Long


'In the form button click code

Private Sub Command1_Click()
MsgBox FindWindow("SageApp", "SageWin")
Call SendMessage(FindWindow("SageApp", "SageWin"), 1258, 24, 24)
End Sub

Last edited by Jack_PVR; 05-13-2004 at 01:17 PM.
Reply With Quote
  #2  
Old 05-13-2004, 02:40 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
I am a C/C++ programmer, so I may have no idea what I'm talking about here. Now that you were forewarned... is lParam being sent correctly? It is declared differently than the other parameters in SendMessage's "Public Declare Function" line.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #3  
Old 05-13-2004, 02:49 PM
falchulk falchulk is offline
Sage Icon
 
Join Date: Sep 2003
Posts: 1,150
FYI, instead of sendmessage you can now use command line parameters to do the exact same thing. I assume you are creating your own frontend? If not, would you mind telling us what you are working on? Sorry, just nosy.
Reply With Quote
  #4  
Old 05-13-2004, 02:55 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally posted by falchulk
FYI, instead of sendmessage you can now use command line parameters to do the exact same thing.
Yes, but running "SageTV.exe -event #" is much slower than sending the messgae yourself, or running a much smaller program to do the same thing -- so there is still an advantage to doing it yourself.

Edit: This is true on my slow system; your results may vary.

- Andy
Reply With Quote
  #5  
Old 05-13-2004, 03:34 PM
falchulk falchulk is offline
Sage Icon
 
Join Date: Sep 2003
Posts: 1,150
True Opus4 but I am lazy!
Reply With Quote
  #6  
Old 05-13-2004, 05:29 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
OK then -- go download the recent general purpose SendMessage.exe I uploaded & you won't need to do it yourself.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #7  
Old 05-13-2004, 06:10 PM
Jack_PVR Jack_PVR is offline
Sage User
 
Join Date: May 2004
Posts: 58
Thanks guys for the suggestions...

Figured it out, I needed to pass the lParam ByVal.
Reply With Quote
  #8  
Old 10-09-2006, 06:41 PM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
Sendmessage with VB or command line

I would like to use sendmessage to play an mpeg file with a command line or VB6. Does anyone have a short example how a mpeg file could be played with sendmessage?

Dave
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:11 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.