all groups > c# > april 2006
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Critical Services
Posted by Ashish Jindal at 4/30/2006 8:53:14 PM
Hi,
How do I identify whether a service is "Critical" or not? Basically, I
am writing a program to stop all non-critical service.
AFAIK, the services can be found in
"HKLM\CurrentControlSet\Services\<name>". I am getting the names using the
ServiceController class (in System.Serv... more >>
Adding a Web Reference changes DataTypes ???
Posted by cc at 4/30/2006 8:41:26 PM
Hi,
I having created a simple WebService (in VS 2005) with just one WebMethod as
follows :
[WebMethod]
public DataTable GetProducts()
{
DataTable objDataTable = null;
// code for filling up the datatable
return objDataTable;
}
Then, Adding the WebService as a Web Reference to... more >>
Max. Thread Amount of Windows XP and / or Windows Server 2003
Posted by schuetz NO[at]SPAM gmail.com at 4/30/2006 5:15:02 PM
Hi @ll,
I'm working on a web project which has to use multiple channels to
connect to receive several sources at once. The problem is, that I'm
not aware of the maximum amount of Threads i can allocate to my
channels.
Can i open 10 threads, 100 threads even 1000?
is there a general answe... more >>
External Process Question
Posted by david.sargent NO[at]SPAM gmail.com at 4/30/2006 4:20:41 PM
I have a C# program launching an external process, say notepad. I have
the process hidden from the user, and want to be able to take
screenshots of the hidden program. I have searched around and found
people using Printwindow() with a pointer to the application, but every
time all I get is a b... more >>
Return XmlDocument using C# interop
Posted by Bart Roozendaal at 4/30/2006 1:31:30 PM
Hi,
I have setup a (my first) C# assembly. I am using the COM Interop services
to use the assembly from a Delphi program.
Is there a way to return a XmlDomDocument object from the assembly to the
Delphi program? If I try to return the XmlDocument object itself, I get an
error like:
Th... more >>
Desperately needing direction with EncoderParameters and saving images under different compression/quality schemes
Posted by NutsAboutVB at 4/30/2006 1:29:30 PM
Hello,
I am a .NET programmer and I have a JPEG image file (from digital
camera) of about 109 KB's in size, when I open it and save it
(without making any alterations at all, just going to File --> Save) in
MS Photo Editor, the file is automatically shrunk in size to 81 KB's.
When doing the s... more >>
Process.Start ignores WindowStyle
Posted by Paul at 4/30/2006 11:39:23 AM
Hi,
I am trying to start a process hidden. My code:
wordprocess = new System.Diagnostics.Process(); ;
wordprocess.StartInfo = new System.Diagnostics.ProcessStartInfo(wcmd,
args);
wordprocess.StartInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Hidden;
wordprocess.StartInfo.WorkingD... more >>
Synchronized Collection<T> Recommendation
Posted by Michael Primeaux at 4/30/2006 9:45:40 AM
What is the recommended pattern for implementing a synchronized
(thread-safe) class that inherits from Collection<T>? For example, I want
to implement a SyncRoot property [of type
System.Threading.ReaderWriterLock]. I do see where I can override
(protected) the methods InsertItem, RemoveIte... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Error 500 on oXmlHTTP.Send
Posted by RG at 4/30/2006 9:04:32 AM
I have an aspx web pages which interacts with an asmx service. The calls to
web service are done via Javascript.
The asmx service method has the following parameters:
public string RetrieveContact(string Id, int EntityTypeCode)
I am getting the following error when executing
oXmlHTTP.S... more >>
Global Assembly query.
Posted by Steven Blair at 4/30/2006 6:48:36 AM
My dll belongs to this namepsace:
namespace TS3Services.Development
My class is called LogError.
I have signed the assembly (key.snk).
Installing the dll to the gac appears to be successful, but I have two
issues:
1. In the GAC, only LogError appears. I would have thought it should
re... more >>
Logging Application Block - Databases Trace Listener???
Posted by amitos at 4/30/2006 5:08:20 AM
Hi!
I consider using the Logging Application Block, Enterprise Library, Jan
2006 in a major project. To date, I've found that some of its features
are not very well documented.
One important thing is logging to a database. I tried configuring a
database trace listener in the "Enterprise Lib... more >>
How to send a MemoryStream to Client
Posted by ad at 4/30/2006 12:00:00 AM
I have save a Excel file to MemoryStream.
How can I send this MemoryStream to client's HD as a excel file?
... more >>
How do you get the name of the Registered Company on a computer?
Posted by Patrick Blackman at 4/29/2006 9:49:36 PM
How do you get the name of the Registered Company on a computer?
Any ideas would be appreciated.... more >>
Fastest Way for Threads to Display on Picture Boxes?
Posted by eric_berlin NO[at]SPAM msn.com at 4/29/2006 4:07:12 PM
I am writing a multithreaded application that has 6 threads each
writing 5 frames per second video bitmaps to a different picture box.
I have just found out that only the main UI thread is supposed to
interact with Windows Fourms. What is the fastest way to have a non UI
thread safely write a bi... more >>
Where to store and document methods
Posted by Ranginald at 4/29/2006 1:35:22 PM
Hi,
I am generally new to OOP and in learning and writing code I have
developed many of my own reusable methods.
A. What is the best way to store these methods for easy reuse later?
I was thinking:
1. Word document (e.g. create a "code reference book")
2. create .DLLs to store related m... more >>
Possible To Set Topmost Property In A Web Browser?
Posted by Gary Brown at 4/29/2006 11:57:47 AM
Hi,
I need a web browser capable of handling video streams and that will
stay in front of the Z order. There are a number of video streaming
sources I watch that launch a browser window containing the video
from another browser page. I am almost always working on something
else while follow... more >>
How to allow users to hyperlink to items in a DataGrid
Posted by diatom NO[at]SPAM newsgroup.nospam at 4/29/2006 11:41:02 AM
Hello,
I have the items of a table bound to a DataGrid control on my web form. How
would I go about letting the user click on an item in the DataGrid control to
download the content.
For example, lets say the contents of my DataGrid control are a list of
articles. I want the user to be... more >>
Matching a string to a filename mask?
Posted by Brian Parker at 4/29/2006 11:06:19 AM
I have an ArrayList ( strings ) of filenames like such:
fred.out
inctructions.txt
luncheon01.jpg
luncheon02.jpg
luncheon05.jpg
luncheon11.jpg
HeebieJeebie.cs
...etc..
The user will provide a filename mask such as:
*.*
*.jpg
luncheon0?.*
...etc..
Is there a simple way to do a comp... more >>
COM StdPicture-to-Image conversion
Posted by Mark at 4/29/2006 9:28:25 AM
We're authoring a VS 2005 app that includes several EXE's and DLL's and also
uses a COM component (a customer requirement). The COM component provides a
graphic image to be used by the .NET app; the graphic is supplied as a
"StdPicture" (AKA, IPictureDisp).
How can I convert this to a .NET Ima... more >>
Downloading files
Posted by ssduli NO[at]SPAM gmail.com at 4/29/2006 8:06:28 AM
I am writing a web crawler to download all html and jpg files to a
directory locally. Since dns lookups present a possible bottleneck, i
have decide to incorporate a dns cache in the form of a hashtable. The
urls are resolved before they are passed onto the crawler for crawling.
My problem i... more >>
Can't run a C# Program Without VS2005
Posted by chris_doran NO[at]SPAM postmaster.co.uk at 4/29/2006 8:04:36 AM
Firstly, let me come clean and say I don't really know what I'm doing.
Classic tale: I'm using some code developed by a third party who is now
uncontactable. Further, he did it in C# and .NET which are a total
mystery to me. My bit of the project is done in C and links to his bit
which is a DL... more >>
Transfer string data to unmanaged buffer
Posted by Burkhard at 4/29/2006 4:31:01 AM
I declared a struct with fixed size buffers to send it to an unmanaged function
[StructLayout (LayoutKind.Sequential)]
unsafe struct RCSTKAS
{
public fixed Byte xValue1 [12];
public fixed Byte xValue2 [30];
...
}
Before calling the exter... more >>
how to casting a object inherit form Form to another object in c# 2.0
Posted by harvie wang at 4/29/2006 2:52:14 AM
Hi,
I want to implement a common Form with special interface, such as MovePoint(double,double).
I create a interface first:
namespace ABC.Test
{
public Interface IMyWindowInterface
{
void MovePoint(double,double);
}
}
then creat... more >>
String.Split
Posted by Wallace at 4/29/2006 2:41:09 AM
Hai All,
I am having a doubt in string.split, here the code sample
string str = "school college job";
note that there is '\t' spacing between each term in the string str.
how can I split this using split method??
Urgent... Please help...
Looking forward ... more >>
Question regarding exception....
Posted by Wallace at 4/28/2006 10:11:20 PM
Hai All,
I have one doubt, here is the code sample....
try
{
for loop
{
// doing some operations.....
}
}
catch(Exception e)
{
string str = e.Message;
}
If an exception occurs within the for loop and it will come ... more >>
Plugins
Posted by Alberto at 4/28/2006 9:55:21 PM
Does anybody knows where can I find information about building an
application using plugins in c#?
Thank you very much
... more >>
why float
Posted by Martijn Mulder at 4/28/2006 8:41:49 PM
Why is there a type float in C#?
Working with integers is best, of course. It is like carrying pebbles around
in your pocket. But if you need decimal floating point values, in graphics
transforms or in scientific programs, you take the highest precision,
double.
I can understand that lan... more >>
Memory leak in C#
Posted by Raja Gregory at 4/28/2006 5:49:39 PM
Hi All,
I have developed a server application in C#. While running this
application, it is not running more than 30 minutes due to memory leak.
Could you tell me what will be the problem?
Thanks & Regards,
Raja.GS
... more >>
Raw XML/SOAP communication.
Posted by Kalpesh Modha at 4/28/2006 4:34:58 PM
Hello.
I have written a web service consumer. The web service itself lives else on
any machine at our supplier.
How to I capture the XML/SOAP communcation between my consumer and the web
service.
the consumer is written in C#.
thanks for your help
Kalpesh Modha.
... more >>
Number type conversion
Posted by Pavils Jurjans at 4/28/2006 4:05:32 PM
Hello,
I am somewhat lost in the implicit/expicit possible/impossible type casting
in C#...
I need to write a class, which among other things, must have wat to read a
numeric value type, and internally convert it so that it could be saved in
database as real number (float). I plan to pro... more >>
uint64
Posted by Bob Allen at 4/28/2006 3:44:36 PM
I have no idea what group to ask this in so i will start here. Does anyone
have a good way of compressing a 19 digit number down to the smallest
possible number? I have a delima of having a uint64 19 digit number that i
need to fit into a 10 digit space. I have tried using byte comparisons and... more >>
Is it possible to center the text of a groupbox?
Posted by Marcel Brekelmans at 4/28/2006 3:10:50 PM
Hi,
Is this possible? Normally, you get a groupbox with the text at the left
side. I would like to have it centered. Is this possible?
Thanks
... more >>
Installing a Plugin into an application
Posted by JGAllen23 at 4/28/2006 2:16:11 PM
I have an application that has an interface for people to create
plugins and use them. Right now I just search for dlls that use my
interface in a specific folder. I want to create a filetype so the
user can download the plugin and then it gets added to my application.
I'm wondering what is ty... more >>
Exception .net activex loaded with axhost
Posted by Martijn Boven at 4/28/2006 1:15:15 PM
I created a activex control in c# (vs 2005)
--------------------------------------------
[Guid("41D7A3C7-B891-4379-BE33-5195A2CFF913"), ComVisible(true)]
public partial class ActiveTest : UserControl
{
public ActiveTest()
{
InitializeComponent();
}
}
---------------------... more >>
XMLNode --> Adding an Attribute
Posted by Andy at 4/28/2006 1:00:01 PM
Hello Guys:
What am I doing wrong with this code? I can't seem to get it to simply add
an attribute to my node. The node already exists. I am simply opening the
XMLDocument and creating one attribute to the document. I am not creating
the document new
XmlNamespaceManager xnsm = new X... more >>
how to write to UI after each row has been processed?
Posted by cooltech77 at 4/28/2006 11:50:02 AM
Hi,
I have a windows form with a button and a richtext box
On click of a button ,I am looping through a datatable which has 3600 rows
and i am checking some code for each column in the row.There are 300
columns.
So total iteraations are 3600*300=960000
eg
for(i=0;i<rows.count;i++){... more >>
Datagrid
Posted by Shahid at 4/28/2006 11:30:32 AM
I am trying to copy a report that was created in Crystal Reports and
attempting to do it in ASP.NET using datagrids, tables, etc.
I know I can integrate crystal with ASP.NET but we want to add more
customization to it.
I have had luck using tables but it is only because it is mostly
hardcod... more >>
Control Generic Type Parameter
Posted by Jinsong Liu at 4/28/2006 11:07:03 AM
Hello Group:
I am playing with .NET 2.0 Generic. I have a CarsList<T> Generic
class, Is it possible that I can control what T could be? I want to
ensure the T can only be classes derived from a specific class (lets
say Car).
I understand that I can create a CarList without using Generic, but... more >>
Disabling certain routines/properties when inheriting.....
Posted by UJ at 4/28/2006 10:28:59 AM
I am going to write a class that will inherit from SqlCommand and I want to
disable certain routines in the SqlCommand and add a couple of new routines.
How would I go about doing that? I understand (I think) the inheritance
process but I'm worried more about the disabling of the routines. I w... more >>
using ArrayList Collection class
Posted by diatom NO[at]SPAM newsgroup.nospam at 4/28/2006 10:00:01 AM
(Sorry if this is a re-post, don't think it worked the first time)
Hello,
I am trying to add an ArrayList as a field in my web form class.
Here is a sample:
using System;
using System.Collections;
....
ArrayList myArrayList = new ArrayList();
myArrayList.Add("Belleck Colleen Vase")... more >>
using ArrayList Collection Class
Posted by diatom NO[at]SPAM newsgroup.nospam at 4/28/2006 9:58:02 AM
Hello,
I am trying to add an ArrayList as a field in my web form class.
Here is a sample:
using System;
using System.Collections;
....
ArrayList myArrayList = new ArrayList();
myArrayList.Add("Belleck Colleen Vase");
myArrayList.Add("Belinda Bradshaw Cat Bowl");
myArrayList.Add("Nic... more >>
Bug in C# Compiler? (generics)
Posted by AnotherMike at 4/28/2006 9:17:01 AM
Hello,
Can anyone tell me why this won't compile. I'm getting the error:
"The type 'GenericsTest.GenericType3' must be convertible to
'GenericsTest.GenericType2<GenericsTest.IInterface2>' in order to use it as
parameter 'T' in the generic type or method 'GenericsTest.BaseCollection<T>"
... more >>
Namespace
Posted by John at 4/28/2006 8:47:02 AM
The following is defined in VB .NET 2003
' VB .NET 2003
Namespace MyNamespace
Public Class MyClass
End Class
End Namespace
In my C# project, 'using MySpace' causes error that says the type of
namespace cannot be found.
I added reference to the C# project. Please help. Than... more >>
How a control can detect when a form is being moved
Posted by timnels NO[at]SPAM gmail.com at 4/28/2006 8:31:25 AM
I have a control that paints a borderless form below it to act as a
grid combo box. When the parent for is moved I need the control to
detect that the parent form is moving/moved and move the child form
along with it. Can someone shed some light on my options here?
... more >>
Is there a file size limitation for System.IO.Compression?
Posted by leo NO[at]SPAM junquera.com at 4/28/2006 8:30:53 AM
I know there was a limit of 4gb on for some compression tools. Does
this limit exist for System.IO.Compression?
... more >>
Length of a struct
Posted by Stephan at 4/28/2006 6:27:02 AM
Hello NG,
I have two structs.
The only differnce is the order of the members:
public struct DataStruct
{
public UInt16 Sekunde;
public UInt32 BehälterId;
public UInt32 WannenNr;
public UInt16 Station;
};
public struct DataStruct
{
public UInt32 BehälterId... more >>
xpath Expression - Select SiingleNode
Posted by Andy at 4/28/2006 6:20:03 AM
Hello Guys:
I am having a little difficulty picking up how to perform an XPATH to get a
single value for an XML file.
<ICSMXML xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Header>
<MsgDelivery>
<To>
<Credential>
<Domain>ICSMID</Domain>
<Identity>105</Identity>
</Credential>
</To>
... more >>
Is a cast to string always possible without exception?
Posted by geronimi at 4/28/2006 4:59:20 AM
I wonder when an exception raises when I do this:
string str= (string)ds.Tables[0].Rows[0]["CODE"]
The row is always filled with data
If there is a dbnull.value in it, does it raises an error?
And for other data?
thx
... more >>
How to pre-allocation Harddisk space?
Posted by Chi at 4/28/2006 1:02:48 AM
According this
http://research.microsoft.com/research/pubs/view.aspx?tr_id=841
said, if you pre-allocation space for writing , it will be much faster,
but how can i do this?
Thank... more >>
C# Client browser, cookies enabled?
Posted by dawson at 4/28/2006 12:17:45 AM
I started off by trying to use the HttpCapabilitiesBase.Cookies
Property (Note: This property is new in the .NET Framework version 2.0)
however it kept on returning true even when I disabled cookies in both
FireFox and Internet Explorer.
After a bit of googling I found that a lot of people wer... more >>
|