How to create a windows short-cut and place it in autostart-folder?

How to create a windows short-cut and place it in autostart-folder?
How to send key commands that simultates the user pressing tab or delete?
How to disable key commands from the user?

I wrote this enoying code that turns the screen black and on close starts another blackscreen so closing it will only open more blackscreens XD

Thanks in Pre-Advance.
//ColacX
[code]
//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include "darkmain.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
{
Form1 = new TForm1(Application);
Form1->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormMouseMove(TObject *Sender, TShiftState Shift,
int X, int Y)
{
SetCursorPos(10,10);
}
//---------------------------------------------------------------------------
[/code]

Comments

  • : How to create a windows short-cut and place it in autostart-folder?
    : How to send key commands that simultates the user pressing tab or
    : delete?
    : How to disable key commands from the user?
    :
    : I wrote this enoying code that turns the screen black and on close
    : starts another blackscreen so closing it will only open more
    : blackscreens XD
    :
    : Thanks in Pre-Advance.
    : //ColacX
    : [code]:
    : //---------------------------------------------------------------------------
    : #include
    : #pragma hdrstop
    : #include "darkmain.h"
    : //---------------------------------------------------------------------------
    : #pragma package(smart_init)
    : #pragma resource "*.dfm"
    : TForm1 *Form1;
    : //---------------------------------------------------------------------------
    : __fastcall TForm1::TForm1(TComponent* Owner)
    : : TForm(Owner)
    : {
    : }
    : //---------------------------------------------------------------------------
    :
    : void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
    : {
    : Form1 = new TForm1(Application);
    : Form1->ShowModal();
    : }
    : //---------------------------------------------------------------------------
    : void __fastcall TForm1::FormMouseMove(TObject *Sender, TShiftState Shift,
    : int X, int Y)
    : {
    : SetCursorPos(10,10);
    : }
    : //---------------------------------------------------------------------------
    : [/code]:
    :
    why would you create a program that only shows a black screen?
    anyways to create a startup program you simply add your exe. as a task.

    Start -->Control Panel -->Scheduled Tasks and create a new task add your exe as a startup program.

    Nothing (I mean ABSOLUTLY nothing) can prevent a person from stoping this task. simply boot in safe mode and remove it from the starup programs.
  • Honestly this is just an anoying thing harmless thing. Kinda like a trojan. So I'd wan't it the sent .exe file to add it self to the startup. Like msnmsgr does.

    I was thinking of using a shortcut and moving it to the autostart folder but I don't know what's written inside a shourtcut and what's it's extension.
  • : Honestly this is just an anoying thing harmless thing. Kinda like a
    : trojan. So I'd wan't it the sent .exe file to add it self to the
    : startup. Like msnmsgr does.
    :
    : I was thinking of using a shortcut and moving it to the autostart
    : folder but I don't know what's written inside a shourtcut and what's
    : it's extension.
    :
    Here you go:
    http://delphi.about.com/od/windowsshellapi/a/create_lnk.htm
    Found it using "shortcut windows api" in google.
  • : http://delphi.about.com/od/windowsshellapi/a/create_lnk.htm

    Ehum not solved how would it look like in C++?
    My Pascal is rather rusty. Also my Delphi Compiler is in C++ so it doesn't take Pascal codes.
  • : : http://delphi.about.com/od/windowsshellapi/a/create_lnk.htm
    :
    : Ehum not solved how would it look like in C++?
    : My Pascal is rather rusty. Also my Delphi Compiler is in C++ so it
    : doesn't take Pascal codes.

    Why then did you ask it on the Delphi board and not one of the many C++ boards?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories