|
Thank you , they look good.
The smaller the mind the greater the conceit.
Aesop
|
|
|
|
|
http://www.iconarchive.com/
http://www.glyfx.com/
http://office.microsoft.com/clipart/default.aspx
|
|
|
|
|
those are much better links
Sincerely,
-Ron
|
|
|
|
|
Brilliant, exactly what I need, thanks
The smaller the mind the greater the conceit.
Aesop
|
|
|
|
|
Hi,
Does anyone know how to generate datagrid with dynamic no. of rows and columns that is specified in the database and each cell conataining check boxes.
I am trying to dispaly dynamic seating arrangement of theatre, needed for booking the tickets.
Any idea is appreaciated.
Ananth.
|
|
|
|
|
You could create a list of booleans and bind this to the DataGrid :
using System;
using System.Windows.Forms;
public class DGTest : Form
{
static void Main()
{
Application.Run(new DGTest());
}
public DGTest()
{
DataGrid dg = new DataGrid();
this.Controls.Add(dg);
DataGridBoolColumn boolCol = new DataGridBoolColumn();
boolCol.MappingName = "Value";
boolCol.HeaderText = "Value";
DataGridTableStyle tableStyle = new DataGridTableStyle();
tableStyle.MappingName = "DGValue[]";
tableStyle.GridColumnStyles.Add(boolCol);
dg.Dock = DockStyle.Fill;
dg.TableStyles.Add(tableStyle);
DGValue[] values = new DGValue[10];
for (int i=0; i<values.Length; i++)
values[i] = new DGValue();
dg.DataSource = values;
}
private class DGValue
{
private bool _Value = false;
public bool Value
{
get { return _Value; }
set { _Value = value; }
}
}
} There's also more documentation about this for the DataGridTableStyle.MappingName property in the .NET Framework SDK.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi, I have a question concenrning user defined app code. I want to allow my user define his own algorithms to add flexibility to the operation. Is there a simple way of compiling a C, C#, or VB etc. routine in CLR, and executing that? MS Office uses a scripting facility, but in the past that has been known to be rather slow! I was just wondering if it's possible, and if it is how fast will it be at raw number crunching in comparison to say C or C#?
Joel Holdsworth
|
|
|
|
|
Yes. Many of the languages expose CodeDOM compilers that are programmatically accessible and can be used to compile your code. There's several examples available throughout the web (like on MSDN), but you can find a good one right here on CodeProject, Dot Net Script[^].
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I'm trying to figure out authentication using the HttpWebRequest class. When I try to connect to a resource that requires a password in IE, a dialog pops up where I enter that information. How can I implement the same behavior using HttpWebRequest? When I connect with that class, I receive a 401 not authorized error. Which is fine, but I can't figure out how to show the proper dialog.
Thanks.
|
|
|
|
|
If you get a 401, the correct procedure is to either pass credentials or prompt if you don't have them. So, lets say you have a while (or for) loop (it's good to terminate it at some point). If you get a 401, prompt the user with a Form you could easily create that asks for a username and password (don't forget to set the PasswordChar on the password TextBox ). Then, create an instance of an ICredentials implementation - like NetworkCredentials which is provided in the .NET base class libraries - and assign that instance as your HttpWebRequest.Credentials property. You may want to keep that once you get a 200 (or something besides 401 or another error) response.
If you're running on Windows XP or newer, you can use DPAPI to store the password, which is a Windows facility for storing network and Internet (including Passport) credentials. There's a pretty good article about it on MSDN at http://msdn.microsoft.com/library/en-us/dnnetsec/html/dpapiusercredentials.asp[^]. This isn't required for a solution, though, just more of a nicety for users (and alliviates the burden on you of securely caching passwords for remote resources if you choose to support it).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hmmm. The problem with that solution is that I really don't know what the server requires. The dialog that is displayed can be customized at the server level and I just want to display that one. Some will require the domain and some do not. I have no idea what to put on the form. The wininet dll just handles all of that for you. Isn't there a .NET equivalent?
|
|
|
|
|
The HTTP response will tell you what authentication is supported. That's the HTTP standard (most likely a different RFC - it's been a long time since I studied them). For example, Digest will also pass you a hashcode that you use with yours - can't remember off the top of my head how - and that you pass back to the server for verification and that it uses to verify the password (by performing the same hash and comparing).
You can use some of the other classes in the System.Net namespace, such as the AuthenticationManager , which automatically registers handlers for basic, digest, negotiate, NTLM, and kerberos. Look at the docs for the AuthenticationManager (the actual class documentation, or overview) for an example. Some of these things are handled for you but you still have to tell the HttpWebRequest what the credentials are, which requires that you prompt. Based on the HttpWebResponse.StatusDescription , you could customize your dialog accordingly (providing the basic REALM or something like that).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
friends , i has such problem now, help me plz
I'm going to program a webservice. Its my first time to code such project. i find that when i setup sql server2000 ,the setup progress reminds me that it will be only run on win 2000 system. i want to know that whether anybody who program a webservice project must use win2000 operation system or you can choose winxp? ps: my operation system is winxp. thank u for your help
|
|
|
|
|
Download and use the MSDE (Microsoft Data Engine) from http://www.microsoft.com/sql/msde[^] instead. In most ways, it is SQL Server, but with a limit on connections and lacking only a few features that you most likely won't use (IIRC, like DTS).
This is meant for - and commonly used for - development purposes and you can also distribute it with an application if you have a qualifying product like VS.NET, MS Access, MS Office, and a few others. You can read more about it at the link above.
Also, don't forget to download and install the MSDE Service Pack (SP) 3, which includes a fix for a bad RPC worm that is still seeking vulnerable systems. I forgot to patch one of our web servers once before co-locating and it got infect within 10 seconds of starting the SQL Server instance.
EDIT: Also, any databases you create in the MSDE can be attached to SQL Server. They are the same, in most respects. They support the same T-SQL and many of the same utilities. You can develop on the MSDE and easily move the database to a full-blown SQL Server later if you like.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thank you very much for your patient help i'll try MSDE. thanks
|
|
|
|
|
Hi,
I need to check a database at a set interval without holding up the rest of the program. Also, there is a client-server aspect to the program running over a network and I need to be able to send a message from server to client (using a message box popup on the client) without the server waiting for the client to press the 'OK' button before it can continue. Is this a case of using threading? Hope this makes sense,
Regards,
John
|
|
|
|
|
sounds like it to me... or you could run a seperate process
in .net threads are pretty simple... so you should have no difficulty!
note that you will have at least some slowdown in your main app when your thread is busy...
|
|
|
|
|
johnstacey wrote:
I need to check a database at a set interval without holding up the rest of the program.
Take a look at the different timers that are provided. I would recommend System.Threading.Timer or System.Timers.Timer . Their callbacks are invoked from a thread in the thread pool. Avoid the System.Windows.Forms.Timer because its callback is invoked on the UI thread.
|
|
|
|
|
Heh,
thanks for that. Will give it a go,
Regards,
John
|
|
|
|
|
Hi,
I am trying the suggestions above. But another thing that I need to implement is having the client 'listening' to a port for any messages from the server program. This 'listening' needs to be constantly running in the background while also allowing the client to respond to user actions. Then if the server requests something of the client it will run. Any pointers on how I could implement this. Thanks again,
Regards,
John
|
|
|
|
|
hey!
i've a nice remoting/serialization problem:
i call a method of my server object, which needs a font parameter. if i access this font parameter in my server method i get a remoting exception. the cause of this problem is clear (?): if i read a property value of this font object, the server tries to call the property accessor on client side...
meanwhile i call my method without font parameter and with parameters like fontname, fontsize(...) instead...
but that's not the smoothest way, i think!
is there a way to use font parameters without exception?
font implements iserialization - but why becomes it not serialized?
thanks in advance
|
|
|
|
|
Yes, the Font is serializable, but what channel are you using for remoting? If you are hosting your remoting object in IIS, it can only use the HttpChannel. HTTP - by nature - is one way. The server can't initiate communications with the client. With you pass the name, size, etc., these are all value types (except for strings, which behave similarily) and are pass-by-value without using them as properties or the ref and out keywords.
Also, what exactly is the exception? The Type and message would help.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I'm using a TCP Channel.
The Exception is something like that:
"The Remotechannel has no Channelreceiver, it means that the Server has no registered Serverchannel or that the Application has no matching Clientchannel to communicate with the Server."
The type of the exception is System.Runtime.Remoting.RemotingException
|
|
|
|
|
What type of client- or server-activated type are you using (and which one of those is it)?
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
it's a client-activated object (registered client type).
|
|
|
|