Jump to content


Check out our Community Blogs

alex1

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

Topics I've Started

C# Creating Reference Between 2 Forms

20 July 2012 - 05:58 AM

Hi guys,Im back after a while,I'm not expecting any help at all,since my last post was unanswered,but anyways,I just wanna try.

My question may sound weird,but I have no idea on how to

create

a reference between 2 windows forms(for example to create a referrence and call it TheMainForm1).I'm fighting with this since 2 days(yes I know...) What I'm trying to do is to hide the Form1,but until now the only method I found is:



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



But the above code creates a new Form2 wich generates a brand new window and another tray icon...I just need to call the existing Form2


Is there someone who can guide me on how to create a reference between the 2 forms? I'm trying to learn c#.


HUGE thanks for any replay!



P.S: I also tried:
Form2 form2= new Form2();
form2.ShowDialog();

No luck..There are more than 1 tray icons again.

Password variable not working with md5

23 May 2012 - 06:03 AM

Hi!
I have this code:

<?php

//Connect To Database

$connect = mysql_connect("localhost","parkingc_php","123");
if (!$connect)
{
die("MySQL could not connect!");
}

$DB = mysql_select_db('parkingc_php');

if(!$DB)
{
die("My SQL could not select Database!");
}

//Declare Variables

$name = $_POST['name'];
$email = $_POST['email'];
$email1 = "@";
$email_Check = strpos($email,$email1);
$password = $_POST['password'];
$passencr = md5($password);
$AFM = $_POST['AFM'];
$ADT = $_POST['ADT'];
$tel = $_POST['tel'];

//Check To See If some of the Information Is Correct

if($name == "")
{
die("Opps! You don't enter a username!");
}

if($password == "")
{
die("Opps! You didn't enter one of your passwords!");
}

if($Email_Check === false)
{
die("Opps! That's not an email!");
}

// Insert Information Into MySQL Database

if(!mysql_query("INSERT INTO Customer (Name, Surname, ADT, AFM, Tel, email, password,IP)
VALUES ('$name', '$surname', '$ADT', '$AFM', '$tel', '$email', '$passencr', '$email1')"))
{
die("error!");
}

?>

My problem is regarding - "$passencr = md5($password);"

When I'm running the query with the normal password variable everything is ok,but when I cange it to "$passencr" It can't run... I'm 100% sure that it's a super small problem,but my main language is not php,but I would like to learn it also. :)
Please don't mind the IP - I have not made the script getting it yet.
Any help is highly appreciated!

How Can I Cut Everything After A Specific Character?

05 May 2012 - 07:19 AM

Hello guys!!!
I'm a super duper php newbie...I mostly code in java,but here I need to know somthing about php.

I have a text file with 1 word per line. - It looks like: lemon_juicy
Is it possible to cut everything after "_"

Please,someone,give me an example on how to read the file line by line and how to cut this thing...
I have tried it with 2 different ways and nothing came out... :sad:

Any replay is highly appreciated!

How To Create System Tray Icon?

05 April 2012 - 08:24 AM

Hello guys!
Ho do I add a tray Icon on the windows task bar?
There are no tutorials at all.I'm going crazy with this stuff. :cursing: I never tough that c++ can go so hard for simple things like this one.I mean that in java and c# it's just 3 lines of code :cursing:


If someone can give me an example of code I will be very happy.


Thanks in advance!

Is there a way to open a url trough proxy

26 March 2012 - 07:05 AM

Hello! Is there a way to open a url using a proxy ip.
For example,I would like to open an url adress using this proxy IP - 192.165.136.2

Is there a way...:confused:

I can't figure it out.

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