it's the right way... ;)
Sk93
Posts
-
Importing C# DLL to C??? -
Importing C# DLL to C???nope.
-
Importing C# DLL to C???I assume you're talking about injecting? If so, read this article: http://www.codingthewheel.com/archives/how-to-inject-a-managed-assembly-dll[^] and - you can create a dll in c# that just contains enums, which would give you a dll without any "classes"......
-
Need examples of extra nice program UI’s built for free with Windows FormsThey look relatively well documented. However, i may be wrong.. but they look very similar to the standard WPF controls...
-
IE icon too familiar for Microsoft EU settlement?I live in the EU and I would back microsoft if they did pull out. [rant] I think it's a stupid battle that really affects no-one. If I want another browser, I'll install it. If I don't want IE, I wont use it... I HAVE a choice.. gah Next they'll be complaining that you can't uninstall the startbar and write your own and that's SO unfair! [/rant]
-
? SET PASSWORD THROUGH CODE in Connectionstring1: have a look at the SqlConnectionStringBuilder class, as this will give you the ability to change the password within a connection string: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder.aspx[^] Using this class, you can store the full connection string, with a dummy password in the app.confg file. Then, when you want to use it in code, you can use the SqlConnectStringBuilder class to alter the string so that it includes the correct password. 2: Have a look at this article, as I believe it does exactly what you want: Encrypt and Decrypt ConnectionString in app.config and/or web.config![^]
-
Enjoy Your Video Anywhere, Anytimealso reported to cnet for false advertising... :)
-
Need examples of extra nice program UI’s built for free with Windows FormsIf you've never written an application before, then diving straight in with a barrel load of custom controls and trying to generate a snazzy interface probably isn't the best way to learn... you may get something that "looks" good, but you're likely to have not learned anything from doing so! [edit]also.. don't duplicate your posts. you'll get eaten by the admins ;)[/edit]
modified on Tuesday, July 28, 2009 6:35 AM
-
how to create a new printer and add to the listthere is no direct method of doing what you want to achieve in C# To begin with, you'll need to write your own custom printer driver for your virtual printer to use. You will need to do a lot of api wrapping, as there is no interface in C# to help you here. Your best bet is to start looking into the Windows Driver Development kit and see if you can find out exactly what you need to do. (and expect to be writing a c++ wrapper too I guess)
-
Quick Tipmy solution was cheaper; I bought a draft excluder.
-
Co-workerpre-owned is different to used. For example, I could buy a car.. pay for it.. but never collect it, sit in it, start it, open it. It's then pre-owned, but is it used?
-
Custom config sections problem.;)
-
Desktop backgroundreally good blog article on how to do this here: http://blogs.msdn.com/coding4fun/archive/2006/10/31/912569.aspx[^] Cheers, Sk93
-
Custom config sections problem.Just a quick check, but your
namespace
that the class sits in is definatelyconfig
right? Eg, the code should look something like this:using System;
using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace config
{
public class SomeSettings : ConfigurationSection
{
private SomeSettings() { }\[ConfigurationProperty("FillColor", DefaultValue = "Cyan")\] public System.Drawing.Color FillColor { get { return (System.Drawing.Color)this\["FillColor"\]; } set { this\["FillColor"\] = value; } } \[ConfigurationProperty("TextSize", DefaultValue = "8.5")\] public float TextSize { get { return (float)this\["TextSize"\]; } set { this\["TextSize"\] = value; } } \[ConfigurationProperty("FillOpacity", DefaultValue = "40")\] public byte FillOpacity { get { return (byte)this\["FillOpacity"\]; } set { this\["FillOpacity"\] = value; } } }
}
-
how to create a new printer and add to the listCan I assume you're not creating a "real" printer, but a virtual one... sort of similar to the "Send to OneNote" and "Microsoft XPS Document Writer" printers?
-
Remember to create membership in http://www.codeproject.com/Crikey.. thats a tricky php question!:suss:
-
Executing sql stored procedure and storing result set in datasetYes. DBML will do this for you....... http://msdn.microsoft.com/en-us/library/bb425822.aspx#linqtosql_topic5[^]
-
Executing sql stored procedure and storing result set in datasetHi, Are you saying that the stored procedure could return different column names each time it's run? If so, I don't think it'd be possible to achieve what you want to do... If not, then my previous reply should still work, as the stored proceure will be returning the same columns each time it runs, regardless of how it builds up it's data internally. Cheers, Sk93
-
How to check if documents on shared folders are availiable?Would
System.IO.File.Exists()
not do the job? You could then catch any FileNotFound or AccessDenied exceptions? -
update query in windows application with ms access as databaseTry something like this:
foreach ([forgot object name] tbl in CRReport.Database.Tables)
{
tbl.SetLogOnInfo("",dbLocation,dbUser,dbPass)
tbl.Location = dbLocation
tbl.SetDataSource(dbLocation)
}I've not got CR installed here, so can't double check the function and object names, but I believe that will redirect your database source for you :) The first parameter of "SetLogOnInfo" i think is a connection string, but I don't think you need this when reading from Access.. I've only ever used SQL Server, so I will say this is all just guess work :wtf: Anyways, hope it works for you! :cool: