Visual Basic application

Visual Basic application - @Air provides thermodynamic properties and transport properties of moist air. - Messages

#1 Posted: 3/6/2014 7:49:03 AM
experimentator

experimentator

1 likes in 21 posts.

Group: User

Dear all,

Is there the possibility of controlling Smath Studio with Visual Basic?

I mean, could I create an application with WB with a new VB form and the VB tools as I wish, then would Smath Studio read the values of the variables, calculate and show the results in the new VB form?

So could I introduce the values of the variables in my new wonderful window, secondly Smath Studio takes them and calculates and third the results would be showed in a window designed exactly as I'd like.

I find the plug-in for standalone exe files quite good, but I'm looking for more flexibility in the design of the windows.

Thanks
Learning by doing
#2 Posted: 3/6/2014 5:11:17 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

There is no simple way to do what you want. Is not entirely clear what version of VB you mean: VB6 or VB.Net. In any case embedding into other applications currently not supported. Now you can't do this.
Russia ☭ forever, Viacheslav N. Mezentsev
#3 Posted: 3/7/2014 2:44:40 AM
experimentator

experimentator

1 likes in 21 posts.

Group: User

Thanks uni for your answer.

The point is we are improving the efficiency of our FEA-calculation program using Visual Studio Express 2013 in order to reduce repetitive tasks and to get specific results more directly.

Then I wondered if that could be possible with Smath Studio too. With Visual Studio Express is very easy to create customized windows and Smath Studio is a powerful tool for engineering. The link between both programs seems to me to provide interesting results.

Bye
Learning by doing
#4 Posted: 3/7/2014 10:46:18 AM
kilele

kilele

133 likes in 397 posts.

Group: User

On my last post I mentioned Dynamic Data Exchange (DDE) protocol to share data between applications.
This article mentions a dll called DDEML which might be used to have SMath communicate with other programs :
http://msdn.microsoft.com/en-us/library/ms648774.aspx
#5 Posted: 3/7/2014 2:55:35 PM
experimentator

experimentator

1 likes in 21 posts.

Group: User

OK, I'll have a look at it.
Learning by doing
#6 Posted: 3/7/2014 4:33:41 PM
kilele

kilele

133 likes in 397 posts.

Group: User

Wrote

OK, I'll have a look at it.



well it was rather addressed to some developer, anyway here you have a visual basic sample :
http://www.thescarms.com/VBasic/ddeml.aspx

some years ago I made some ugly trickery using win32 apis (fuctions contained in windows' .dlls) to embed programs inside my application as well as listening for keyboard and mouse, you may try that sort of experiment, for example embed a few smath viewers into your app, register their pids, handles, use hooks to listen the user entry, or copy the input controls content, etc
some win32 appi for you to investigate :
user32( "CallNextHookEx", "SetWindowsHookEx", "UnhookWindowsHookEx" )
kernel32( "GetModuleHandle" )
user32( "GetWindow","GetWindowThreadProcessId", "FindWindow" )
the program WinSpy++ at catch22.net may come in handy

isn't smath viewer beautiful enough ?
#7 Posted: 3/8/2014 1:46:52 PM
experimentator

experimentator

1 likes in 21 posts.

Group: User

Lots of thanks.

Wrote

isn't smath viewer beautiful enough ?



Yes, I love Smath and find the viewer a big thing. The point is I’d like its design could be more flexible. For instance, when I do any calculation according to some code introducing charts and tables the window is sometimes too long or too width. I’d like to put the charts wherever in the window, or the input and output labels and boxes not necessary one below the other.
Learning by doing
#8 Posted: 3/8/2014 3:07:30 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Wrote


Yes, I love Smath and find the viewer a big thing. The point is I’d like its design could be more flexible. For instance, when I do any calculation according to some code introducing charts and tables the window is sometimes too long or too width. I’d like to put the charts wherever in the window, or the input and output labels and boxes not necessary one below the other.


If you want to use only SMath Studio engine to calculate sm-file in a hidden mode (w/o visualisation), I think it is possible.

EDIT: It will look like this, but we need to initialize the engine. I don't know how to do it correctly.

[MATH]a:1[/MATH]
[MATH]b:1[/MATH]
[MATH]c:a+b[/MATH]
VBNet. Example01.pdf (14 KiB) downloaded 80 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Davide Carpi 3/10/2014 6:41:00 AM
#9 Posted: 3/10/2014 3:41:39 AM
experimentator

experimentator

1 likes in 21 posts.

Group: User

OK, with your help I can start doing something.
Learning by doing
#10 Posted: 3/10/2014 10:19:29 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Wrote

OK, with your help I can start doing something.


But you must keep in mind one thing (in the example above I used assemblies separately from the program)
Quote

SMath Studio License Agreement

• The SMath Studio program is distributed as freeware;
• All copyrights to SMath Studio are exclusively owned by its author, Andrey Ivashov (http://smath.info/);
• The SMath Studio may be freely distributed provided the distribution package is not modified. No person or company may charge a fee for the distribution of SMath Studio without written permission from the copyright holder. Only unmodified installer can be redistributed; redistribution of SMath Studio binaries in any other form is not permitted;
• This License Agreement applies to all future updates/new versions of SMath Studio. By agreeing to install updates/new versions of SMath Studio you accept the terms of this Agreement for the relevant updates/new versions of SMath Studio, if upgrade/install of the new version of SMath Studio is not accompanied by any other license agreement;
• Installing and using SMath Studio signifies acceptance of all the terms and conditions of the license;
• If you do not agree with the terms of this license you must remove SMath Studio files from your storage devices and cease to use the product.

SMATH STUDIO PROGRAM IS DISTRIBUTED "AS IS".
NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED.
YOU USE THE PROGRAM AT YOUR OWN RISK.
THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.

Russia ☭ forever, Viacheslav N. Mezentsev
2 users liked this post
Davide Carpi 3/10/2014 2:38:00 PM, Andrey Ivashov 3/10/2014 6:26:00 PM
  • New Posts New Posts
  • No New Posts No New Posts