Click here to Skip to main content
15,908,173 members
Home / Discussions / C#
   

C#

 
GeneralRe: Properties VS Methods in OOPS Pin
J4amieC3-Mar-08 1:46
J4amieC3-Mar-08 1:46 
GeneralRe: Properties VS Methods in OOPS Pin
Vimalsoft(Pty) Ltd3-Mar-08 19:17
professionalVimalsoft(Pty) Ltd3-Mar-08 19:17 
Generalnew Char[] Pin
Navneet Hegde2-Mar-08 22:05
Navneet Hegde2-Mar-08 22:05 
GeneralRe: new Char[] Pin
phannon862-Mar-08 22:15
professionalphannon862-Mar-08 22:15 
GeneralRe: new Char[] Pin
ehuysamer2-Mar-08 22:19
ehuysamer2-Mar-08 22:19 
GeneralRe: new Char[] Pin
Xmen Real 2-Mar-08 22:22
professional Xmen Real 2-Mar-08 22:22 
Questionhow to activate a Form? Pin
Raheem MA2-Mar-08 22:01
Raheem MA2-Mar-08 22:01 
AnswerRe: how to activate a Form? Pin
Vimalsoft(Pty) Ltd2-Mar-08 22:13
professionalVimalsoft(Pty) Ltd2-Mar-08 22:13 
see this


<br />
    Private Function CheckExistance(ByVal strFormname As String) As Boolean<br />
        'determine if the form already exists<br />
        Dim frmtest As Form<br />
        Dim blnFound As Boolean = False<br />
        'does form already Exists?<br />
        For Each frmtest In Me.MdiChildren<br />
            With frmtest<br />
                If .Name = strFormname Then<br />
                    .Activate() 'Activate Previous instance.<br />
                    blnFound = True<br />
<br />
<br />
                End If<br />
            End With<br />
        Next<br />
        Return blnFound<br />
<br />
    End Function<br />
<br />


And use the Above Function Like this


<br />
     Dim blnFormExists As Boolean = False<br />
<br />
                blnFormExists = CheckExistance("Form1")<br />
                If Not blnFormExists Then<br />
                    Dim objform1 As New Form1<br />
                    With objform1 <br />
                        .MdiParent = Me<br />
                        .Show()<br />
                    End With<br />
                End If<br />


Hope it helps

Vuyiswa Maseko,

Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding

VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za


GeneralRe: how to activate a Form? Pin
Xmen Real 2-Mar-08 22:23
professional Xmen Real 2-Mar-08 22:23 
GeneralRe: how to activate a Form? Pin
Raheem MA2-Mar-08 23:46
Raheem MA2-Mar-08 23:46 
GeneralRe: how to activate a Form? Pin
Pete O'Hanlon2-Mar-08 23:58
mvePete O'Hanlon2-Mar-08 23:58 
GeneralRe: how to activate a Form? Pin
DaveyM693-Mar-08 1:17
professionalDaveyM693-Mar-08 1:17 
QuestionGantt Control Pin
sunspeed2-Mar-08 21:17
sunspeed2-Mar-08 21:17 
GeneralRe: Gantt Control Pin
Vasudevan Deepak Kumar2-Mar-08 21:27
Vasudevan Deepak Kumar2-Mar-08 21:27 
GeneralRe: Gantt Control Pin
sunspeed2-Mar-08 21:40
sunspeed2-Mar-08 21:40 
Generalsql for xml Pin
jason_mf2-Mar-08 20:14
jason_mf2-Mar-08 20:14 
GeneralRe: sql for xml Pin
N a v a n e e t h2-Mar-08 21:36
N a v a n e e t h2-Mar-08 21:36 
QuestionHow to add new column in datagridview after databinding Pin
avtar1112-Mar-08 19:34
avtar1112-Mar-08 19:34 
GeneralRe: How to add new column in datagridview after databinding Pin
Xmen Real 2-Mar-08 21:46
professional Xmen Real 2-Mar-08 21:46 
GeneralDialing a modem from c# Pin
Prajin2-Mar-08 19:19
Prajin2-Mar-08 19:19 
GeneralRe: Dialing a modem from c# Pin
Laubi2-Mar-08 20:10
Laubi2-Mar-08 20:10 
Generaltree view in windows application using c# Pin
monuSaini2-Mar-08 19:00
monuSaini2-Mar-08 19:00 
GeneralRe: tree view in windows application using c# Pin
Xmen Real 2-Mar-08 21:56
professional Xmen Real 2-Mar-08 21:56 
GeneralRe: tree view in windows application using c# Pin
monuSaini2-Mar-08 22:01
monuSaini2-Mar-08 22:01 
GeneralRe: tree view in windows application using c# Pin
Xmen Real 2-Mar-08 22:19
professional Xmen Real 2-Mar-08 22:19 

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.