The online racing simulator
C# Form Application -> label style
Hey,

I'm trying to make a tray application with a join function to automaticly start lfs with your favorite servers.

Tho that already worked out quite well. Now I'm making a new one in a kinda vista style tray application.

And my question is, is their any way to display lfs server colors in a label / button / ...

The only way I found is with the WebBrowser control... but there is no way I think on catching url clicks.. Like when you click in the webbrowser control on "Host Name" you catch the event in C#, call up a function and start lfs...
edit: irrelevant.
Quote from DarkTimes :There is no way to natively do this in .NET with Windows.Forms, as far as I'm aware, but you could create separate labels for each fore-colour and then position them so they looked like they were all part of the same label.

Another way you could do it would be to create the label as a RichTextBox control, where you can set rich font styling for the text, then just set the border of the control to none, and set the background colour to the same colour as the rest of your control, and it would look just like a label, except with the font-styling.

Both of these ways would support hooking up OnClick events to catch when the user clicks the control.

If you wanted to ditch Windows.Forms you could write your application with Windows Presentation Foundation, which has much more powerful graphics capabilities.

Is it also possible to disable selection?
edit: irrelevant.
It did the job! Just the thing I needed.

Added the result in a attachment.
Attached images
tool.jpg
Edit: irrelevant.
Basicly a lfs2join tray application... But it's easy so i don't need to remember all those admin passwords

If anyone is intrested in one with a custom server list... Then I'll release it with config file etc.

Anyway big thanks mate!

FGED GREDG RDFGDR GSFDG