all groups > c# > february 2006 > threads for wednesday february 15
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
How to remove item from 1 d array
Posted by Jeff User at 2/15/2006 9:29:04 PM
Hi
..net 1.1
I have a simple string array like
string[] myArray = CallToWebServiceThat_Returns_Elements;
I want to remove an item from the array and also remove its position.
I can search the array and find the index of desired string, but how
can I remove?
Do I have to somehow create a ... more >>
Encoding ISO-8859-1
Posted by Dale at 2/15/2006 8:21:26 PM
I am trying to create a System.Text.Encoding for ISO-8859-1 in a similar
fashion to this line that creates an Encoding for UTF8:
private Encoding encoding = Encoding.UTF8;
Then, I want to test that ISO-8859-1 Encoding like this line tests UTF8:
bool result = encoding is Encoding... more >>
Encoding string as double.
Posted by writebrent NO[at]SPAM gmail.com at 2/15/2006 8:16:44 PM
For database purposes, I need an easier /faster way of comparing two
strings for equivalency. I have the idea of somehow converting the
string to a unique number, storing that number in the database,
indexing the field, and going from there. I don't know exactly how to
do this, so I was hoping f... more >>
Practical Benefits of MVC or MVP Patterns
Posted by Jeff S at 2/15/2006 8:02:41 PM
Okay, I just finally figured out the Model View Presenter pattern as
presented by Martin Fowler
(http://www.martinfowler.com/eaaDev/ModelViewPresenter.html). I even got a
small model of it working in a Windows Forms app I created from scratch.
Pretty cool how the form is sitting there and ge... more >>
User Login & Application Security
Posted by Patrick Blackman at 2/15/2006 7:50:37 PM
Hi, need some info on implementing a multiuser winforms application,
specifically managing user logins and user preferences & access rights. Are
there any frameworks out there for this. I don't want to use windows
identity system. Any pointers would be appreciated.
... more >>
Generating COM dll to use in .NET
Posted by Jimbo at 2/15/2006 7:19:00 PM
Hi people,
About 9 months ago I used a tool that comes with Visual Studio 2003 to
generate an ITunesLib.dll file from the iTunes.exe. It allowed me to
access iTunes as a COM object from C#. I want to generate that file
again but can't remember what I did. Does anybody know what then name of ... more >>
Command line compilation of visual studio project files.
Posted by Emmanuel at 2/15/2006 7:14:54 PM
Hi,
I am using VS 2003 to build my (csharp) solution.
1. Is there a way to reveal the command line options that VS is using during
compilation of a project file, in order to build a batch file/makefile ?
2. Is there an option in the command line compiler that builds a VS project
?
3. I... more >>
Threading Faux Pa
Posted by russ.haley NO[at]SPAM gmail.com at 2/15/2006 6:43:11 PM
Threading and suspend
I have an application that will load x number of "communicators". These
"communicators" start up a communications channel with another
application(of no importance). The initial code loaded the object
model and then initialized the communications on the same thread, whic... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
User control properties--can't override base
Posted by David Veeneman at 2/15/2006 6:16:33 PM
I'm having trouble implementing a UserControl base property in a user
control that I am writing. My user control wraps a group box that contains
several radio buttons. I want to wire the user control's Text property to
the group box's Text property, like this:
[Browsable(true)]
public over... more >>
ADO.NET Failed to load msxmlsql.dll
Posted by Daniel at 2/15/2006 6:02:48 PM
ADO.NET Failed to load msxmlsql.dll
How to fix this error?
System.Data.SqlClient.SqlException: Failed to load msxmlsql.dll.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlComm... more >>
C# / SQL Related - what's wrong with this Insert Into syntax?
Posted by brianbasquille NO[at]SPAM gmail.com at 2/15/2006 5:38:05 PM
Hello all,
Strange little problem here... am just trying to insert some basic
information into an Access Database using OleDB.
I'm getting a "Syntax error in Insert Into statement" when it tries to
execute the SQL. The strange thing is if i take the exact SQL being
executed from the debugge... more >>
runtime creation of DTS package in C#
Posted by juventusaurabh at 2/15/2006 5:20:40 PM
Thanks ppl for your help.
I actually need to create a DTS package runtime, add tasks to it (to
convert text file to sql table) and validate the data in tables.
Can anyone plz help me with runtime creation of package in C#.Net
Thanks
... more >>
Converting to PDF
Posted by Kevin Lawrence at 2/15/2006 5:06:51 PM
Hi al
I want to convert a set of data into PDF format, I haven't used Acrobat Writer
or anything but I was wondering how easy (or difficult) it is to pump data
into a PDF?
Thanks
Kev
... more >>
Webservice trouble!
Posted by jens Jensen at 2/15/2006 4:38:19 PM
Hello,
I need to call a webservice with an
System.Xml.XmlDocument objet and read the return value into and
System.Xml.XmlDocument. The webservice was written with an oracle tool and
wrapped into a .net webservice.
I have added a reference to my dotnet wrapper and i get the following... more >>
.net framework AND Unix code for encryption/decryption.
Posted by tfoxusenet NO[at]SPAM gmail.com at 2/15/2006 4:29:52 PM
Hi, I need to encrypt/decrypt some data for my C# application that can
also be read on a unix system, and need a quick, simple, cross-platform
solution I can embed in my own code that doesn't require dependencies
on outside applications.
I don't know much about encryption. What I would like t... more >>
multiple comboBox one array datasource. help...
Posted by TheMadHatter at 2/15/2006 4:22:26 PM
I have an array of a custom obj which I am trying
to use in multiple comboBoxes without creating multiple
copies, but if I put the datasource of the comboboxes to
the same array, then at runtime if I pick change a combobox,
all of them change to that value. I am guessing that it is
because al... more >>
One last question about ASP.NET 1.1 application recycling, load time and other boring stuff
Posted by Ravi Ambros Wallau at 2/15/2006 3:42:03 PM
Dear friends:
This is my third question on this news in three days... Sorry for this
spam behavior :-)
I've a lot of problems on "first page load" after some change on
web.config or even in the contents of bin folder...
Nathan Sokalski passed me a link to ILMerge library, I've mad... more >>
Deploying from command line
Posted by Frank Rizzo at 2/15/2006 3:22:51 PM
I have a SmartClient/ClickOnce application. And it deploys nicely
straight from the IDE to the web server. However, I'd like to deploy it
from the command line (preferrably as a part of a nant script)?
How do I do this?
Thanks... more >>
Catch block is failing to catch exceptions when not run from MSDev
Posted by CodeSlayer at 2/15/2006 3:16:07 PM
Hi all,
This one really has me and the other .Net developers at my work
stumped. I have an application that is doing the following:
1 - attempt to validate that user can create a windows task via COM
interops
2 - an exception is thrown because user doesn't exist
3 - Exception is caught by ... more >>
Net 2.0 XmlWriter Create and Attributes
Posted by jschell at 2/15/2006 3:10:27 PM
The following two cases behave differently in Net 2.0. The
Case_Create_StringWriter throws an exception while the Case_XmlTextWriter
does not.
Is there a problem with this code?
Or is this a known problem?
--------------------------------------------------------------------------
usin... more >>
Storing SQL
Posted by Demetri at 2/15/2006 3:04:28 PM
Unfortunately, where I work it is forbidden to use stored procedures. I know,
I know...it's pretty stupid. But I can not change that.
Anyway, currently we have our sql stored in an embedded resx file as name
value pairs. At runtime a ResourceManager class is instantiated and a key is
passed... more >>
.NET 2.0 DataGridView
Posted by dm1608 at 2/15/2006 2:58:17 PM
Hello, I'm manually populating a DataGridView instead of using Data Binding.
How can I clear the contents of all the rows and/or header quickly? My
current method is to loop thru the grid backwards and delete each row
separately; which is kind of slow.
Thanks
... more >>
Search through list of tasks in task manager
Posted by Marcus at 2/15/2006 2:52:45 PM
Hi,
I am a newbie at C#. Here is my current problem:
I want my application to iterate through the list of tasks presented in
task manager. I want it to look at the task names and if a certain task
exist in the task list I want to kill it (as nice as possible).
I started the task manager w... more >>
Threading Best Practice Question
Posted by RWF at 2/15/2006 2:22:28 PM
I have read that when using asynchronous IO it is best to keep all your
operations asynchronous. But why if there is nothing left do in the
AsyncCallback method other than to call an IO operation? Example:
//DeliveryHelper is just a class containg an TcpClient and other state
traced varia... more >>
Impossible to capture stdOut??
Posted by AxOn at 2/15/2006 1:53:17 PM
Hi!
Has anybody encountered console exe's that are impossible to get stdOut
from? Does anybody know if there are different(other then string text)
ways that console exe files send out their outputs??
... more >>
Creating a new instance of a class
Posted by Helter Skelter at 2/15/2006 1:49:26 PM
hi,
i want to create a new instance of the MailMessage class in ASP.NET. i have
used <%@ include System.Net.Mail %>.
my code is:
<script runat="server">
//Create a new instance of the MailMessage class
MailMessage fdBk = new MailMessage();
</script>
but whe i try to type some more... more >>
Limited Size String
Posted by Michel Racicot at 2/15/2006 1:38:20 PM
In some language, it's possible to specify a "predefined" size for string
objects.
Exemple: string[10] which is a string of 10 characters.
Is it possible to do this in C#?
Thank you
... more >>
Can't instantiate Excel app object in ASP.net app (permissions issue)
Posted by Ronald S. Cook at 2/15/2006 1:36:44 PM
The following line in my ASP.NET 2.0 app will not execute because of a
permissions issue.
Excel.Application objApplication = new Excel.Application();
How/where do I make the setting to allow this?
Thanks,
Ron
... more >>
Multiple projects in a solution - debug different ones?
Posted by UJ at 2/15/2006 12:55:23 PM
Is there a way when you have more than one project in a solution to debug
each of them? The only way I've seen to be able to run the multiple pieces
is to have one set as the default project and then run the executable for
another. Problem is you can't debug the other one - only the one that i... more >>
nant exec task: i need the return code!
Posted by prempel NO[at]SPAM gmail.com at 2/15/2006 12:21:22 PM
Hi, I couldn't find a nant user group here, so thought i'd try this.
I run an external program from nant (robocopy) and unfortunately, it
returns 1 on success. Nant interprets this as a failure. I want it to
continue when it gets a 1 back (and possibly certain other codes), but
fail otherwis... more >>
Diagnostics.Process - Error Handling
Posted by Andy at 2/15/2006 11:52:50 AM
Hello Guys:
How would I be able to check if a .bat file I call had an error associated
with it? I have the following code to shell out to a batch file. However:
if an error occured: how would I be able to trap for this error? Is it as
simple as a try...catch? I have been uncessful in ... more >>
TabPage text disapearing
Posted by Dennis C. Drumm at 2/15/2006 11:46:29 AM
I have an odd occurrence taking place. This has been verified on two
different computers running Windows XP Pro, sp2 and Visual Studio 2005 Pro.
When I add TabControl to a Windows Form and change the Alignment property
from Top, to Left, the tab's test disappears and also does not show when t... more >>
Using Logging by Microsoft Enterprise Library without using "the configuration tool" ?
Posted by zahaby NO[at]SPAM gmail.com at 2/15/2006 10:47:00 AM
Is it applicable to use the Microsoft Enterprise Library in Logging
without using the configuration tool ?
I would like to configure and choose the trace listener
programmatically .
Thanks in advance.
... more >>
Shared Named Memory
Posted by Maxwell2006 at 2/15/2006 10:45:13 AM
Hi,
Is there a concept of shared named memory in .NET to allow multiple program
use the name and then set/retrieve values?
Thank you,
Alan
... more >>
Data Abstraction Layer SQL/Foxpro
Posted by DKode at 2/15/2006 10:16:38 AM
Hello,
I am creating a data layer that will handle SQL(SQLClient) and Visual
Foxpro (OleDb). The way I am thinking about creating it is create a
base class that handles setting of connectionstring and accessors for
IDbAdapter, IDbCommand, IDbConnection etc..
then in the derived classes I ha... more >>
The @ symbol
Posted by knowthediff NO[at]SPAM gmail.com at 2/15/2006 10:02:05 AM
hello,
What does the "@" symbol do in the following line of code? I tried
searching the web but searching for "@ and c#" seems to be a waste of
time :)
FileInfo fi = new FileInfo(di.FullName + @"\myxmlfile.xml");
Thanks,
-J
... more >>
Impersonation causes a server error
Posted by Phil at 2/15/2006 9:47:41 AM
Hi,
I've currently setup a local user as described in:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnne...
This users has been created on the remote server, and locally on our
web farm servers. All access to NTFS file system has been setup and the
users loca... more >>
Email Form in ASP.NET
Posted by Helter Skelter at 2/15/2006 9:29:29 AM
hiya,
i would like to make a contact form in my website. i've looked all over the
web for instructions but none of them work.
in case you dont know what i mean, i want a form with fields like name,
email address and comment and i want the submitted values to be sent to my
email address.
... more >>
Counting lines in a text file
Posted by Mark..... at 2/15/2006 9:20:29 AM
Hi,
Can someone tell me the easiest way to count the number of lines in a
text file?
I can write a loop to do this but it seems cumbersome.... there must be
an easier way??
Thanks in advance
... more >>
Coding Standards
Posted by UJ at 2/15/2006 9:16:55 AM
Folks,
Can anybody point me towards a site that explains the Microsoft Coding
Standards? I downloaded FXCop and understandably it's complaining a lot.
I do have questions though:
1. What if any prefixes should be used to define scope of variables.
2. How are people naming propertie... more >>
Newbie Q: Window Form Modifications during run-time: C#
Posted by Defender at 2/15/2006 9:00:39 AM
Hi All,
This is my first post.
I have written a Windows Form Program (lets call it WFPA) that pops up
another windows form and threads it off (lets call this second form
WFPB). Within WFPB I have a group box. This GroupBox contains several
CheckBoxes. Everything works great.
Now, durin... more >>
Windows Service - Suggestions for Installing Multiple Instances
Posted by John at 2/15/2006 8:58:48 AM
I currently have a Windows Service that runs Transactions that are very
Processor/Memory Intensive. I have a requirement to deploy multiple
instances of the Web service on the Same server. Each Instance needs to
run in its own process.
My current approach to this is to put all the logic i... more >>
Ending a Session in a Web Application
Posted by accyboy1981 at 2/15/2006 8:39:30 AM
Hi,
I'm relatively new to C# and am having some problems with sessions. I
have a web application where the user logs in to add comments to a
database. Once the user is logged in this opens the sessions. What I
want to do is to end the session when the user either closes the web
page or naviga... more >>
? bug in listbox.AddRange : duplication
Posted by andrewcw at 2/15/2006 8:31:32 AM
Who can explain this ?? : I expect 2 but I get 4 items !
private void button1_Click(object sender, EventArgs e)
{
object[] bunchOfStuff = { "foo", "fee" };
listBox1.Items.Clear();
System.Windows.Forms.ListBox.ObjectCollection lboxObjCol = new
Li... more >>
Deciphering data
Posted by booksnore at 2/15/2006 8:06:32 AM
OK - this probably isn't the right forum for this question but seeing as
I'm desperate and also that I want to code the solution in C# I thought
I'd start here first and then branch out to other newsgroups as
appropriate.
So the issue is I have data from a cliemnt (or from a manager who got
t... more >>
returning to site root
Posted by Lee Roth at 2/15/2006 7:53:32 AM
I want to return to the website root directory in order to use a
consistent link across multiple pages. I was told using
"~/folder/page.aspx" would get me to page.aspx no matter what directory
I start in but now I am just getting that to link to
"http://server_name/original_folder/~/folder/page.... more >>
Making my DateTime object think its American :-)
Posted by Simon Harvey at 2/15/2006 7:52:54 AM
Hi all,
I'm having a bit of a problem working with dates. My computer is british,
but I'm developing an american application so I therefore need to use american
dates. But I can't get my DateTime object to "act" american.
Let me give an example:
In order to take in an american date, I ... more >>
Simple mechanism for updating database with data from bound datagrid
Posted by Greg at 2/15/2006 6:46:09 AM
I'm using the Framework 1.1, so I don't have access to the new
DataGridView object.
What I'm wondering is, is there a really simple way to bind a plain
datagrid to a database in such a way that changes made to cells in the
datagrid call an update on the corresoonding data within a database?
I... more >>
Color subtraction
Posted by paul NO[at]SPAM paullee.com at 2/15/2006 6:19:54 AM
Hi,
I have two bitmaps that look the same, except in color. Is there a
simple way to "subtract" the color of one bitmap, pixel by pixel so
that only the difference in colour remains. For instance, if I take a
pixel at point (50,75), and find that the colours are FF00FF and FF0000
respectively, ... more >>
TextBox event handling in C#
Posted by Anup at 2/15/2006 5:01:18 AM
Hi Group,
In my C# project there is a 'Search Utility' now, when user type search
key in TextBox and presss enter the 'Search Button' should
automatically get pressed(clicked) and user should not have to click on
the 'Search button provided' (Similar to any search utility like
google)
I a... more >>
keyboard hook in c#
Posted by jpierson NO[at]SPAM gmail.com at 2/15/2006 4:38:02 AM
Hi,
I am tryin to create a keyboard hook that sends the keystroke ctrl +
pause/break.
I haven't used keyboard hooks before so I'm not too sure how to use
them
public int MyKeyboardProc(int nCode, int wParam, int lParam)
{
// perform operation
}
I have to implement this method ... more >>
ListviewSorter not working properly.
Posted by archana at 2/15/2006 4:36:24 AM
Hi all,
I am facing some strange problem in listview in .net.
I have written one class for sorting of listview which i have derived
from icomparer.
Now i am adding some element to listview and then i am setting
listitemsorter property of listview to my first column.
Say support i am adding... more >>
IDE keyboard goes whacky
Posted by nhmark64 NO[at]SPAM newsgroup.nospam at 2/15/2006 3:21:38 AM
Hi,
Sometimes when I am cutting and pasting it looks like the keyboard
layout changes; for instance ',' and 'w' are interchanged. Is there
a better way to fix this problem than exiting then restarting the IDE?
Thanks,
Mark... more >>
Using Cache methods in dll
Posted by g_srileka NO[at]SPAM hotmail.com at 2/15/2006 2:59:51 AM
Shall i use Cache class and its methods for creating c# dll file.
i tried to access insert and get methods of Cache ,but i couldn't get
it ,even i imported System.Web.Caching .
i am getting
An object reference is required for the nonstatic field, method, or
property 'System.Web.Caching.Cache.... more >>
Trigger process when a file arrives
Posted by JohnSouth at 2/15/2006 2:57:39 AM
Hi
I've a requirement to run a database update process whenever an XML
file is copied into a particular directory.
I could create a program to run as a Windows Service that keeps looking
into the directory, but that seems rather inefficient. Is there a
better way of triggering a process wh... more >>
'System.ArithmeticException' occurred in system.drawing.dll
Posted by conckrish NO[at]SPAM gmail.com at 2/15/2006 2:56:49 AM
Hi all...
I am trying to create a Windows Application in VS.NET. If I
create a new app in either VB or C# and add any control, I get the
following message
when I run the app:
An unhandled exception of type 'System.ArithmeticException' occurred in
system.drawing.dll
Additional inf... more >>
hello again
Posted by blah at 2/15/2006 2:49:37 AM
why are my posts getting deleted?
... more >>
Socket Bind (Virtual Local EndPoint)
Posted by Jonathan Woods at 2/15/2006 2:44:35 AM
Hi there,
Please find file for illustrating infrastructure -->
http://test.thipparath.com/GPRS/GPRS.jpg . Gateway receives packets
from Trucks for processing Route/GPS position. When Truck and Gateway
communicate in leased line, Gateway identifies different IP sent by
different truck. Where c... more >>
System.Collections.Generic.Queue & System.Collections.Queue Synchronized Method
Posted by nhmark64 NO[at]SPAM newsgroup.nospam at 2/15/2006 2:18:31 AM
Hi,
Does System.Collections.Generic.Queue not have a Synchronized
method because it is already in effect synchronized, or is the
Synchronized functionality missing from
System.Collections.Generic.Queue? Putting it another way can I
safely replace a
System.Collections.Queue.Synchronized(... more >>
Is there a way to convert .flv file to mp3 file in C#?
Posted by firejump NO[at]SPAM gmail.com at 2/15/2006 1:27:40 AM
Hello!
Is there a way to convert .flv file to mp3 file in C# application?
May be some 3 - rd component has this functionality?
Thanks for any help!
... more >>
graphics rendering with separate pop up form
Posted by Daniel at 2/15/2006 12:22:19 AM
Hey guys
I have an app running a directx window, that part is fine but as you know it
runs on an infinite loop redering frames per second.
My issue is this is for a gaming app i am making that requires a lobby. I
want users to see the lobby then see the game they choose open up ina
separ... more >>
form inside a form
Posted by Jessica Weiner at 2/15/2006 12:09:54 AM
I have two windows forms in an application. I want one form to be embedded
into the other. How can this be done? Can I do something like:
Form1.Controls.Add(Form2);
Thanks.
Jess
... more >>
Question about attributes
Posted by David Dvali at 2/15/2006 12:01:17 AM
Hello.
How can I create attribute and specify that it can be applied only to the
non private fields or properties?
Thank you
... more >>
Copy protection software
Posted by John at 2/15/2006 12:00:00 AM
I would like to use some third party software for copy protection, software
that prevents from copy paste program to another computer (not obfuscator).
I am looking for some good solution (hardware lock is not an option).
Can you reccomend me software based on your experiences?
... more >>
Is it an error on msdn document?
Posted by Franz at 2/15/2006 12:00:00 AM
http://support.microsoft.com/?kbid=317109
In this document, the NAR method for C# is as follow.
private void NAR(object o)
{
try
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(o);
}
catch {}
finally
{
o = null;
}
}
What is th... more >>
MouseEventArgs and a Clicks property
Posted by Marcin_Grzêbski at 2/15/2006 12:00:00 AM
Hi,
I'm working on control that uses a MonthCalendar.
A MonthCalendar have not a DoubleClick event, so
i tried to use the events related with MouseEventArgs
parameter. I was trying to check "Clicks" property, but
it returns always 1.
Is there any chance to get "Clicks" greater than one?
T... more >>
Is there anything like __FILE__ and __LINE__ ?
Posted by wsq at 2/15/2006 12:00:00 AM
in C++ we can use __FILE__ and __LINE__ to help us locating the bug, is
there anything like these in C# ?
thanks,
wsq... more >>
Selecting a region in a picturebox
Posted by Andrew Bullock at 2/15/2006 12:00:00 AM
Hi,
I want to crop a picture in a picturebox by allowing the user to select
a rectangular region like you get in software like Photoshop.
Is there any prefabricated solution to creating such a selection window,
or will I have to code it myself?
Thanks
Andrew... more >>
Usage of Remote Proxy Pattern
Posted by Marcel Hug at 2/15/2006 12:00:00 AM
Hi NG !
I have the following situation:
I have a database on a server in my network and few client-computers on
which my software runs. My software must connect the database on the network
and makes readable requests on it. To be open for extensions (one day the
lib must support writeable reque... more >>
|