forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need Help for VDSUG.DLL

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Mon Mar 07, 2005 1:56 pm    Post subject: Need Help for VDSUG.DLL Reply with quote

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 Crying or Very sad

Why? I Wrong Something?

Many Thanks Smile


Last edited by Tdk161 on Mon Mar 07, 2005 10:49 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Mar 07, 2005 8:35 pm    Post subject: Reply with quote

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. Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Mon Mar 07, 2005 10:47 pm    Post subject: Reply with quote

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 Surprised
Back to top
View user's profile Send private message Send e-mail
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Mon Mar 07, 2005 11:05 pm    Post subject: Reply with quote

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 ! Smile

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Mar 08, 2005 2:28 am    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Mar 08, 2005 3:25 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Mar 08, 2005 3:33 am    Post subject: Reply with quote

Thanks, that's good to know. Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Mar 08, 2005 11:46 am    Post subject: Reply with quote

Many Thanks bweckel Very Happy

........... sgrunt!!!! (for my mind) Embarassed
Back to top
View user's profile Send private message Send e-mail
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Mar 08, 2005 12:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group