How to use ViewerX in Qt?


Author
Message
zane
zane
Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)
Group: Forum Members
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 (953 views, 438.00 KB)
Yury Averkiev (s-code)
Yury Averkiev (s-code)
Supreme Being (207K reputation)Supreme Being (207K reputation)Supreme Being (207K reputation)Supreme Being (207K reputation)Supreme Being (207K reputation)Supreme Being (207K reputation)Supreme Being (207K reputation)Supreme Being (207K reputation)Supreme Being (207K reputation)
Group: Administrators
Posts: 1.9K, Visits: 3.6K
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
Regards,
Yury Averkiev, SmartCode

zane
zane
Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)Supreme Being (530 reputation)
Group: Forum Members
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
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Explore
Messages
Mentions
Search