Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Show is what you use essentially to confirm and place your control.

 

Dim c as New control()

 

form1.controls.add© 'puts it on the form

c.Show() ' now shows it

 

------------

 

Dim c as New control()

 

form1.controls.add© 'puts it on the form

c.visible = false 'makes it invisible

c.Show() ' now shows it, but its invisible

 

------------

 

Dim c as New control()

 

form1.controls.add© 'puts it on the form

c.visible = true 'makes it visible but since there is no show, nothing will appear

Posted

t looks like "Show" calls

"Visible = true"

results in 6 more code lines

 

Il DASM for Control.show()

 

.method public hidebysig instance void Show() cil managed

{

// Code size 8 (0x8)

.maxstack 8

IL_0000: ldarg.0

IL_0001: ldc.i4.1

IL_0002: call instance void System.Windows.Forms.Control::set_Visible(bool)

IL_0007: ret

} // end of method Control::Show

Il DASM for Control.Visible()

.method public hidebysig specialname instance void

set_Visible(bool 'value') cil managed

{

// Code size 8 (0x8)

.maxstack 8

IL_0000: ldarg.0

IL_0001: ldarg.1

IL_0002: callvirt instance void System.Windows.Forms.Control::SetVisibleCore(bool)

IL_0007: ret

} // end of method Control::set_Visible

Joe Mamma

Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.

Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.

Posted

Straight form MSDN docs;

 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassshowtopic.asp

 

Showing the control is equivalent to setting the Visible property to true. After the Show method is called, the Visible property returns a value of true until the Hide method is called.

 

In short, there is no difference.

Gamer extraordinaire. Programmer wannabe.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...