Click here to Skip to main content
15,884,629 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionchange child form control property at runtime using vb.net 2003 Pin
d_smit3-Sep-07 0:01
d_smit3-Sep-07 0:01 
AnswerRe: change child form control property at runtime using vb.net 2003 Pin
Parwej Ahamad3-Sep-07 0:20
professionalParwej Ahamad3-Sep-07 0:20 
GeneralRe: change child form control property at runtime using vb.net 2003 Pin
d_smit3-Sep-07 0:38
d_smit3-Sep-07 0:38 
GeneralRe: change child form control property at runtime using vb.net 2003 [modified] Pin
Parwej Ahamad3-Sep-07 0:53
professionalParwej Ahamad3-Sep-07 0:53 
QuestionTablestyle Mapping Name ? Pin
Sachin Gokhale2-Sep-07 21:50
Sachin Gokhale2-Sep-07 21:50 
QuestionGet element from Arraylist Pin
nimolZero2-Sep-07 21:17
nimolZero2-Sep-07 21:17 
AnswerRe: Get element from Arraylist Pin
_mubashir2-Sep-07 23:56
_mubashir2-Sep-07 23:56 
QuestionMake child form label invisible Pin
d_smit2-Sep-07 20:50
d_smit2-Sep-07 20:50 
Hello,
I am facing the problem in accessing the child form control property.
In my application depend upon certain condition , i have to hide some controls of some child forms.
I have created a module wherein writen a Public procedure to hide one of the child form's control
and call the procedure in MDI forms load event.
But, Whenver i am executing the application , code doen't take any effect and control still remain s visible.
Here is the code:
Module Mod1
Public sub HideControl(byval var as boolean)
if var=false then
Dim frmName As frmSearch
If frmName Is Nothing Then
frmName = New frmSearch
frmName.label1.Visible = false
End If
endif
end sub
end module
This is first way i tried.
Second way : I have defined a property for accessing the form instance and with this instance accessing the control as below:

''' global variables
Private Shared SearchInstance As frmSearch
Private Shared bSearchInit As Boolean
Public Shared Property DefInstance() As frmSearch
Get
If SearchInstance Is Nothing OrElse SearchInstance.IsDisposed Then
bSearchInit = True
SearchInstance = New frmSearch
bSearchInit = False
End If
DefInstance = SearchInstance
End Get
Set(ByVal Value As frmSearch)
SearchInstance = Value
End Set
End Property

Using this property accessing cotrol and setting its property in module as:
frmSearch.DefInstance.label1.Visible = false

None of the these codes seems to be working.
when i open that child form i still found that label visible.
Please anyone who knows the answer let me know, how to do it.
Please Give some code , its urgent as i am unable to proceed further.

Any help will be highly appreciated.
Thanks


AnswerRe: Make child form label invisible Pin
Tom Deketelaere3-Sep-07 0:08
professionalTom Deketelaere3-Sep-07 0:08 
Questionserial number in vs.net 2005 Pin
himanshu p taunk2-Sep-07 20:31
himanshu p taunk2-Sep-07 20:31 
AnswerRe: serial number in vs.net 2005 Pin
Paul Conrad9-Sep-07 7:42
professionalPaul Conrad9-Sep-07 7:42 
QuestionHow to load and unload DLL or Plugins in VB.NET2005? Pin
rattlesnake3162-Sep-07 17:14
rattlesnake3162-Sep-07 17:14 
AnswerRe: How to load and unload DLL or Plugins in VB.NET2005? Pin
originSH3-Sep-07 0:02
originSH3-Sep-07 0:02 
QuestionDatagrid Relationship Pin
alzaabi20xx2-Sep-07 12:27
alzaabi20xx2-Sep-07 12:27 
AnswerRe: Datagrid Relationship Pin
Vimalsoft(Pty) Ltd2-Sep-07 21:15
professionalVimalsoft(Pty) Ltd2-Sep-07 21:15 
GeneralRe: Datagrid Relationship Pin
alzaabi20xx3-Sep-07 9:37
alzaabi20xx3-Sep-07 9:37 
GeneralRe: Datagrid Relationship Pin
Vimalsoft(Pty) Ltd3-Sep-07 20:42
professionalVimalsoft(Pty) Ltd3-Sep-07 20:42 
GeneralRe: Datagrid Relationship Pin
alzaabi20xx3-Sep-07 21:58
alzaabi20xx3-Sep-07 21:58 
GeneralRe: Datagrid Relationship Pin
Vimalsoft(Pty) Ltd3-Sep-07 22:22
professionalVimalsoft(Pty) Ltd3-Sep-07 22:22 
GeneralRe: Datagrid Relationship Pin
alzaabi20xx4-Sep-07 4:13
alzaabi20xx4-Sep-07 4:13 
GeneralRe: Datagrid Relationship Pin
Vimalsoft(Pty) Ltd4-Sep-07 4:22
professionalVimalsoft(Pty) Ltd4-Sep-07 4:22 
GeneralRe: Datagrid Relationship Pin
Vimalsoft(Pty) Ltd4-Sep-07 21:14
professionalVimalsoft(Pty) Ltd4-Sep-07 21:14 
GeneralRe: Datagrid Relationship Pin
alzaabi20xx4-Sep-07 23:57
alzaabi20xx4-Sep-07 23:57 
GeneralRe: Datagrid Relationship Pin
Vimalsoft(Pty) Ltd5-Sep-07 0:07
professionalVimalsoft(Pty) Ltd5-Sep-07 0:07 
QuestionInvoke event inside Flash ActiveX in VB Pin
sunco2-Sep-07 10:06
sunco2-Sep-07 10:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.