Jump to content


Check out our Community Blogs

alex1

Member Since 26 Jan 2011
Offline Last Active Jul 21 2012 03:14 AM
-----

Posts I've Made

In Topic: C# Creating Reference Between 2 Forms

21 July 2012 - 03:06 AM

In case that someone is looking for it:

Form1:

/* Hiding Form1 and showing Form2 */
private void btnHideForm1_Click(object sender, EventArgs e)
	 {
		 Form mod = new Form2();
		 mod.Owner = this;
		 mod.Show();
		 this.Hide();
	 }

Form2:

/* Hiding Form2 and showing Form1 */
private void btnHideForm2_Click(object sender, EventArgs e)
	 {
		 this.Owner.Show();
		 this.Close();
	 }

Thanks to gregwarner for helping me!!! :cool:

In Topic: C# Creating Reference Between 2 Forms

20 July 2012 - 06:59 AM

no idea what are you talking about,but really c# is harder to be understand than java.Maybe I made a bad desision to move to it.

Thanks anyways

In Topic: C# Creating Reference Between 2 Forms

20 July 2012 - 06:26 AM

Basicly what I want is to have Form2 showed just once,because everytime when im pressing the show button a new form is pupping and if I press it 10 times I will end up with 10 Form2 on my screen. I need to lock it.
I need somthing like this:

this.Hide();
Form2 form2 = new Form2();
form2.theMainform1 = this;
form2.Show();

but I have no idea how to create theMainform1...

In Topic: How Can I Cut Everything After A Specific Character?

05 May 2012 - 09:29 AM

Thanks RhetoricalRuvim!!!
I will try this!


How is that supposed to work? Isn't that code supposed to set $new_var to $mytxt ?


I have no idea what is the meaning of these commands. :)

As I said I'm mainly coding in java,but as I can see php is not hard to learn if you have the rite people to help you! :)

THANKS gain!!!!

p.s:


$mytxt="test.txt";
$new_var = substr($mytxt, 0, strpos($mytxt, ".");

I'm getting a strange error:
Parse error: syntax error, unexpected ';' in /home/cbeast/public_html/investrq.com/test/test.php on line 3

In Topic: How Can I Cut Everything After A Specific Character?

05 May 2012 - 07:32 AM

The last thing I tried was:


$mytxt="test.txt";
$new_var = substr($mytxt, 0, strpos($mytxt, "_");


and also:

$string = substr($string, 0, strrpos($string, '-'));

Nothing came out...I'm sure the problem is in the sntax,because as I said I have no idea of php.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download