| View previous topic :: View next topic |
| Author |
Message |
Tdk161 Valued Contributor


Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Mon Mar 07, 2005 1:56 pm Post subject: Need Help for VDSUG.DLL |
|
|
Hi,
I have a trouble using VDSUG.DLL
If I write
| Code: |
UG DRAW,PEN,BLACK,SOLID,1
UG DRAW,FILL,WHITE
UG DRAW,RECTANGLE,0,0,400,300
UG DRAW,FONT,RED,BI,24,"Times New Roman"
UG DRAW,PEN,RED,SOLID,2 |
Work but If I Write
| Code: |
%%Xass = 400
%%YAss = 300
UG DRAW,PEN,BLACK,SOLID,1
UG DRAW,FILL,WHITE
UG DRAW,RECTANGLE,0,0,%%Xass,%%Yass
UG DRAW,FONT,RED,BI,24,"Times New Roman"
UG DRAW,PEN,RED,SOLID,2 |
not work
Why? I Wrong Something?
Many Thanks 
Last edited by Tdk161 on Mon Mar 07, 2005 10:49 pm; edited 1 time in total |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Mar 07, 2005 8:35 pm Post subject: |
|
|
Not sure what you are trying to do - that code is not
complete. But variables do work with VDSug.dll
Make sure you load VDSug.dll with the window handle
(so it knows which window to draw on):
%%hwnd = @winexists("Your program window name")
EXTERNAL VDSug.dll, %%hwnd
If you still have problems, let me know what you are
trying to do.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Tdk161 Valued Contributor


Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Mon Mar 07, 2005 10:47 pm Post subject: |
|
|
| Code: |
#-----------------------------------------------------------------------------#
# Modulo: Creazione grafico #
# #
# Author: Andrea Sperotti #
# #
# Copyright: 2005 #
# #
#-----------------------------------------------------------------------------#
:Chart
%%XChat = 600
%%YChart = 400
If @Zero(%1)
List Create,4
List LoadText,4,
"5.5
"5.6
"5.7
"5.8
"5.9
"6.0
"6.10
"6.20
"22.90
"40.00
"65.78
%1 = @Text(4)
List Close,4
End
#List Create,1
DIALOG CREATE,Grafico Tempo/Pressione,-1,0,654,491
%%hwnd = @WinExists("Grafico Tempo/Pressione")
DIALOG ADD,BUTTON,Esci,457,304,64,24,Esci
DIALOG Show
EXTERNAL @Path(%0)VdsUg.dll,%%hwnd
#Define Command,ug
List Create,7
List Assign,7,%1
UG DRAW,PEN,BLACK,SOLID,1
UG DRAW,FILL,WHITE
UG DRAW,RECTANGLE,0,0,%%XChart,%%YChart
UG DRAW,PEN,BLACK,SOLID,1
%%Linea = 0
Repeat
Ug Draw,Line,solid,%%Linea,600,%%Linea,%%Linea
%%Linea = @Sum(%%Linea,10)
Until @Not(@Greater(600,%%Linea))
# LINE Draws line from x1 y1 to x2 y2
UG DRAW,FONT,RED,BI,24,"Times New Roman"
UG DRAW,PEN,RED,SOLID,2
%x = 0
%y = %%YChart
%a = 0
Repeat
%k = @Fsub(%%YChart,@Next(7))
Ug Draw,Line,%x,%y,@Fadd(%x,10),%k
%x = @Fadd(%x,10)
%y = %k
%a = @Succ(%a)
Until @Equal(%a,@Pred(@Count(7)))
While @Not(@Event())
#Nothing
Wend
List Close,7
Dialog Close
%a = @Event()
End
|
This is the complete source code.
Can You help me please?
Many thanks  |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Mon Mar 07, 2005 11:05 pm Post subject: |
|
|
Hi Tdk161
I think I found your problem. The code below is my edited version of
your source code.
| Code: |
#-----------------------------------------------------------------------------#
# Modulo: Creazione grafico #
# #
# Author: Andrea Sperotti #
# #
# Copyright: 2005 #
# #
#-----------------------------------------------------------------------------#
:Chart
# The following was your error
# %%XChat = 600
%%XChart = 600
%%YChart = 400
If @Zero(%1)
List Create,4
List LoadText,4,
"5.5
"5.6
"5.7
"5.8
"5.9
"6.0
"6.10
"6.20
"22.90
"40.00
"65.78
%1 = @Text(4)
List Close,4
End
#List Create,1
DIALOG CREATE,Grafico Tempo/Pressione,-1,0,654,491
%%hwnd = @WinExists("Grafico Tempo/Pressione")
DIALOG ADD,BUTTON,Esci,457,304,64,24,Esci
DIALOG Show
# Define the command UG before loading the dll
Define Command,ug
EXTERNAL @Path(%0)VdsUg.dll,%%hwnd
List Create,7
List Assign,7,%1
UG DRAW,PEN,BLACK,SOLID,1
UG DRAW,FILL,WHITE
UG DRAW,RECTANGLE,0,0,%%XChart,%%YChart
UG DRAW,PEN,BLACK,SOLID,1
%%Linea = 0
Repeat
Ug Draw,Line,solid,%%Linea,600,%%Linea,%%Linea
%%Linea = @Sum(%%Linea,10)
Until @Not(@Greater(600,%%Linea))
# LINE Draws line from x1 y1 to x2 y2
UG DRAW,FONT,RED,BI,24,"Times New Roman"
UG DRAW,PEN,RED,SOLID,2
%x = 0
%y = %%YChart
%a = 0
Repeat
%k = @Fsub(%%YChart,@Next(7))
Ug Draw,Line,%x,%y,@Fadd(%x,10),%k
%x = @Fadd(%x,10)
%y = %k
%a = @Succ(%a)
Until @Equal(%a,@Pred(@Count(7)))
While @Not(@Event())
#Nothing
Wend
List Close,7
Dialog Close
%a = @Event()
|
Welcome to VDSWorld !  _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue Mar 08, 2005 2:28 am Post subject: |
|
|
Hey Bill (or anyone?),
I have a question.
Do ya always have to define DLL functions in VDS 5,
even for VDS style DLLs?
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Mar 08, 2005 3:25 am Post subject: |
|
|
Hiya Mac,
Yep, VDS 5ers have to define our dll base commands before they can be
used. Apparently, the "Command" string that we return from our dlls, isn't
used by VDS 5. I can only guess as to the reasons why. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue Mar 08, 2005 3:33 am Post subject: |
|
|
Thanks, that's good to know.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Tdk161 Valued Contributor


Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Tue Mar 08, 2005 11:46 am Post subject: |
|
|
Many Thanks bweckel
........... sgrunt!!!! (for my mind)  |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Mar 08, 2005 12:09 pm Post subject: |
|
|
| bweckel wrote: | Hiya Mac,
Yep, VDS 5ers have to define our dll base commands before they can be
used. Apparently, the "Command" string that we return from our dlls, isn't
used by VDS 5. I can only guess as to the reasons why. |
The reason is that the compiler doesn't load the DLLs, therefore it has no idea what commands or functions are valid. Earlier versions of VDS didn't do any checking, so you would have no idea whether you typed a wrong command or function name until you tried to execute that line at run-time. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|