[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Re: XAP VB.NET application
------=_Part_8563_18711817.1129641891997
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Stuart, I wanted to respond about the event handlers, vb.net
<http://vb.net>allows you to do it two
different ways... the hard way
(which you used)
and the easy way..
in stead of this.....
AddHandler listener.eventMessageReceived, AddressOf MessageReceived
use this..
Shared Sub MessageReceived(ByVal sender As Object, ByVal event_args
AsxAPMessageEventArgs)
Handles listener.eventMessageReceived
the only thing you would need to do different to make this work is to put
the listener variable outside the main block, so it's accessable throughout
the app
put this right in front of the main block instead of dim listener right
inside.
Private Shared WithEvents listener As xAPHeartbeatListener
Both ways should work fine though.
On 10/15/05, Stuart Booth <lists@xxxxxxx> wrote:
>
> On Sat, 15 Oct 2005 17:41:53 -0000, "rvhu2"
<rvhu2@xxxxxxx> wrote:
>
> >True but all examples except the netcall are writen in C and not
in
> >VB.net. So i'am still looking for a listener sample writen in
VB.net
>
> Try here:
>
>
> http://www.xapframework.net/modules.php?name=3DDownloads&d_op=3Dviewdownl=
oad&cid=3D8
>
> Get the "Message Listener Source (C#, VB.NET <http://vb.net/>) "
> application. It now
> includes the original C# version and a new VB.NET <http://vb.net/>flavour=
.
>
> Took me a while to figure out the differing VB.NET <http://vb.net/>syntax=
,
> particularly for event handlers which is a bit different to C#. There
> are other different keywords which I had to find an equivalent for
> too. Otherwise this appears to work and outputs all received messages
> to the console window as it's designed to do so.
>
> Think I'd best stick to C# in future though... <big grin> :)
>
> Oh, I see there's also an example by Paul Barrett on that same page,
> "HubClient Source (VB.NET <http://vb.net/>)". Might be worth
checking tha=
t
> out too in
> case I've done something incorrect.
>
> I may make a more wide ranging xFx source download that includes
> absolutely everything in full SDK style - samples, source, binaries,
> help, documentation - rather than having bits'n'bobs scattered around
> as I currently have.
>
> HTH?
>
> S
> --
> Stuart Booth <stuart@xxxxxxx>
> xAPFramework.NET - a xAP software development framework for .NET
>
> http://www.xapautomation.org/ http://www.xapframework.net/
>
> ------------------------------
> YAHOO! GROUPS LINKS
>
>
> - Visit your group "xap_automation<http://groups.yahoo.com/group/xap_a=
utomation>"
> on the web.
> - To unsubscribe from this group, send an email to:
> xap_automation-unsubscribe@xxxxxxx<xap_automation-unsubscribe@=
yahoogroups.com?subject=3DUnsubscribe>
> - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------
>
------=_Part_8563_18711817.1129641891997
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<html><body>
<div>Stuart, I wanted to respond about the event handlers, <a
href="http://vb.net">vb.net</a>
allows you to do it two different ways... the hard way (which you
used)</div>
<div> </div>
<div>and the easy way..</div>
<div> </div>
<div>in stead of this.....</div><font
color="#0000ff" size="2">
<p>AddHandler</p></font><font size="2">
listener.eventMessageReceived, </font><font
color="#0000ff"
size="2">AddressOf</font><font size="2">
MessageReceived
<p></p></font>
<div> </div>
<div>use this..</div>
<div><font color="#0000ff"
size="2"><font color="#0000ff"
size="2">
<p>Shared</p></font><font size="2">
</font><font color="#0000ff"
size="2">Sub</font><font size="2">
MessageReceived(</font><font color="#0000ff"
size="2">ByVal</font><font size="2">
sender </font><font color="#0000ff"
size="2">
As</font><font size="2"> </font><font
color="#0000ff" size="2">Object</font><font
size="2">, </font><font color="#0000ff"
size="2">ByVal</font><font size="2">
event_args </font><font color="#0000ff"
size="2">As</font><font size="2">
xAPMessageEventArgs) </font><font color="#0000ff"
size="2">Handles</font><font size="2">
listener.eventMessageReceived
<p></p></font></font>the only thing you would need
to do different to make this work is to put the listener variable outside
the main block, so it's accessable throughout the app
<p>put this right in front of the main block instead of dim listener
right inside.</p><font color="#0000ff"
size="2">
<p>Private</p></font><font size="2">
</font><font color="#0000ff"
size="2">Shared</font><font size="2">
</font><font color="#0000ff"
size="2">WithEvents</font><font
size="2"> listener </font><font
color="#0000ff" size="2">
As</font><font size="2">
xAPHeartbeatListener</font>
<p><font size="2">Both ways should work fine
though.</font></p>
<p><br> </p></div>
<div><span class="gmail_quote">On 10/15/05, <b
class="gmail_sendername">Stuart Booth</b> <<a
href="mailto:lists@xxxxxxx">lists@xxxxxxx</a>>
wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex;
MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px
solid"><tt><span class="q">On Sat, 15 Oct
2005 17:41:53 -0000, "rvhu2" <<a
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:rvhu2@xxxxxxx"
target="_blank">
rvhu2@xxxxxxx</a>> wrote:<br><br>>True but
all examples except the netcall are writen in C and not in
<br>>VB.net. So i'am still looking for a listener sample
writen in VB.net<br><br></span>Try
here:<br><br><a onclick="return
top.js.OpenExtLink(window,event,this)" href="http://www.xapframework.net/modules.php?name=Downloads&d_op=viewdownload&cid=8"
target="_blank">
http://www.xapframework.net/modules.php?name=Downloads&d_op=viewdownload&cid=8</a><br><br>Get
the "Message Listener Source (C#, <a onclick="return
top.js.OpenExtLink(window,event,this)" href="http://vb.net/"
target="_blank">
VB.NET</a>) " application. It now<br>includes the
original C# version and a new <a onclick="return
top.js.OpenExtLink(window,event,this)" href="http://vb.net/"
target="_blank">VB.NET</a>
flavour.<br><br>Took me a while to figure out the differing
<a onclick="return top.js.OpenExtLink(window,event,this)"
href="http://vb.net/"
target="_blank">VB.NET</a> syntax,<br>particularly
for event handlers which is a bit different to C#. There<br>are other
different keywords which I had to find an equivalent for
<br>too. Otherwise this appears to work and outputs all received
messages<br>to the console window as it's designed to do
so.<br><br>Think I'd best stick to C# in future though...
<big grin> :)<br><br>Oh, I see there's also an
example by Paul Barrett on that same page,
<br>"HubClient Source (<a onclick="return
top.js.OpenExtLink(window,event,this)" href="http://vb.net/"
target="_blank">VB.NET</a>)". Might be worth
checking that out too in<br>case I've done something incorrect.
<br><br>I may make a more wide ranging xFx source download that
includes<br>absolutely everything in full SDK style - samples,
source, binaries,<br>help, documentation - rather than having
bits'n'bobs scattered around<br>
as I currently have.<br><br>HTH?<span
class="q"><br><br>S<br>-- <br>Stuart
Booth <<a onclick="return
top.js.OpenExtLink(window,event,this)" href="mailto:stuart@xxxxxxx"
target="_blank">stuart@xxxxxxx</a>
><br></span><span
class="q">xAPFramework.NET - a xAP software development
framework for .NET<br><br><a onclick="return
top.js.OpenExtLink(window,event,this)" href="http://www.xapautomation.org/"
target="_blank">http://www.xapautomation.org/
</a>
<a onclick="return top.js.OpenExtLink(window,event,this)"
href="http://www.xapframework.net/"
target="_blank">http://www.xapframework.net/</a><br></span></tt><br>
<div><span class="e"
id="q_106f6604254aaa7f_6">
<div style="WIDTH: 500px; COLOR: #909090; TEXT-ALIGN:
center">
<hr style="WIDTH: 500px; BORDER-BOTTOM: 1px; TEXT-ALIGN:
left">
<tt>YAHOO! GROUPS LINKS</tt> </div><br>
<ul><tt>
<li type="square"> Visit your group
"<a onclick="return
top.js.OpenExtLink(window,event,this)" href="http://groups.yahoo.com/group/xap_automation"
target="_blank">xap_automation</a>" on the
web.<br> </li></tt><tt>
<li type="square"> To unsubscribe from this group,
send an email to:<br> <a onclick="return
top.js.OpenExtLink(window,event,this)" href="mailto:xap_automation-unsubscribe@xxxxxxx?subject=Unsubscribe"
target="_blank">
xap_automation-unsubscribe@xxxxxxx</a><br> </li></tt><tt>
<li type="square"> Your use of Yahoo! Groups is
subject to the <a onclick="return
top.js.OpenExtLink(window,event,this)" href="http://docs.yahoo.com/info/terms/"
target="_blank">Yahoo! Terms of
Service</a>.</li></tt></ul>
<br>
<div style="WIDTH: 500px; COLOR: #909090; TEXT-ALIGN:
center">
<hr style="WIDTH: 500px; BORDER-BOTTOM: 1px; TEXT-ALIGN:
left">
</div></span></div></blockquote></div><br>
<!-- **begin egp html banner** -->
<br>
<div style="text-align:center; color:#909090;
width:500px;">
<hr style="border-bottom:1px; width:500px;
text-align:left;">
<tt>YAHOO! GROUPS LINKS</tt>
</div>
<br>
<ul>
<tt><li type=square> Visit your group "<a
href="http://groups.yahoo.com/group/xap_automation">xap_automation</a>"
on the web.<br> </tt>
<tt><li type=square> To unsubscribe from this group,
send an email to:<br> <a href="mailto:xap_automation-unsubscribe@xxxxxxx?subject=Unsubscribe">xap_automation-unsubscribe@xxxxxxx</a><br> </tt>
<tt><li type=square> Your use of Yahoo! Groups is
subject to the <a href="http://docs.yahoo.com/info/terms/">Yahoo!
Terms of Service</a>.</tt>
</ul>
<br>
<div style="text-align:center; color:#909090;
width:500px;">
<hr style="border-bottom:1px; width:500px;
text-align:left;">
</div>
</br>
<!-- **end egp html banner** -->
</body></html>
------=_Part_8563_18711817.1129641891997--
xAP_Automation Main Index |
xAP_Automation Thread Index |
xAP_Automation Home |
Archives Home
|