The online racing simulator
InSim.NET Example
If you don't even know where to put that code I'm afraid this isn't really something you should do right now.

First learn the basics of programming, and how to create a new project and a new class etc.
Quote from Bose321 :

First learn the basics of programming, and how to create a new project and a new class etc.

I know how to create a new project .. etc. but InSimDotNet it's more complicated than LFS_External :| :/ Fap
#4 - heawy
Man, both use same language. Say where you have problem first, insim loader or events?
I have problem with insim loader |:
The link you posted contain all examples you need. Especially the docs that geekas posted should provide you with more than enough information.

You either know how to code or not, it doesn't matter what library you're using.
You obviously need to send an IS_BTN packet. It's all in the simple tutorial.


IS_BTN b = new IS_BTN { /* Whatever button parameters you wish */ };
inSim.Send(b);

Quote from MadCatX :

IS_BTN b = new IS_BTN { /* Whatever button parameters you wish */ };
inSim.Send(b);


And if i want to create another button i need to write again IS_BTN ?

For example IS_BTN Button = new IS_BTN { /* */ };
insim.Send(Button);
I think it would be easier to wrap that in a function.


void CreateButton(string Text)
{
IS_BTN b = new IS_BTN { Text=Text };
inSim.Send(b);
}

So you just call 'CreateButton("My text here");' every time to create a button. But I assume you already knew that because you know how to code. Cool

You could expand this function with more parameters like left, top, height, width, etc.
Quote from Bose321 :I think it would be easier to wrap that in a function.


void CreateButton(string Text)
{
IS_BTN b = new IS_BTN { Text=Text };
inSim.Send(b);
}

So you just call 'CreateButton("My text here");' every time to create a button. But I assume you already knew that because you know how to code. Cool

You could expand this function with more parameters like left, top, height, width, etc.

I solved this.
Now in LFS_External Intialise insim events are :
InSim.BTC_Received += new LFS_External.InSim.InSimInterface.BTC_EventHandler(BTC_ButtonClicked);

I need to know that for InSimDotNet
Quote from LFS Marius LFS :Now in LFS_External Intialise insim events are :
InSim.BTC_Received += new LFS_External.InSim.InSimInterface.BTC_EventHandler(BTC_ButtonClicked);

I need to know that for InSimDotNet

Read the section "Receiving Packets" in the tutorial. Seriously, everything you've asked so far is explained there. Take your time and read it, at the end of the day it'll be easier than asking other people for everything.
Quote from MadCatX :
Read the section "Receiving Packets" in the tutorial.

This is the file name ?
Read the docs please... The code below is 99% copied from the documentation.

You will have to add an InSim bind:

insim.Bind<IS_BTC>(OnButtonClick);

This will use the "OnButtonClick" function:

static void OnButtonClick(InSim insim, IS_BTC btc)
{
// Your code here to handle button clicks
}

You will have to use this method for all packets that you want to receive (like MSO and MCI packets).

FGED GREDG RDFGDR GSFDG