2 Replies - 468 Views - Last Post: 31 October 2009 - 03:06 PM Rate Topic: -----

#1 progvb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 29-September 09

Declaring variables

Post icon  Posted 31 October 2009 - 02:41 PM

I have made dll component and it contains interface. I am executing it in form. The problem is that i would like to use some variables in the form, but I do not like to declare them in there. Is it possible to declare them in this dll interface and then use them in form?
Is This A Good Question/Topic? 0
  • +

Replies To: Declaring variables

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4399
  • View blog
  • Posts: 12,255
  • Joined: 18-April 07

Re: Declaring variables

Posted 31 October 2009 - 02:50 PM

Well good design dictates that your variables should be defined as close to where they are used as possible. Typically this is the same function, same class or the same assembly. Why are you against putting variables in the form if the form is the one that uses their values? You do realize you can create your own class too right? That would be separate from any form using them and wouldn't need to pull them out of a DLL.

:)
Was This Post Helpful? 0
  • +
  • -

#3 progvb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 29-September 09

Re: Declaring variables

Posted 31 October 2009 - 03:06 PM

My goal is that all the variables that the program uses repeatedly should be hiden from the user. I want that the form uses mainly dll component rather than it has its own code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1