How to use ViewerX in Qt?


How to use ViewerX in Qt?

Author
Message
zane
View Quick Profile

Supreme Being
Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 2, Visits: 22
I've read the example for VC. And write a simple programe as following:
**************"main.cpp file"*******************************
#include <QApplication>
#include <QtGui>
#include <QAxWidget>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QAxWidget* activex  = new QAxWidget(0,0);
    activex->resize(200,80);
    activex->setControl(QString::fromUtf8("{62FA83F7-20EC-4D62-AC86-BAB705EE1CCD}"));
    activex->dynamicCall("Disconnect()");
    activex->dynamicCall("SetHostIP(QString)","192.168.1.1");
    activex->dynamicCall("SetPort(int)",5900);

    activex->dynamicCall("SetStretchMode(ScreenStretchMode)",0);
    activex->dynamicCall("ConnectAsync()");
    activex->show();
    return a.exec();
}
****************************pro file******************
CONFIG += qaxcontainer
SOURCES += \
    main.cpp

As you know Qt can use the ActiveX dll like VC.

But my project never show the remote desktop as in the attachment.
Attachments
Not_Work.bmp (177 views, 438.00 KB)
Yury Averkiev (s-code)
View Quick Profile

Supreme Being
Supreme Being (193.8K reputation)Supreme Being (193.8K reputation)Supreme Being (193.8K reputation)Supreme Being (193.8K reputation)Supreme Being (193.8K reputation)Supreme Being (193.8K reputation)Supreme Being (193.8K reputation)Supreme Being (193.8K reputation)Supreme Being (193.8K reputation)

Group: Administrators
Last Active: 3 days ago @ 6:45 PM
Posts: 1.9K, Visits: 3.5K
I wish I could help you, but I don't have much experience with QT.

Just curious, could you try to use Connect() instead of ConnectAsync() to check it would behave any different? 

http://www.s-code.com/App_Themes/Default/images/blue_line.gif
Kindest Regards,
SmartCode Solutions Support
zane
View Quick Profile

Supreme Being
Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)Supreme Being (512 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 2, Visits: 22
Dear Support,

Thanks a lot for your reply and guidance.

There is still has the problem when using function "Connect()".

Another question as following:

In the discussion of "Screenshot", I see that you give an example "returnValue = Image.FromHbitmap(new IntPtr(ViewerX.ScreenBitmap))" in C#.

Can this function be used in scripts(Javascript? JScript?VBscript?) in web browser?

As I am new in scripts, could you please kindly give an example of the function in the scripts?

Best Regards,

Zane


Similar Topics


Reading This Topic