all groups > c# > october 2007 > threads for tuesday october 23
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
RequiredFieldvalidator displays error too early
Posted by Preben Zacho at 10/23/2007 11:45:56 PM
Hi there
I have a RequiredFieldValidator that displays the text "Required field" for
a textbox. The problem is, that the text "Required field" is displayed
BEFORE the user presses the button to accept the form. Why does this occure?
Must be some setting I've missed, cause in other forms it ... more >>
C#- coordinate system, drawing
Posted by Petra Rohmer at 10/23/2007 11:45:42 PM
Hello,
I want to ake following
0,0 (900mm,900mm)
--------------------------------------
|....................................|
|....................................|
|....................................|
|....................................|
|....................................|
|.... more >>
Cast to Int and Decimal
Posted by RP at 10/23/2007 11:14:49 PM
I want to Cast the following code lines.
[Cast To Int]
Product.ProductID = dvProduct[0]["ProductID"].ToString();
[Cast To Decimal]
Product.UnitPrice = dvProduct[0]["UnitPrice"].ToString();
dvProduct is a DataView.
... more >>
Q: Release a class from memory (NewBee quiz)
Posted by Martin at 10/23/2007 11:13:50 PM
Hi!
I have a class like this
Class MyClass
{
Public MyClass()
{
// Doing stuff
}
private string myVar;
and a lot of more code.
}
Now in my Main program i declare this line
private MyClass myClass;
and in a procedure i do the folowing
pri... more >>
Session Expiry - the session expired after a number of hours of inactivity, although Session Expiry was set to 24 hours
Posted by fijsolam1981 NO[at]SPAM gmail.com at 10/23/2007 9:52:51 PM
Hi,
I had created a web application where Session expiry was set to 2,000
minutes in IIS. in web config i had given like this
<sessionState timeout="2,000" mode="InProc"></sessionState> but MY web
application was left logged in at 18:00 15th Oct, but on the following
day 08:30 16th Oct, the ses... more >>
BinaryWriter, don't close stream
Posted by Peter Morris at 10/23/2007 8:07:59 PM
Can I use a BinaryWriter without it closing the underlying stream?
I want to save information to a MemoryStream using a BinaryWriter but I want
to dispose of the BinaryWriter and keep the MemoryStream in case I wish to
reload information from the MemoryStream using BinaryReader.
Than... more >>
does a software architect need UML skills?
Posted by not_a_commie at 10/23/2007 7:55:01 PM
If you were going to hire a software architect / functional lead for
your project (written exclusively in C# including WPF, WCF) would you
require that they have UML skills?
Is being able to draw the standard UML diagrams in a notebook
sufficient, or would you require that they have some exper... more >>
Datagridview
Posted by R.A.F. at 10/23/2007 7:22:02 PM
Hi,
I have a really stupid question about DataGridView.
how dynamically create and display it on the form ?
i tried :
DataGridView myGrid = new DataGridView();
myGrid.Columns.Add("col1", "Column 1");
myGrid.Show();
but it does not work, so i miss something, but what ?
i've read the d... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Creating a dataset?
Posted by TonyJ at 10/23/2007 3:44:04 PM
Hello!
Is always easier and better to create a typed Dataset by using Data Source
Configuration Wizard instead of with the Dataset Designer
//Tony
... more >>
Has if () syntax of C# no IN operator like Pascal or SQL (IN, LIKE, BETWEEN)?
Posted by Rudi at 10/23/2007 3:34:28 PM
Hello!
I'm searching like a similar syntax for if():
int i=5;
if (i in [1,3,5..10]) doSomething;
e.g.
enum TaskStates {Idle,Proc1,Proc2, ... ProcN}
static TaskStates taskState = TaskStates.Idle;
if (taskState in
[TaskStates.Idle,TaskStates.Proc1,TaskStates.Proc2,TaskStates.Proc5 [... more >>
Anonymous Method / no type / no return
Posted by Andrew Robinson at 10/23/2007 3:28:41 PM
Is there any general purpose delegate that will allow me to call a method
anonymously. The delegate does not pass any data as part of the method
signature and has a void return. Data is passed as part of the method body.
I am thinking something along the line of Action<null>. Just wondering if... more >>
PInvoke Marshalling....
Posted by Daniel Bass at 10/23/2007 3:06:38 PM
Greetings!
I'm trying to call this method in a c# app...
SNAPIDLL_API int __stdcall SNAPI_SetCapabilitiesBuffer(HANDLE
DeviceHandle, unsigned char *pData, long max_length);
So far I've got this:
[DllImport("Dependencies\\SNAPI.DLL")]
public static extern int SNAPI_SetVersion... more >>
How to specify application parameters to .NET service installer
Posted by Dave at 10/23/2007 2:57:14 PM
I have a Console app, a related Service Project and Service Setup /
Installer Project. I would like to have the result of running the
installer.msi file register the service to run with certain
parameters.
How do i specify parameters that the application needs to start up /
run with?
is it ... more >>
create nullable type with string
Posted by Dan Holmes at 10/23/2007 2:41:34 PM
i need to get an object of type Type when i have a string. That is the
easy part (Type.GetType("int")). What if i want that type to be
nullable? This doesn't work Type.GetType("int?"). It returns null.
This does work but i don't know how to know all that information at runtime.
Type.Ge... more >>
Can i decompile * All * the .NET applications ?
Posted by Enrico Ghezzi at 10/23/2007 2:39:34 PM
Hi
Can i decompile * All * the .NET applications for extract original source ?
Can i recompiler the source ?
... more >>
Am I using ThreadPool the right way?
Posted by Ricardo Vazquez at 10/23/2007 2:24:38 PM
Hello everybody,
I'm programming a TCP server.
During the stress tests I noticed that maybe my socket-receiving thread
became deaf after an hour of heavy stress.
I think that the reason could be this: The processing of the received
messages. Something goes wrong in this processing and the cod... more >>
programming with windows CE???
Posted by TheMadHatter at 10/23/2007 1:33:03 PM
A few quick Q about windows CE.
What development tools does one need to dev applications with
windows CE? I was looking at the price breakout of Windows CE;
the price for dev tools was ~1000$, but I couldn't figure out
what tools they talking about. Is it just VS? or is it another software
pa... more >>
ArrayList ToArray() throwing exception (concatenate double[])
Posted by Michael Howes at 10/23/2007 1:07:20 PM
I have many double[] that each have a few thousand numbers in them.
I need to concatenate groups of these double arrays into a new set of
double[].
I don't know the total # of points.
I thought it would be fairly easy to add these different double arrays
to different ArrayLists an... more >>
extending system class
Posted by active T at 10/23/2007 1:03:32 PM
Is it possible to extend the system classes?
I want to create a function for converting a DateTime into a TimeSpan.
Any Ideas?
at the moment i've created:
public class Convert
{
public static TimeSpan DateTimeToTimeSpan(DateTime value)
{
return new... more >>
Good C# Code Beautifier?
Posted by Chris Mullins [MVP - C#] at 10/23/2007 12:44:47 PM
We've got a lot of code we're about to migrate from .Net 1.1 to .Net 3.5.
This code has, shall we say, a somewhat organic coding style. I would like
to run all the code thorugh a C# Beautifier that complies with the Microsoft
standards for formatting and such. I'm not looking to change variab... more >>
Try/Catch
Posted by SMH at 10/23/2007 12:30:43 PM
Hi,
I am making the transition from VB to C#
I am struggling to get my try/catch to work. For some reason, the
exception is not caught. My code is below, any help will be much
appreciated.
Thank you.
Simon.
protected void btnDownloadFile_Click(object sender, EventArgs e)
{
... more >>
CodeDOM sealed class with virtual properties
Posted by Dan Holmes at 10/23/2007 10:59:59 AM
I have code that generates a class.
[Serializable()]
public sealed partial class ProductInfo {
private string _ProductID;
....
public virtual string ProductID {
get {
return _ProductID;
}
set {
... more >>
XML Node Retrieve
Posted by Soulless at 10/23/2007 9:55:46 AM
Hi, I am trying to retrieve a value from a node in an XML document and
cannot.. .any ideas?
Here is my code:
string isDBConfig =
System.IO.Directory.GetCurrentDirectory().ToString() + "\
\dsconfig.XML";
XmlDocument doc = new XmlDocument();
doc.Load(isDBConfig... more >>
Textbox Sum
Posted by BD at 10/23/2007 9:30:27 AM
I have a windows form bound to 2 tables. Main table is orders for one
customer, second table is for line items related to one customer's
order. The second table is bound to datagridview where I have created
local column (Sub-Total) to multiply unitprice by quantity. I want to
place a textbox ... more >>
COM MessageBox in need of Closing
Posted by Mike R. at 10/23/2007 9:30:22 AM
I am creating an application that utilizes a COM application. In certain circumstances, the COM app will create an inaccessible message box which will prevent the first application from working (a deadlock). How do you monitor the COM message loop and dismiss the messagebox when it occurs, using .NE... more >>
Visual Studio Test Wizard
Posted by randy1200 at 10/23/2007 8:45:00 AM
I'm using Visual Studio 2005 Team Edition for Software Developers.
I've created new a test project and tests using the wizard under Test -> New
Test... That seemed to work.
I checked in my new test cases last night. This morning, I checked out my
new test case project, my solution file, an... more >>
NOOB QUESTION: How can I access an element in nested classes
Posted by hstagni at 10/23/2007 8:41:58 AM
Here is a sample to explain my problem
class Foo
{
int a;
class Bar
{
void ChangeA()
{
a = 1;
}
}
}
function ChangeA() does not work because 'a' doesn't belong to Bar; it
belongs to Foo. So the question is: how can I make... more >>
Framework 1.1 apps in VS2005... Runs???
Posted by Férnas at 10/23/2007 7:31:34 AM
Hello All...
Actually, I use Framework 1.1 and VS2003... I'm migrating to Framework
2.0 and VS2005. My doubt is following:
Can I open My old apps that runs over Framwork 1.1 in VS2005 or I need
to keep VS2003 to work with 1.1 and VS2005 to work with 2.0..
Thanks!!
... more >>
Testers & Reviewers Needed for Open Source .NET Project
Posted by Mike at 10/23/2007 7:27:18 AM
I am looking for volunteers to help review the source code and design of
NValidate, an open-source parameter validation library written in C#. It's
purpose is to streamline your parameter validation code, and make it easier
to write, so that you're more likely to do it consistently and correct... more >>
C# instead of Visual Basic
Posted by bg_ie NO[at]SPAM yahoo.com at 10/23/2007 5:06:35 AM
Hi,
Do any of you know when C# is expected to replace Visual Baisc 6.0
(VBA), for applications such as Access?
Thanks,
Barry.
... more >>
Equivalent of Python Dictionary
Posted by bg_ie NO[at]SPAM yahoo.com at 10/23/2007 4:42:30 AM
Hi,
I have my own class and I'd like to save objects of this class in a
dictionary. In python this works something along the lines of:
a = MyObject();
b = MyObject();
c = MyObject();
myObjectDict = {}
myObjectDict['a'] = a
myObjectDict['b'] = b
myObjectDict['c'] = c
How do I do thi... more >>
Best C# book
Posted by R.A.F. at 10/23/2007 12:00:00 AM
Hi,
I work since few weeks with C#. NET 2005/2008 and I would like to
complete my weak sides with a good book about C#.
Could you advise me some which could start from beginner to expert ?
I have a 7 years C++ background.
i already chose 2 for components :
- GDI+ Custom Controls with Vi... more >>
Using code pages
Posted by Claire at 10/23/2007 12:00:00 AM
I'm writing strings to an embedded console that only supports Extended ASCII
Code Page 437.
The strings are stored in a lookup table in a database .
My original code is as follows which writes to a memory stream:
System.Text.ASCIIEncoding Encoding = new System.Text.ASCIIEncoding();
Machine... more >>
System.OutOfMemoryException while Creating PDF files
Posted by Aryan at 10/23/2007 12:00:00 AM
Hi,
I am using C# with framework 2.0 and creating PDF files on-fly, along
with this I am using Windows 2003 Server.
I am using Byte[] to take the data input and then save into pdf format
on harddrive location.
Now after creating few successful pdf files, I am getting
"System.OutOfMemoryE... more >>
Converting VB code to C#
Posted by RP at 10/23/2007 12:00:00 AM
I have to convert this VB code to C#.
[VB Code]
Dim dvProduct As DataView =
CType(sqlDS_Halloween.Select(DataSourceSelectArguments.Empty),DataView)
[Attempted C# Code]
DataView dvProduct =
sqlDS_Halloween.Select(DataSourceSelectArguments.Empty,DataView);
How to convert to CType?
... more >>
How can I see Show All Files in Solution Explorer
Posted by TonyJ at 10/23/2007 12:00:00 AM
Hello!
How do I do to accomplish this "select Show All Files in Solution Explorer
to view the bin folder"
//Tony
... more >>
Easy question about a not working tutorial about ado.net
Posted by TonyJ at 10/23/2007 12:00:00 AM
Hello!
I use VS2005 and C#.
I'm looking at ADO.NET and have found some test tutorial on
microsoft MSDN.
It can be found on google when searching for "Walkthrough: Saving Data to a
Database (Single Table)"
You must have access to the Northwind sample database.
I have followed the walkthr... more >>
animated form background?
Posted by deerchao at 10/23/2007 12:00:00 AM
I wonder if there is a efficiant way to provide a animated background
for Form/Control?
If I redraw the background of a control, all it's sub controls will be
forced to redraw, right?
Thanks!
... more >>
using bound datagrid or unbound
Posted by TonyJ at 10/23/2007 12:00:00 AM
Hello!
I just wonder when is it necessary to use unbound datagrid. It's far simpler
to use databound datagrid by using the wizard.
Can you just point on some particularly example when an unbound datagrid
would be suitable.
//Tony
... more >>
|