all groups > c# > may 2007 > threads for tuesday may 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 29 30 31
Preparing for C# Exam...Not much time...what's the BEST way?
Posted by samadams_2006 NO[at]SPAM yahoo.ca at 5/15/2007 10:52:09 PM
Hello,
I'm interested in taking the following exam for an upcoming job.
Exam 70-315: Developing and Implementing Web Applications with
Microsoft Visual C#=E2=84=A2 .NET and Microsoft Visual Studio .NET.
Since the job is being offered soon I need to know the "quickest" and
"best" way to pr... more >>
Save data on Website
Posted by shantanu at 5/15/2007 10:25:33 PM
Hi All
I need to update some data on a web page through the httpwebrequest.
For which i am writing the code below . Kindly tell me where the flaw
is as it is not updating the values.
Thanks and regards
Shantanu
WebNetCred = new System.Net.NetworkCredential("test","test123");
System.... more >>
DataContractSerializer: xml elements vs. attributes
Posted by cranley at 5/15/2007 10:19:14 PM
I've spent hours tonight trying to figure out how I can get my WCF
DataContract to serialize properly and I'm going nuts. The
DataContractSerializer, at this point, seems to me to be very
restrictive with regards to the final xml format. For example, from
what I can see, it only serializes XML... more >>
Passing XML as a parameter to a WS.
Posted by BLUE at 5/15/2007 8:35:00 PM
I've to pass one xml node at a time to a Web Service.
The Web Service will create an xml document and then will validate it
against a schema with qualified names.
What is the right parameter type I have to use: XmlNode, XmlElement or what?
Thanks,
Luigi.
... more >>
How can I fix this code??
Posted by Ron at 5/15/2007 7:53:34 PM
I have this code:
private void btnConvert_Click(object sender, EventArgs e)
{
// Get a directory
string path = @"c:\WAMP\";
foreach (string fileName in Directory.GetFiles(path,
"*.xml"))
{
XmlDocument xdoc = new Xm... more >>
array as out parameter
Posted by Hendri Adriaens at 5/15/2007 7:43:43 PM
Hi,
I want to write a method to read the first column from a textfile and output
them in 2 arrays to the main program. I don't know the length of the column
beforehand. I use out to avoid needing to assign the array a value, but
still, I get the following complaint:
Use of unassigned out p... more >>
C# Updatable Software
Posted by IsRaEl at 5/15/2007 7:23:33 PM
Helo everyone,
I'm doing a software that is installed on my clients, to transfer
files via WebService...
I need to do something that should update this software....when a
update the code, some bug fixes i wish to update all my clients...
Anyone have some articles about it?? some tips for ... more >>
how good is .NET's Random for making random numbers?
Posted by Zytan at 5/15/2007 7:09:49 PM
Anyone do any tests on it? I would assume it has improved since C's
rand(), but who knows. For some reason, and it could just be
coincidence, I seem to see patterns. But even a crappy rand()
function should be good enough to avoid that, so i may be seeing
things.
Zytan
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
.NET CLR 1.1 does not release the COM object reference.
Posted by johnxhc NO[at]SPAM gmail.com at 5/15/2007 6:51:26 PM
We have a project in .NET 1.1 , some of the .NET methods take COM
interface reference pointer as a parameter, somehow we have to call
Marshal.ReleaseComObject to release the COM Object, otherwise the COM
object will never get release, Even we call gc.Collect()
But the same code compiles in .NE... more >>
embedded resource file not found in assembly
Posted by Steve Richter at 5/15/2007 6:27:31 PM
I am embedding an xml file in my class library assembly.
In solution explorer I right click a folder, add , new item, xml file.
then on the xml file I right click, properties, build action =
embedded resource.
build the class library, run the following code to access the XML as a
stream:
... more >>
Reporting Technologies
Posted by Luiz Guilherme at 5/15/2007 6:03:26 PM
Dear friends,
I would like to know what you are using to generate reports on your WinForms
and Asp.net (web) applications. Crystal? Microsoft Reporting? 3rd party?
I am still lost on this part and I would like to have a better idea to
choose in which technology I will spend time studying.
... more >>
Serialization in Mono
Posted by Nikola Skoric at 5/15/2007 5:27:58 PM
I ran in Mono a program developed on .NET Framework 2.0 and it ran OK
until I tried to desirialize a object. There the program died abruptly
dumping this:
System.ArgumentOutOfRangeException: Value -8590321990885400808 is
outside the valid range [0,3155378975999999999].
Parameter name: tick... more >>
Multi-field sorting on dbgrid
Posted by Luiz Guilherme at 5/15/2007 4:51:04 PM
Hi,
I am a Delphi programmer and in Delphi the rows order of datagrid is given
by the sql query result, so, if I "order by" columns 1 and 2, the results
will appear ordered on the datagrid.
I am learning C# and I am trying to implement the Microsoft's suggested 5
layers design. This mean... more >>
Question on Visual Studio 2002/2003/2005
Posted by Amit at 5/15/2007 4:46:42 PM
Hello group,
I"m new to COM Interop and Add-Ins. Today I was reading an article
that says: "Use Visual Studio Tools for the Microsoft Office System to
create a new Excel Workbook project in Visual Basic .NET or Microsoft
Visual C#".
I"m using Visual Studio 2002 and I don't see any proje... more >>
foreach listviewitem in a background thread
Posted by deciacco at 5/15/2007 2:53:01 PM
How can I have access to the items collection of a listview control on
my form from a background thread?
I know I need delegates to update the listview control and I have those
calls in the foreach loop, but I'm not sure how to access the items
collection.
foreach (ListViewItem li in thi... more >>
Getting the window/control that lost the focus
Posted by james NO[at]SPAM nospam.com at 5/15/2007 2:37:01 PM
When processing the OnGotFocus event, I need to know the window/control that
lost the focus. Is there a way to determint this?
With MFC, you could use OnSetFocus which passed you the window that lost the
focus. It there something similar with a c# control.... more >>
How to switch from VB to C# on startup
Posted by Mark Hammer at 5/15/2007 2:05:26 PM
C# newbie here,
Launching VS, my start page assumes I'm using VB. Likewise when I start a
new project. How do I change default language to C#?
TIA,
Mark Hammer
Lake Oswego, Oregon, U.S.
... more >>
Create valid XML
Posted by Ludwig at 5/15/2007 1:58:13 PM
If I have an XSD, and I have to create an XmlDocument from scratch; do
I have to create the XmlDocument and then validate it using the xsd;
or is there a better way to create an XmlDocument to make sure that's
it's correct?
in other words: how do I have to create an XmlDocument if I have the
... more >>
Suppress debugger messagebox for unhandled exceptions in console app
Posted by Jon Davis at 5/15/2007 1:50:29 PM
Is there an app.config setting I can add or a System.Diagnostic.Process
property I can tweak to cause someone else's CLR 2.0 console app to not show
a base CLR dialog box offering to debug the app when an unhandled exception
is reached? On production systems, I still get a dialog box with Debu... more >>
datagridviewcolumn items databinding
Posted by kumag at 5/15/2007 1:18:44 PM
I'm using this column type binded to a datasource column. I would like
to use a string collection in another column of the same data source.
is this possible? is there like a ...databinding.add("items"... i
could use for this. please & thanks.
... more >>
Remoting and custom authentication
Posted by Smokey Grindel at 5/15/2007 1:12:14 PM
I don't want to use IIS, (design specifiaction) data security isnt an issue,
I just want to make a custom authorization and authentication system for my
remoting server... how would i do this? set up a custom channel sink pair?
any examples of something like this? I just need basic username an... more >>
Using Redemption to convert .eml to .msg (MIME to MAPI)
Posted by edw at 5/15/2007 1:00:46 PM
I want to convert rfc822 (.eml) files to MAPI (.msg) files. I do not
need to log in to Outlook to retrieve the messages, since the messages
have all been downloaded from the exchange server and are sitting in a
folder. I also do not need to save the converted file (.msg) to
outlook. I merel... more >>
virtuality and user-defined conversions
Posted by Wayne at 5/15/2007 1:00:04 PM
Are user-defined conversions chosen at compile time, or are there ways to
make sure that they are chosen at run-time, based on the actual type of the
object?
Here is a simplified example of what I'm trying to accomplish:
I have a method that has a parameter of type object. If the paramete... more >>
Referencing a Form from within a user class
Posted by RSH at 5/15/2007 12:57:31 PM
I have a situation where I am working with a user class and I need to
reference the form. Is it best to pass the form object to the constructor
of the class on instantiation, or to access it another way?
Thanks,
Ron
... more >>
Windowless process child
Posted by Darmac at 5/15/2007 12:28:55 PM
Hi, i'm new in this list so I don't know if anyone has asked
this...but...
I have a process (dos app instance) started like this:
_procStartInfo =3D new ProcessStartInfo();
_procStartInfo.FileName =3D appPath;
_procStartInfo.RedirectStandardInput =3D redirectStandardInput;
_procStartInfo.R... more >>
Declaring Data Buffer
Posted by Jonathan Wood at 5/15/2007 12:14:34 PM
I'm converting a project from C++ to C#. I need a structure with several
members that will be read from a file as a single block of data. But when I
try the following, I get an error for the data declaration that says "Array
size cannot be specified in variable declaration".
struct BLOCK_BU... more >>
Set Property for Controls by Name as a String
Posted by Mahmoud Al-Qudsi at 5/15/2007 11:28:15 AM
To make it easier for translators to convert my program to their local
language, I'm using XML files as translation dictionaries since its
much easier for deployment and production purposes.
This is a sample XML File:
<translation>
<language key="en_US" rtl="false">
<form1>
<button1... more >>
Tutorial For VB.NET Programmer
Posted by vbnetdev at 5/15/2007 11:01:02 AM
I am an experienced vb.net programmer looking to learn C#. Is there a good
book or tutorial designed for those of us in mind?
... more >>
Exception handling
Posted by Lubomir at 5/15/2007 10:33:01 AM
Hi,
Is it possible to set up C# compiler so that I would get a warning when I
miss any exception thrown by a framework?
Something like in Java, where the compiler forces you to handle all
exceptions.
Thanks,
Lubomir... more >>
Static, ReadOnly/Const array in a method
Posted by Martin at 5/15/2007 10:18:10 AM
Hi all !
Considering the code below, is it possible to declare this array
static and readonly/const in order to force .NET to allocate this
array only once instead of at each method call. Thank you for your
help !
public static int NbBitsOnOpt(int n)
{
byte[] PreComputedNbBitsOn = new... more >>
Testing for implementation if IComparable<T> regarless of <T>
Posted by Samuel R. Neff at 5/15/2007 9:50:59 AM
You can you program against generic interfaces generically?
For example, how can I make the following code which works for the
non-generic interface also work for the generic counterparts?
public bool Equivalent(ArrayList x, ArrayList y) {
if (x[0] is IComparable) {
x.Sort();
... more >>
need grid-style control
Posted by Zytan at 5/15/2007 9:45:02 AM
I know there's a DataGridView, but I think that's for synching the GUI
to data in a SQL database. Is there anything simple like a slightly
more complicated list box? Even if I could use a listbox of strings
which align the text into multiple columns with tabs I would be happy.
Zytan
... more >>
Making a list with radio buttons
Posted by Ian Toltz at 5/15/2007 9:31:56 AM
I'm working on a "pok=E9dex" for people who play Pok=E9mon. I need to have
a list of all the pok=E9mon, along with a set of radiobuttons for each.
I've initially tried a ListView control, with the details view, but if
it's possible to add a radio button I can't figure out how.
I know that I'... more >>
disabled Button's text glows when bg color of owner is changed
Posted by Zytan at 5/15/2007 9:00:28 AM
If you have a disabled button in a form (or tabpage) whose background
color is customized, the text on the disabled button will not be
gray. In fact, it becomes a *brighter* version of the backgrond color
of the button's owner, making it glow, destroying the apperance that
it is disabled.
Is... more >>
PaintEventHandler
Posted by shilpichaudhry NO[at]SPAM gmail.com at 5/15/2007 8:30:09 AM
Following is a method of the Control class defined in
System.Windows.Forms
protected virtual void OnPaint(PaintEventArgs e)
{
if (this.CanRaiseEvents)
{
PaintEventHandler handler = (PaintEventHandler)
base.Events[EventPaint];
if (handler != null)
{
... more >>
Understanding Abstract Factory Pattern
Posted by RSH at 5/15/2007 8:21:03 AM
Hi,
I am a fairly seasoned developer and have recently started looking at
software design patterns. I am starting with the Abstract Factory Pattern
and was wondering if someone could help me understand where I might use this
Pattern. I get the general concept but I am having a hard time c... more >>
Visual Studio 2005 Code Snippets is wrong (Search a Directory for Files Recursively)
Posted by Zytan at 5/15/2007 7:47:50 AM
You can download them here:
http://msdn2.microsoft.com/en-us/vstudio/aa718338.aspx
This snippet seems wrong:
Visual C# 2005 Code Snippets -> filesystem -> Search a Directory for
Files Recursively
I don't believe DirSearch will return any results for files in the
root directory originally p... more >>
Regex to remove \t \r \n from string
Posted by morleyc NO[at]SPAM gmail.com at 5/15/2007 7:10:12 AM
Hi, i would like to remove a number of characters from my string (\t
\r \n which are throughout the string), i know regex can do this but i
have no idea how. Any pointers much appreciated.
Chris
... more >>
How do you bind to a group of radio buttons in Windows Forms?
Posted by teddysnips NO[at]SPAM hotmail.com at 5/15/2007 6:14:04 AM
Back in the dim mists of antiquity I used to program in VBA for
Microsoft Access (hey, don't knock it - very useful tool for the right
application).
This had a really handy control in the toolbox called an Option
Group. It could contain any number of radio buttons (which Access
called Option... more >>
BackGroundWorker issue on Vista x64
Posted by BR at 5/15/2007 5:44:22 AM
Hi,
I am writing a small utility to perform system maintainence tasks on
Windows. In this, I am launching a MMC snapin as a process using
BackGroundWorker and using the "RunWorkerCompleted" event handler to
know when the snapin was closed. This works fine on Xp and Vista 32
bit and the RunWor... more >>
Generic casting
Posted by Mirtul at 5/15/2007 4:51:03 AM
Hi
I'm currently working with vbscripting through MSScriptControl. We have
shared some of our objects that should be available for scripting.
Some of the functions of these objects will return an interface to a class
that must be cast to the appropriate higher level class to use all
func... more >>
Treading and Paint
Posted by Jim Lewis at 5/15/2007 4:15:12 AM
I have a simple worker thread that does "BeginInvoke(UpdateUI)". In
UpdateUI I have "panel.Refresh ()" which the debugger shows is
executed. Yet a breakpoint in the panel's Paint handler never gets
called. And the panel is never painted. Can someone clue me in why
Refresh does not cause a Paint?... more >>
Application variables in csharp.
Posted by Control Freq at 5/15/2007 4:04:18 AM
Hi,
Still new to csharp. I am coming from a C++ background.
In C++ I would create a few top level variables in the application
class. These are effectively global variables which can be accessed
throughout the application because the application object is known.
What is the csharp equivalen... more >>
ListDirectory
Posted by Just close your eyes and see at 5/15/2007 1:58:02 AM
Hello All
I had used "WebRequestMethods.Ftp.ListDirectory"
but it returns a string contains html format
I thought it returns a string that contains files names
how we can resolve that?... more >>
How can I get the file name currently playing in Windows Media Player?
Posted by Garrett at 5/15/2007 1:08:28 AM
I'm writing a small program in C# that will sit in the system tray and
"monitor" Windows Media Player. I want the program to grab the file
name (and checksum) of whatever video a user is playing in Media
Player. I've looked at the WMP SDK, but haven't really found something
that can be used (i c... more >>
Error installing Service using installutil on .NET 2.0
Posted by eoinmoon NO[at]SPAM gmail.com at 5/15/2007 12:52:21 AM
Hi all,
New to C# and VS 5 and .NET. I have attempted to write a service via
various examples and after several failed attempts to write an
installer via the VS 5 wizards,etc I tried to install the service
manually using Installutil.exe utility.
Unfortunately I am getting an error very earl... more >>
Why can't I scroll back to the maximum value?
Posted by Sharon at 5/15/2007 12:42:00 AM
I'm using the VScrollBar and set it as follow:
m_vScrollBar.Minimum = -19602;
m_vScrollBar.Maximum = 0;
m_vScrollBar.SmallChange = 1;
m_vScrollBar.LargeChange = 1089;
m_vScrollBar.Value = m_vScrollBar.Maximum;
The scroll bar is set to start from the bottom.
It works fine but with one pr... more >>
Free database with simple deployment?
Posted by Preben Zacho at 5/15/2007 12:00:00 AM
I'm developing a small app and need a database for storing data on the fly.
I've looked a little into SQL Server 2005 Express Edition and it seems to be
working fine. I've added it to the prerequisites and performed a publish.
However, when I try to deploy it to a XP/Vista system I get all kin... more >>
Webservice throw 404
Posted by Oscar at 5/15/2007 12:00:00 AM
Hi,
I got a webservie that supply users with binary files based on a parameter
id. The method is void and I stream the file by:
HttpContext.Current.Response.ContentType = "application/xxx";
HttpContext.Current.Response.BinaryWrite(arrResult);
HttpContext.Current.Response.Flush();
HttpCont... more >>
how to print string esc characters
Posted by Peted at 5/15/2007 12:00:00 AM
Hi
im sending this string to a device
String cmd = ""N1\x0D")
this device needs the esc \x0D on the end where you see it
After i have sent this string i want to print it our to a rich
textbox, but the \x0D keeps performaing the CR
I dont want the CR to occur, i want the string to print... more >>
Functional programming: its got what coders crave!
Posted by Jon Harrop at 5/15/2007 12:00:00 AM
Read our free introduction to the F# programming language from Microsoft
Research:
http://www.ffconsultancy.com/products/fsharp_journal/free/introduction.html?u2
Register your interest in our journal:
http://www.ffconsultancy.com/products/fsharp_journal/register.html?u2
or even subscr... more >>
C#/specification bug?
Posted by cristalink at 5/15/2007 12:00:00 AM
C# Language Specification 1.2 says:
<<Exceptions that occur during destructor execution are worth special
mention. If an exception occurs during destructor execution, and that
exception is not caught, then the execution of that destructor is terminated
and the destructor of the base class (... more >>
|