7 Replies - 819 Views - Last Post: 21 December 2011 - 05:52 PM Rate Topic: -----

#1 TomJim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 07-December 11

Class for Making object Visible.False

Posted 21 December 2011 - 03:31 PM

I am trying to make a customer class that will simply make a bunch of controls (hotspots) Visible value = False.
For instance

WinStartSpot.visible = False

Thing is I have roughly 60 "spots" that need to be turned on and off as the user clicks through the program (its a very simple OS simulator)

I tried to make a class using boolean return but that failed miserably

Anyone got a suggestion on how to code a class like that?

I am fairly sure its possible, just not to sure how to go about doing it

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Class for Making object Visible.False

#2 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 583
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: Class for Making object Visible.False

Posted 21 December 2011 - 03:42 PM

Is winStartSpot a Button control? Sadly I cannot think of anything that will help you due to the nature of the program. Sorry :)
Was This Post Helpful? 0
  • +
  • -

#3 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,499
  • Joined: 16-March 11

Re: Class for Making object Visible.False

Posted 21 December 2011 - 03:47 PM

There is definitely a way. Create a class, and declare a non instanced control variable. Then reference the control that activates the class and changes the property of visibility?
Was This Post Helpful? 0
  • +
  • -

#4 TomJim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 07-December 11

Re: Class for Making object Visible.False

Posted 21 December 2011 - 03:48 PM

View PostjimmyBo, on 21 December 2011 - 03:42 PM, said:

Is winStartSpot a Button control? Sadly I cannot think of anything that will help you due to the nature of the program. Sorry :)



No they are Rect, Oval Shapes. That are either visible or not depending on what "window" the user is looking at , at the moment

Rect , Ovals are part of the Visual Basic PowerPacks in the tool box

Imports OSsimulators.Form1
Public Class hotspotoff

Public Sub off()
Form1.one.visible = off
Form1.two.visible = off
Form1.three.visible = off
Form1.four.visible = off
Form1.five.visible = off
end sub





just an EX of what I am trying to do. Basicaly I want them all to turn off when somethign is clicked then I can programaticaly turn on the ones I need to be on
Was This Post Helpful? 0
  • +
  • -

#5 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,499
  • Joined: 16-March 11

Re: Class for Making object Visible.False

Posted 21 December 2011 - 03:56 PM

Do these shapes naturally have the visibility property? Somehow I think not. Just put all the rectangles, and shapes into a list, and use a for each loop to run through each one. Then based on some if statements to determine the objects themselves, changes whatever property you can to achieve invisibility. :)

This post has been edited by trevster344: 21 December 2011 - 03:56 PM

Was This Post Helpful? 1
  • +
  • -

#6 TomJim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 07-December 11

Re: Class for Making object Visible.False

Posted 21 December 2011 - 03:59 PM

I got it , damn, simple dumb stuff and my brain just FDISKs itself
Was This Post Helpful? 0
  • +
  • -

#7 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,499
  • Joined: 16-March 11

Re: Class for Making object Visible.False

Posted 21 December 2011 - 04:15 PM

Haha no problem man, more often than not the people who come here just need a little kick start cause they've been thinking about it too hard. ;)
Was This Post Helpful? 0
  • +
  • -

#8 TomJim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 07-December 11

Re: Class for Making object Visible.False

Posted 21 December 2011 - 05:52 PM

View Posttrevster344, on 21 December 2011 - 04:15 PM, said:

Haha no problem man, more often than not the people who come here just need a little kick start cause they've been thinking about it too hard. ;)



Very true and people have been very helpful here.
Thank you again
I am sure I will have more questions later
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1