Hi Buddy,

Do a search on ActiveX in the Developer's Guide. There is a section that shows 
you how to add an ActiveX control to a form.

The next thing you should do is look for sample code that shows you how to use 
the MSCOMM control. This is available in VB6 and you may look at this link 
http://www.microsoft.com/downloads/details.aspx?familyid=01efe663-e0ff-4147-aa8b-ab9549605ea2&displaylang=en.

Once you understand the VB6 code you should have a head start to do what you 
would like to do in X++. In VB6 you set a property value of the ActiveX control 
as follows:

MSCOMM.ComPort = 1

But remember that the comparable code in X++ whould be:

MSCOMM.ComPort(1);

This is important to know because it may frustrate you if you forget that X++ 
uses function calls to set and get property values of a variable in an object, 
as a result of the encapsulation of variables in the object.

Hope this gives you a kick start. One final thing, in order for you to trigger 
the value from the scale on the comport you should output an end-of-line 
character to the port. This will trigger the OnEvent method/event of the 
ActiveX control, where you should read the value.

Regards,
 
Varden Morris 

85 Saddleland Close N.E. 
Calgary, Alberta T3J 5J5 
Canada 

(403) 366-8434 (H) 
(403) 615-1604 (C)
[EMAIL PROTECTED]
 
 



----- Original Message ----
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <Axapta-Knowledge-Village@yahoogroups.com>; "[EMAIL 
PROTECTED]" <Axapta-Knowledge-Village@yahoogroups.com>
Sent: Thursday, February 8, 2007 5:29:36 PM
Subject: Re: Re: [Axapta-Knowledge-Village] How to read data from weighing 
instrument?SOS!!!

HI,Morris 
yes,i want to use MSCOM activeX to read data from the COM port, but could you 
tell me how to call MSCOM ActiveX in axapta? thank you very much. 




[EMAIL PROTECTED] 
2007-02-09 



发件人: Varden Morris 
发送时间: 2007-02-07 00:41:16 
收件人: Axapta-Knowledge- [EMAIL PROTECTED] ups.com 
抄送: 
主题: Re: [Axapta-Knowledge- Village] How to read data from weighing 
instrument?SOS! !! 

You can use the MSCOM activeX control to read data from the COM port of the 
computer where the scale is connected. If you are using Citrix or Terminal 
Server to launch the AX client you can configure them to map the client 
computer port, instead of the Citrix or Terminal Server, to the AX client. 

Regards, 

Varden Morris 

85 Saddleland Close N.E. 
Calgary, Alberta T3J 5J5 
Canada 

(403) 366-8434 (H) 
(403) 615-1604 (C) 
[EMAIL PROTECTED] com 



----- Original Message ---- 
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 
To: Axapta-Knowledge- Village <Axapta-Knowledge- [EMAIL PROTECTED] ups.com> 
Sent: Monday, February 5, 2007 5:58:00 PM 
Subject: [Axapta-Knowledge- Village] How to read data from weighing 
instrument?SOS! !! 

Dear all 

I want to read data from weighting instrumnet to Axapta, do you have any souce 
code or expirement or suggestion?? ? 

thanks you very much!!! 

------------ -- 
qhpeng 
2007-02-06 

____________ _________ _________ _________ _________ _________ _ 
Be a PS3 game guru. 
Get your game face on with the latest PS3 news and previews at Yahoo! Games. 
http://videogames. yahoo.com/ platform? platform= 120121 

[Non-text portions of this message have been removed] 




[Non-text portions of this message have been removed]





 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

[Non-text portions of this message have been removed]

Reply via email to