Jump to content


Check out our Community Blogs

Kierien

Member Since 30 Jan 2009
Offline Last Active Mar 10 2014 12:24 PM
-----

Topics I've Started

Call upon a resource

05 July 2009 - 08:37 AM

Hey,

How would i call upon a resource? Like i have background.wav imported into resources, now how would i call upon that resource in my code?

┬ČKierien

Get my app to log into a vBulletin forum?

28 February 2009 - 07:39 AM

Hey,

How would i go around having my app logging into a vbulletin forum? Via two textboxes and a button ofcourse.

~Kierien

Sending Data From Program To Php Server

12 February 2009 - 01:19 AM

Hi,

Im trying to code a program which sends the text in the textBox to a webserver, with the format

textBox1: (the text)
textBox2: (the text)
IP: (IP of the person using the program)
Date and Time: (what it says)
*************************
(BLANK LINE HERE)

My friend said that it could be done using this php code.

<?php 
 $line     =('***********************************************'); 
 $text1    = $_GET['text1'];
 $text2   = $_GET['text2'];

 $ip       = $_SERVER['REMOTE_ADDR'];
 $d        = date('l dS \of F Y h:i:s A');
 $headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
 $mes     .= 'textbox1: '.$text1."\n";
 $mes     .= 'textbox2: '.$text2."\n";

 $mes     .= "IP: ".$ip."\n";
 $mes     .= 'Date & Time: '.$d."\n";
 $mes     .= ".$line.";  $file = "text.txt";
 $fh = fopen($file, "a");
 fwrite ($fh, "$mes\n"); fclose($fh);?>

How do i use it though?

Btw u can use
((WC.DownloadData("http://whatismyip.com/automation/n09230945.asp")))
to get thier ip.

Any help would be appreaciated.

AutoTyper(Spammer) In C#

31 January 2009 - 10:45 AM

Hey,

This tut is extremely simple, a good one for C# beginners =)

First create a new C# project by going to

File>New>C#>Windows Forms Application

Then add 1 timer, 3 textboxes, and 2 buttons.

First were gonna give your timer a code, double click on your timer and add this code

SendKeys.Send(textBox1.text);
SendKeys.Send("{ENTER}");
SendKeys.Send(textBox2.text);
SendKeys.Send("{ENTER}");
SendKeys.Send(textBox3.text);
SendKeys.Send("{ENTER}");

The SendKeys Function basically types out the text you specify.

Now rename one of your buttons to "Start", and give it the following code

timer1.Enabled = true;

This enabled the timer, which in return, starts spamming your text.

Then rename another one to "Stop", and give it the code below

timer1.Enabled = false;

This disables your times, which stops the spamming.

And ur done =D

How simple was that? :rolleyes:

Hope you learned a thing or two from this.

~kierien

Splash Screen in C#

31 January 2009 - 10:40 AM

Hi again,

As usual i'll try to keep my code as simple as possible, but just as good i hope =)

Will add screenies later.

First create a new C# project by going to

File>New>C#>Windows Form Application

Now add a new form by right clicking on the project in the solution explorer, and add a new "Windows Form" called "Splash".

Now add a timer on the "Splash" form, with its interval set at 3000. You can change that at the timer's Properties.

Now you're gonna have to change your startup form, from Form1, to splash, you can achieve that by editing "Program.cs" code, from

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Splash_Screen
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}

To

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Splash_Screen
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new [COLOR="Red"]Splash[/COLOR]());
        }
    }
}

Now goto Splash's main code, and under

InitializeComponent();

add

timer1.Enabled = true;

And add this to "timer1"'s code

Form1 MainForm = new Form1;
MainForm.Show;
timer1.Enabled = false;
this.Dispose(false);

Go back to Form1 now, and click the "Events" button (Looks like a lightning icon), and scroll down to "FormClosed", and double click it, it should bring you to the code editor. Now add this code

Application.Exit();

The reason behind this is because when Splash closes, its actually still running in the background, but just not visible, as because it is the startup form, which C# thinks is the main form, but by adding this code whenever your Form1 closes the whole application closes.

Now for the GUI =D

Set "Splash"'s "FormBorderStyle" to "Borderless", and "TopMost" to yes, and "ShowInTaskbar" to no.

Then resize your Splash form to whatever size you like, and add a picture or background, and ur done =)

Hope you found this usefull.

~kierien

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