| View previous topic :: View next topic |
| Author |
Message |
XxX_Mr-Hacker_XxX Advanced Cheater
Reputation: 0
Joined: 11 Jan 2009 Posts: 52 Location: Gaming gutter
|
Posted: Tue Mar 17, 2009 8:36 am Post subject: Help |
|
|
| Can anybody show me how to load from one form to another using a button please
|
|
| Back to top |
|
 |
mStorm Expert Cheater
Reputation: 0
Joined: 21 Feb 2009 Posts: 107
|
Posted: Tue Mar 17, 2009 9:03 am Post subject: |
|
|
| in VB, or C++? or?
|
|
| Back to top |
|
 |
AlbanainRetard Master Cheater
Reputation: 0
Joined: 02 Nov 2008 Posts: 494 Location: Canada eh?
|
Posted: Tue Mar 17, 2009 1:16 pm Post subject: |
|
|
C++ = Create a dialog? In a separate thread for MDI or in the same for input fields.
C# = Fromname(.cs file)?
| Code: |
Form2 f = new Form2();
f.Show();
or
f.ShowDialog();
|
_________________
|
|
| Back to top |
|
 |
XxX_Mr-Hacker_XxX Advanced Cheater
Reputation: 0
Joined: 11 Jan 2009 Posts: 52 Location: Gaming gutter
|
Posted: Wed Mar 18, 2009 3:29 am Post subject: |
|
|
| mStorm wrote: | | in VB, or C++? or? |
oh crap srry in vb
| Code: | Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
If ProgressBar1.Value = ProgressBar1.Maximum Then
Form2.Show()
Me.Close()
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" And TextBox2.Text = "" Then
ProgressBar1.Visible = True
Timer1.Start()
Else
MsgBox("srry")
End If
End Sub
End Class |
here is the code
it loads the first form but after that it ends the rogram
any help???
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Wed Mar 18, 2009 3:38 am Post subject: |
|
|
notice that after you're opening the second form
you're closing the whole process.
will close the parent window which is the first window so no wonder your process is shut down
|
|
| Back to top |
|
 |
XxX_Mr-Hacker_XxX Advanced Cheater
Reputation: 0
Joined: 11 Jan 2009 Posts: 52 Location: Gaming gutter
|
Posted: Wed Mar 18, 2009 7:10 am Post subject: |
|
|
| 1qaz wrote: | notice that after you're opening the second form
you're closing the whole process.
will close the parent window which is the first window so no wonder your process is shut down |
OMG thank you soo much
+ rep
THNX
Edit: Okay that worked but how do I then close the first form without shutting the whole thing down??
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Wed Mar 18, 2009 7:35 am Post subject: |
|
|
you're first form is the parent window of whole windows that you'll open at that process.
so when that "Main" form is closed, it'll close all other opened windows
since all of them are the childes windows of that window.
i don't think that's possible to do what you're planning to do, well maybe it is i never tried it before but good luck.
|
|
| Back to top |
|
 |
mStorm Expert Cheater
Reputation: 0
Joined: 21 Feb 2009 Posts: 107
|
Posted: Wed Mar 18, 2009 8:05 am Post subject: |
|
|
| Form1.Visible = False
|
|
| Back to top |
|
 |
|