msginfo on network

msginfo on network

Postby patili » Sun Apr 02, 2006 7:07 pm

Hi Fivewin experts
I need to send a message and a beep to an network user, which will open on his screen
ex: msginfo( "Your next rendezvous is arrived")
How can i make that?
Thanks for your help
User avatar
patili
 
Posts: 98
Joined: Mon Jan 23, 2006 9:34 am
Location: LE CREUSOT FRANCE

Postby Antonio Linares » Sun Apr 02, 2006 10:26 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42127
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Mdandrea » Mon Apr 03, 2006 2:53 am

Here is a working simple sample of how to net send.

Code: Select all  Expand view  RUN
#include "Fivewin.ch"

static odlg
FUNCTION MAIN()
  LOCAL msg := SPACE( 20 )
  LOCAL muser := SPACE( 20 )


    DEFINE DIALOG oDlg

    @ 1, 1 GET msg OF oDlg

    @ 2, 1 GET muser OF oDlg

    @ 4, 5  BUTTON "&Ok" ACTION sendnetmsg(msg,muser)
    @ 4, 15 BUTTON "&Close" ACTION oDlg:End() CANCEL

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL

function sendnetmsg(msg,muser)
local U_ser

if empty(alltrim(msg))
  return(NIL)
endif


if empty(alltrim(muser))
  U_ser:= "*"
else
  u_ser:= muser
endif

Shellexecute(gethwnd32(odlg:hwnd),"open","Net.exe", " Send " + u_ser + " " + MSG,,,0)


return(NIL)
Mdandrea
 
Posts: 21
Joined: Wed Nov 23, 2005 12:24 am

Postby patili » Mon Apr 03, 2006 8:12 am

Thanks U2

Antonio i've test the net send on my lan under XP Pro and it work fine but i am not sure that my secretary will be able to use a Dos box correctly

Mdandrea, i use FW 21 and this function "Shellexecute" seems to exist in it.
When i test it with your exemple i have no compiler or linker error only runtime error " Variable does not exist", but i have no documentation about it in my NG
The Ng guide attached to FW 2.1 is about FW 1.95 and nothing about Shellexecute and his parameters
Can you explain it for me.
User avatar
patili
 
Posts: 98
Joined: Mon Jan 23, 2006 9:34 am
Location: LE CREUSOT FRANCE

Postby tnhoe » Mon Apr 03, 2006 10:17 am

you can do it this way :-

1. save your text into a field in dbf

2. ACTIVATE WINDOWS ON INIT fTimer()

3. in fTimer() : set a timer to read/display the field when text not blank
Regards

Hoe, email: easywin3@yahoo.com
User avatar
tnhoe
 
Posts: 83
Joined: Tue Nov 08, 2005 11:09 am
Location: Malaysia

Postby patili » Mon Apr 03, 2006 10:35 pm

Hi
with your help i have found something that work great:

Winexec( "net send User Msg")
User avatar
patili
 
Posts: 98
Joined: Mon Jan 23, 2006 9:34 am
Location: LE CREUSOT FRANCE

Postby Mdandrea » Mon Apr 03, 2006 11:18 pm

Glad to hear you got it working , winexec and shellexecute are very similar in what they do.
Mdandrea
 
Posts: 21
Joined: Wed Nov 23, 2005 12:24 am


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 11 guests