MessagBox in API'S ???

T

tiger79

Hi,
I'm porting some api's from vb to c#. So I decided to use (as project type)
normal classes. Are those suitable to make api's ?
My problem is that I'd like to place some sql ce 2.0 code and some
messageboxes in the api as well. Only it doesnt know those functions. So it
seemed obvious I had to import those classes only whenI try to inlcude using
System.Windows.Form it just wont recognize the Windows namespace, same is
for the sqlce namespace. Tried with references but I just cant seem to find
the right ones, and they look different from the ones u can select by
starting out as a Smart Device project...
Any Ideas ???
 
P

Peter Foot [MVP]

Once you've added your references to System.Windows.Forms and
System.Data.SqlServerCe you should add the following to the top of your code
file:-

using System.Windows.Forms;
using System.Data.SqlServerCe;

Then you will be able to directly reference individual classes in those
namespaces e.g.

MessageBox.Show("Hello World");

Peter
 
T

tiger79

Ok, now it sees the System.Windows.Forms but I still got a proble with sql
class :( I placed a reference to System.Data but now it seems to know the
subclass .SqlClient but not SqlServer ???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top