RSS

Convert a Word file to PDF with C#

What’s up guys?! A couple of weeks has passed since my last post, but here I am again to give you a very easy and nice way to convert a Word file (by Word, read .docx, .doc, .rtf, etc) to a PDF. I have searched a lot on the internet about conversion to PDF and it’s not something easy, although it is simple to understand this code I am going to give.

img1

First of all, to get this tutorial working correctly, you MUST have Office installed in your computer. Otherwise it won’t work. You have plenty of other tutorials even using iTextSharp to create your PDF or Java using JodConverter and OpenOffice like this.

Read the rest of this entry »

 
2 Comments

Posted by on March 20, 2012 in .NET

 

Tags: , , , , , , , , ,

Working with Postgres database and C# by using Npgsql and Reflection

 

What’s up guys?! I’m here again to talk a little bit more about database, on the other hand, it is not SQL Server nomore but Postgres. I’m working on a project that had a must-be-Postgres moment and before that I had worked with this database and C# once, in 2009. So, lots of thing changed since then.

postgres3

Well, today I’m working with Npgsql

… “Npgsql is a .Net Data Provider for Postgresql. It allows any program developed for .Net framework to access database server. It is implemented in 100% C# code. Works with Postgresql 7.x and above.

Shall we?

Read the rest of this entry »

 
2 Comments

Posted by on March 8, 2012 in .NET, Postgres

 

Tags: , , , , , , ,

Saving files into your SQL database with C#

What’s up guys?! I just wanted to say that I’m very happy cause of this blog, nowadays it’s around 100+ views per day, it makes me want to update here more! Speaking of which, I’m here today to show you a nice way to work with files in your database, no matter if it’s a .pdf, .doc or .jpg file.

remote-database-services-3

Just want to make it clear, there are different ways to do the same thing, I’m just more confortable working with this one because it fits to me.

Read the rest of this entry »

 
6 Comments

Posted by on March 2, 2012 in .NET, SQL Server

 

Tags: , , , , , , , , ,

Building a simple chat application using asynchronous communication and UDP in C#

What’s up guys?! Here I am again to show you a little bit of asynchronous communication in C#. A few months ago I ended up developing an application and learning more about asynchronous stuff. It’s pretty easy, MSDN documentation is pretty clear so I’ll try to be focus here.

first

If you’d like to read before getting started, check this out.

Read the rest of this entry »

 
2 Comments

Posted by on February 20, 2012 in .NET

 

Tags: , , , , ,

Plotting graphs in C# with ZedGraph and VS 2010

Hello everybody! Again, after a long while without any single post here I am. Based on wordpress statistics, people are always looking for “c#, graphs, plot”.

zedgraph

So, since there’s already a post here explaining how to do that in a very simple way, I’m going to show you another way to do the same thing, using a powerful tool called ZedGraph.

“ZedGraph is a class library, user control, and web control for .net, written in C#, for drawing 2D Line, Bar, and Pie Charts. It features full, detailed customization capabilities, but most options have defaults for ease of use.”

Read the rest of this entry »

 
16 Comments

Posted by on February 10, 2012 in .NET

 

Tags: , , , , , ,

Using git with gitignore and Dropbox for your C# projects!

Hello everybody! After a long time without any single post, I’m back here to give you an awesome tip. How to use git for your C# projects, and the best part, with Dropbox, so you can access your files wherever you are. (Ok, that’s a little too much).

Git is a tool to control revision and you can find everything in here, the official website.

gitlogonet1dropbox

For my C# environment I use Windows 7 and Visual Studio 2010, if you have the same, I totally recommend that you install a gitBash, it can be easily downloaded and installed from here.

Read the rest of this entry »

 
Leave a comment

Posted by on February 10, 2012 in .NET

 

Tags: , , , , , , ,

How to place your C# application in the System Tray

Hello people! It’s been an era since my last post, I’ve been busy and.. must confess, a little bit lazy to post here. But (again) I will try to keep this blog alive, since I’m dealing with different kind of problems every single day, I have a lot to contribute.

systray

It was no different today, I had to deal with a simple thing, how to place my application in the System Tray, simple, huh? But I had never done it before, so I’m going to do it in 4 quick steps. There’s no mistake.

Read the rest of this entry »

 
2 Comments

Posted by on November 9, 2011 in .NET

 

Tags: , , , , ,

Working with Threads in C# and avoiding “accessed from a thread other than the thread it was created on” error.

220px-Multithreaded_process

 

Hello People! I’ve been busy and had no time for a new post, but I got into a curious situation two weeks ago, that was the first time I actually needed to work with different threads in C#, in this case, my application would not be busy while processing.

I know there are a lot of tutorials on the internet explaining about threads, so I decided to build an small application using Treads (really?), Reflection and Delegate, so it can be used in your app also.

 

First of all, you know understand a little bit of those important concepts very common in C#. So, I recommend that you take a look at those web sites:

Threads: http://msdn.microsoft.com/en-us/library/ms173178(v=vs.80).aspx

Reflection: http://msdn.microsoft.com/en-us/library/ms173183(v=vs.80).aspx

Delegate: http://msdn.microsoft.com/en-us/library/ms173171(v=vs.80).aspx

Well, since you already understand their purpose, let’s work on our code.

Read the rest of this entry »

 
2 Comments

Posted by on May 31, 2011 in .NET

 

Tags: , , , , , , ,

Easy way to plot graphs with C# and Visual Studio 2010

Ola, amigos! Here I am again to another tutorial. This time I’m going to give you a brief tutorial teaching you how to plot graphs using a component called Chart, its recommended for you to take a look at its documentation before.

first

Well, for almost for years developing in C#, last month was the first time I ended up drawing graphs in an application I’m developing. After a couple of hours looking at the internet, I found an easy way to do it. You only need to add the coordinates, x and y, or only one of those and that’s it. It’s done!

Read the rest of this entry »

 
50 Comments

Posted by on May 15, 2011 in .NET

 

Tags: , , , , , , , ,

Improving your gedit with gmate – a great code editor!

Hallo zusammen! Hello everybody! Wow, it’s been more than a month since my last post here. Things have been really rough at University. I’ll try again to keep a post per week, I have a job now as a .NET developer, so probably there will be more posts about C# than Rails.

But nothing’s lost yet! I’m still having fun with RoR at home when it’s possible.
And I came here today for a quick post and great tip for you, Rails beginner developer.

gedit-logo

Well, I’m now using Ubuntu 11.04, since its release. Personally, I’m finding it awesome. For sure there are still a few bugs, but, I hardly recommend it. And since I’m still using Ubuntu, gedit/gmate is my favorite one.

Read the rest of this entry »

 
4 Comments

Posted by on May 3, 2011 in Ruby on Rails, Ubuntu

 

Tags: , , , , ,

 
Follow

Get every new post delivered to your Inbox.