all groups > c# > march 2004 > threads for tuesday march 9
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
INI Files, Properties etc..
Posted by SPG at 3/9/2004 10:21:31 PM
Hi,
I am new to C#, after recently converting from JAVA.
I am looking for a util or the proper way to store app settings for
configuration, such a s DB connection strings etc.
In JAVA there is a Properties object that manages all the load/save
functionality for us, giving access to a Map of n... more >>
Obfuscator Considerations
Posted by Mac McMicmac at 3/9/2004 9:56:23 PM
I'm in the market for an obfuscator. Any recommendations and rationalle for
chosing one would be greatly appreciated.
Along these lines, some obfuscators reduce the size of the assembly. The
claimed benefit is faster application startup times. Others brag that they
do not reduce size - as the ... more >>
boxing
Posted by ichor at 3/9/2004 9:47:22 PM
hi what is the use of boxing i understand that it is converting from value
types to reference types.. but why would i want to do that?
can anyone explain?
... more >>
Constructor using out parameters
Posted by Vanessa at 3/9/2004 9:28:16 PM
How could I change the code below for the constructor to make use out int X
and out int Y parameters?
Could someone please show me?
using System;
namespace PRL001
{
public class Locate
{
public int loc,location,x,y;
private int [, ] mat= new int [6,20];... more >>
Jscripts eval() equivalent in C#
Posted by jrdelacruz77-software NO[at]SPAM yahoo.com at 3/9/2004 9:23:35 PM
Does anything like this exist in c# to evaluate a portion of a
statement prior to using it in a larger statement?
http://msdn.microsoft.com/library/en-us/jscript7/html/jsmtheval.asp?frame=true... more >>
Timed Server Events
Posted by Eric at 3/9/2004 9:01:05 PM
I have a server (NT service) that listens on multiple ports, some use
asynchronous methods and some synchronous methods for reading and writing to
and from the sockets.
I could really benefit from timed server events. For example, say I wanted
to disconnect a user who has idled at a login prom... more >>
Get/Set for array properties...
Posted by 2fast at 3/9/2004 7:36:16 PM
C# allows to have public array properties, but is there a way to make that
array property private, with a get/set method using the get/set syntax that
c# introduced? If not, what is the cleanest way to accomplish that?
Perhaps just create get_arrayname(index) and set_arrayname(index, value)
met... more >>
date comparison in C#
Posted by Grey at 3/9/2004 5:51:29 PM
I need to compare two dates which one date is 4 days earlier than other =
date or I can customise the dates comparison difference. How to do it in =
C#??
Million Thanks... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Dataset -> Listview?
Posted by Lasse Edsvik at 3/9/2004 5:48:44 PM
Hello
I was wondering if there is a way to populate a listview with a dataset?
i cant find any DataSource on the listview control
/Lasse
... more >>
The Using() Statement
Posted by Yaron at 3/9/2004 5:46:09 PM
Realistically, how efficient is the using() statement (not the directive)? If I do this
using (SolidBrush test = new SolidBrush(Color.Black))
(...
is it more efficient (performance and memory wise) than this
Solidbrush test = new SolidBrush(Color.Black)
test.Dispose()
test = null
Do... more >>
Determine actual file type
Posted by Mac McMicmac at 3/9/2004 5:27:28 PM
I need to verify that files users copy to a server are of a specific file
type (.jpg, gif, mpeg, or wav) - and I don't want to assume that the file
extension correctly represents the actual file type. How can this be done?
Thanks in advance.
... more >>
Floating point bit layout
Posted by n! at 3/9/2004 5:20:56 PM
I'd like to obtain the bit layout of a single-precision, floating point
value. ie. I'd like to convert the 32bit float to a 32bit [unsigned]
integer, not the value but the binary contents.
For those familiar with C++, I'd like something similar to:
unsigned int ExtractBits( float value )
{
... more >>
Searching method in C#
Posted by Grey at 3/9/2004 5:19:30 PM
Can anyone suggest me some searching technique in C# such as binary =
searching as I am a newcomer of C#
Million Thanks...... more >>
[HELP]Some problems in .Net MDI child form about an ActiveX control which is made with MFC
Posted by ³¶¸¸ ´ÞÆØÀÌ at 3/9/2004 4:56:14 PM
Hi~.
I make an ActiveX Control with MFC library.
Source code of this control is from default Visual C++ wizard.
It run well in MFC container and other(VB, DELPHI, ...) and .Net winform.
But!... It has some different behavior in .Net MDI child form.
The function OnCreate of ActiveX C... more >>
RtlMoveMemory to read an integer from a file
Posted by Bill Mittenzwey at 3/9/2004 4:39:06 PM
I am trying to read a string of bytes out of a file and convert them into an
int. I can make it work in Visual Fox (see below), but I can't seem to get
the same code to work in c# (see below the fox sample).
Does anyone recognize this or can anyone let me know what I am doing wrong?
Is there a... more >>
highlight row in datagrid?
Posted by Lasse Edsvik at 3/9/2004 4:27:56 PM
Hello
I was wondering if its possible to highlight a selected row in a datagrid as
in default for a listbox?
and disable that textcursor when clicking on a row?
/Lasse
... more >>
Date/Month display question
Posted by Blue Ball at 3/9/2004 3:42:09 PM
I am using the following to display the month.
Convert.ToDateTime(my_date).ToString("MMMM")
It works by showing the correct month name in english. How do I display
the date in French and German? I don't want to set the whole site
globalization to be French/German, only part of it needs to ... more >>
problem with `
Posted by Benny at 3/9/2004 3:21:36 PM
Hello Experts,
I have wrote a search method that accepts a string argument from the
search keyword text box. Everything goes fine except when I enter " ` "
in the text box and search, it display me back with:
<INPUT id=txtFind onblur="this.style.color='Black';" style="WIDTH:
150px" onfocu... more >>
how to remove title bar on win form
Posted by at 3/9/2004 3:13:25 PM
Is there a way to not show the title bar at all in a win form? I tried
setting the text property to an empty string (another post mentioned that it
happened to him when he set the text to an empty string), but the title bar
is still there.
thanks
gv
... more >>
Form Alignment
Posted by Felbrigg at 3/9/2004 3:06:08 PM
Can anyone tell me how to align a windows form to the bottom right?
... more >>
Changing Icon for an exe
Posted by Larry at 3/9/2004 3:01:08 PM
Hello
I'm trying to change the icon for an exe - I thought it would be as simple as changing the App.ico. However the problem appears to be that when I open the App.ico with paint, I see one image, but when I open it up with IE, I see another (this is the image that the exe uses). I don't know why... more >>
"is not a valid value for 'value'. 'value' should be between 1 and 256"
Posted by Tamir Khason at 3/9/2004 2:59:13 PM
Is there limitation of ImageList to 256 px?
While trying to change the size to more then 256 I recieve the exception of
"value out of range". While trying to change the size on run-time I'm
recieveing error "
is not a valid value for 'value'. 'value' should be between 1 and 256"
How to rid ov... more >>
code optimization
Posted by Kovan Akrei at 3/9/2004 2:55:52 PM
Hi,
The code shown below is going to be a part of some tests I'm doing. I'm
trying to check how many threads are created and started (threads does not
do anything and exits soon after creation) i a certain amount of time, i ex.
30 seconds.
I'm trying to optimize it as much as possible. I wonder... more >>
which control?
Posted by Lasse Edsvik at 3/9/2004 2:50:41 PM
Hello
Im wondering if there is some control in VS similar to listbox, im getting
data from a database and i would like to present it like this:
Col1 Col2 Col3
1 A B
2 C D
3 E F
were each "row" is ... more >>
boxing reference type?
Posted by Sharon at 3/9/2004 2:35:49 PM
when a reference type is stored in say hashtable.
is it converted to an object type and is it also considered boxing although
the object was not a value type?
10x.
... more >>
best practices
Posted by Fabiano at 3/9/2004 2:24:12 PM
Please,
My corp. is moving through .NET (C#) is there any programming best practices
documents around the web?
Style, Format, setup and so....
tks in adv
Fabiano
... more >>
Deployment Question
Posted by ion at 3/9/2004 2:17:08 PM
Hi,
I am currently in the process of designing a C# database application. I am
wondering if there is a way I could create the front end to be run by an
application server and have the client point to it. I am looking of having
between 3 to 5 concurrent users. It will be using MSDE as the ba... more >>
Advanced DataSet filtering question
Posted by Mervin Williams at 3/9/2004 2:12:09 PM
I have a dataset that includes data adapters for two tables, Company and
User, and one for the intersection table, Company_User. I've set up
DataRelations between the tables within the dataset .xsd file.
How do I now apply a filter that restricts the Company to only display those
records acce... more >>
marshaling problem with struct converted from C
Posted by Angel at 3/9/2004 2:08:54 PM
I converted a C-style struct into C# but when I call a dll function with it
as parm, I get "can not marshal field stack of type ZM7.ZIP4_PARM: This type
can not be marshaled as a structure field.". The dll function was working
great at accessing and reading the struct but then I noticed that I h... more >>
Assembly.LoadFrom(path)
Posted by cristiank at 3/9/2004 2:08:51 PM
Hi,
I want to ask all of you if anyone knows how I can use
Assembly.LoadFrom(dllFullPath) with different dlls?
After it runs for two times, the third time it will give exception, saying
that the assembly is already loaded.
thanks in advance!
... more >>
question about xml
Posted by C# newbie at 3/9/2004 1:47:50 PM
Hi group,
I have an xml file as:
<AAA>
<BCC>
<BBB/>
<data>'Test'</data>
<BBB/>
<BackGroundColor>'Test'</BackGroundColor>
<BBB/>
</BCC>
<DDB>
<BBB/>
<BBB/>
... more >>
Dataset -> combobox?
Posted by Lasse Edsvik at 3/9/2004 1:33:03 PM
Hello
i've selected data from a table and put it into a dataset, now how do i
populate a combobox the easiest way?
OleDbDataAdapter DA = new OleDbDataAdapter();
OleDbCommand SQL = new OleDbCommand("SELECT * FROM Products", conn);
DataSet DS = new DataSet();
DA.SelectCommand = SQL;
... more >>
GetHashCode() not consistent?
Posted by Michi Henning at 3/9/2004 1:16:19 PM
From the Object.GetHashCode doc:
"The default implementation of GetHashCode does not guarantee uniqueness or
consistency; therefore, it must not be used as a unique object identifier
for hashing purposes."
I'm blown away by this statement.
Translation: the default implementation of ... more >>
Fill error in dataset
Posted by Lasse Edsvik at 3/9/2004 1:13:19 PM
Hello
I get the following error:
Fill: SelectCommand.Connection property has not been initialized.
what's wrong? connection works but it refuses to fill the dataset.
using System.Data;
using System.Data.OleDb;
/*
CODE.......
*/
OleDbConnection conn = new OleDbConnection(... more >>
use system.drawing class in Web (ASP.NET) applications?
Posted by Wanjun Yu at 3/9/2004 1:12:15 PM
Hi All,
I have never worked with C#, I am just going to ask a simple question,
Are system.drawing classes suppored in Web(ASP.NET) applications, or say can
you draw line or text in a Web application?
Thanks.
WJ
... more >>
SQLCE database Insertion error
Posted by micmic at 3/9/2004 12:50:10 PM
dear all expert,
My programme is as follows:
try
{
conn = new SqlCeConnection ("Data Source = POS.sdf");
conn.Open();
cmd = conn.CreateCommand();
cmd.CommandText = "INSERT INTO tbl_Check (A,B) VALUES (?,?) ";
cmd.Parameters.Add("A", SqlDbType.Int).Value = chec... more >>
overloaded method works in VB - NOT in C# ??
Posted by pjstreiff NO[at]SPAM yahoo.com at 3/9/2004 12:43:50 PM
I tried to convert this VB function to C#:
VB------------------------------------------------
Function GetSelectedIndex(CID as String) as Integer
Dim iLoop as Integer
Dim dt as DataTable = ddlDataSet.Tables("Categories")
For iLoop = 0 to dt.Rows.Count - 1
If Int32.P... more >>
Iterating through an array returned from a Web Service
Posted by Mark Rae at 3/9/2004 12:36:49 PM
Hi,
I have a Web Service with a WebMethod called getRepaymentSchedule which
returns an array. Internally, the array is built up using a struct, as
follows:
public struct RepaymentSchedule
{
public int nPeriod;
public double dRepaymentAmt;
public double dInterestAmt;
}
... more >>
help with a regular expression
Posted by ToddT at 3/9/2004 12:33:51 PM
how would set up a regular expression that is 10 digits in length and
can not start with 1948, 9903, and 5631? thx.
... more >>
Formless application
Posted by Mike Ruane-Torr at 3/9/2004 11:54:55 AM
I want to write an application that has no form, but uses toolbox
components, i.e. notify icon, context menu, timer. I notice that I can
drop these items onto a component class, but is that how I should be
approaching this problem? I have ended up tying myself in knots trying to
get Applic... more >>
Disposed Mutex Behavior
Posted by creepiecrawlies NO[at]SPAM hotmail.com at 3/9/2004 11:51:37 AM
The following code outputs the following:
True
True
Cannot access a disposed object (ObjectDisposedException)
Why does WaitAll differ in behavior from WaitOne?
Mutex mutex = new Mutex();
bool bLocked = mutex.WaitOne();
Console.WriteLine( "bLocked = {0}", bLocked );
IDisposable i = mute... more >>
problem with dlls
Posted by bobo at 3/9/2004 11:50:53 AM
I was designing a software with plugin function using C#.
Let's say, that I wanna upgrade this software just by downloading dlls from
the network and copying them into a special directory. I may add dlls or
replace the old ones. But as you know, C# programs treat objects in dll as
newbies if thi... more >>
Extending the xml documentation template
Posted by Remco Bosman at 3/9/2004 11:40:22 AM
Hi All,
Does anybody know how I can extend the automatically generated xml tags that
are generated when I entre three slashes
/// <summary>
/// My Summary
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
I want to add a few comments when I put in... more >>
SqlConnection and ExecuteScalar
Posted by Alberto at 3/9/2004 11:40:17 AM
I store the value that returns the ExecuteScalar method of the SqlConnection
object in a variable (object type). The problem is that if I close the
connection object, I can't read the content of the variable. Why occurs
this?
Thank you.
..
... more >>
Combobox Help - newbie question
Posted by Ash at 3/9/2004 11:10:11 AM
Hi,
I've got an array with string elements in it, and i also have a combo box
with items statically added at design time into the list collection.
The array is going to have data such as
"Business","Hospital","Government","Unknown"
The Combo box has items with similar names. I want to be ... more >>
How To Create a Resource file that contains wav resources?
Posted by sharp NO[at]SPAM homerlex.mailshell.com at 3/9/2004 11:08:44 AM
How do I use resgen to create a resource file that contains a bunch of
wav files? I've seen examples for creating ones with text but not
images.
Regards... more >>
Launching URL from usercontrol
Posted by Dave Brown at 3/9/2004 10:58:48 AM
Has anyone successfull launched a URL into a new browser window from a
usercontrol hosted by IE ?
I used the Process.Start() method on my Windows Application using the
usercontrol which works fine but Process.Start throws a security expcetion
when the control is hosted. understandibly.
rgds... more >>
Generate variable name on the fly
Posted by Steve Wasser at 3/9/2004 10:49:07 AM
I've got 44 different terminals serving four grades of product each, and
it's been a bitch referencing them. I have one SQL table I'm pulling out
beginning inventory for each location. I've got another stored procedure
that pulls out inventory, ultimately I have to subtract by location, by
produ... more >>
Simple accessprob
Posted by Lasse Edsvik at 3/9/2004 10:44:49 AM
Hello
have problems populating a listbox with data from an accessdb. cant figure
it out, have clicked "test connection" and it works but not this:
using System.Data;
using System.Data.OleDb;
/*
lots of code here
*/
private void button1_Click(object sender, System.EventArgs ... more >>
Help : Whats the "@" in the directory info call.
Posted by skrishnan NO[at]SPAM snet.net at 3/9/2004 10:11:50 AM
public static void Main()
{
try
{
DirectoryInfo di = new DirectoryInfo(@"c:\");
// Get only subdirectories that contain the letter "p."
DirectoryInfo[] dirs = di.GetDirectories("*p*");
Console.WriteLine("Number of direc... more >>
[STAThread]
Posted by naveen at 3/9/2004 10:07:39 AM
can any one tell me abt this attribute or give me a link which gives
information abt this attribute
Thanks in advance
naveen
... more >>
Long distance code collaboration
Posted by george r smith at 3/9/2004 10:02:38 AM
All,
Is there a tool available in the MSDN that will allow two programmers to see
and work on code together from two workstations that are in different
physical locations.
Thanks
grs
... more >>
DTOR in C#
Posted by Vai2000 at 3/9/2004 9:12:18 AM
If I want to write my own DTOR in C# what method will it be? I know DTOR's
are not supported in C# but I want something like DTOR in C++ in my C#
Module. How to accomplish that?
TIA
... more >>
Build tools
Posted by Kevin C at 3/9/2004 8:53:58 AM
What build tools are you guys using out there? We were evaluating a couple
and the differences in some are staggering. For example, NANT is the "cool"
thing right now but it can be somewhat complex. A tool like VisualBuild
looks offers a more WYSIWYG approach along with easy, built-in SourceSa... more >>
defined in multiple places????
Posted by DaveF at 3/9/2004 8:47:59 AM
I have tried putting full permissions for ASPNET account. I wiped all the
files in "Temporary ASP.NET Files". Don't know what else to do!!!!
----------------------------------------------------------------------------
----
Compilation Error
Description: An error occurred during the compil... more >>
Image Resizing and Renaming...
Posted by weeerob NO[at]SPAM hotmail.com at 3/9/2004 7:55:23 AM
I have the following code that loads an image, resizes it as a new
image and then saves to a new file, the original image file then gets
deleted and the new image is renamed to the old filename.
Now I get the following exception on the File.Delete line
System.IO.IOException: The process cann... more >>
.NET Framework Version 1.1 loaded from a C# Excel AddIn
Posted by John Sandiford at 3/9/2004 7:46:05 AM
Hi, I have written an Excel addin in C# and have found that everything works fine when I only have v1.0 of the .NET Framework installed on my machine
In a normal C# exe built to work with v1.0, I would expect it by default to load v1.0 even if v1.1 is installed, unless config files or policies etc ... more >>
Help Converting CET Date time to GMT /UTC
Posted by skrishnan NO[at]SPAM snet.net at 3/9/2004 7:42:51 AM
I have the following code in C#,
DateTime myDate = new DateTime(2004,4,5,13,0,0);
String myString = myDate.ToUniversalTime().ToString();
-- I just realised that I did not provide the TimeZone for the date/time.
I would like to supply CET as the paramter, but I donot know where to do
thi... more >>
Replace foreach match regular expression...
Posted by Josema at 3/9/2004 7:26:09 AM
Hi
I have a class that finds the matches in a big string take in count a regular expression..
I would like to know how to replace, every time i find a match, this match by another string..
Any help will be gratefu
Thanks
Josema.... more >>
Asking for help for printing string with fixed format.
Posted by chrisben at 3/9/2004 6:56:08 AM
Hi
I am trying to print table format text out in C#. The approach I use is to format the string varaible a
temp=string.Format("{0,-10}{1,-8}{2,-12}",id,name,cost)
Then I keep adding values by useing temp=temp+"\n"+string.fromat...
At the end, I put the string variable to a memorystream and send... more >>
data bindings
Posted by Ricardo at 3/9/2004 6:46:07 AM
here´s my question
I´m doing a database program, and when the user type a part of the name of the consumer, i populate a listbox with all the consumers that have these part in their names. If the user click in some name in the listbox, the textboxs are populated with the data from that consumer.... more >>
Using java classes from c#
Posted by Fatih BOY at 3/9/2004 5:06:08 AM
Does anyone known any sample to use java classes from c#
... more >>
Running Excel from c#
Posted by motiv NO[at]SPAM bigfoot.com at 3/9/2004 3:33:31 AM
Hi perhaps someone can help me.
I've been trawling the boards to find a way of starting Excel from C#.
So far it seems I need to use
using System.Runtime.InteropServices;
using Excel;
Problem is the 'using Excel' fails to work, with the error.
The type or namespace name 'Excel' could ... more >>
Datagrid column with 'NaN' displayed causes IndexOutOfBounds Error
Posted by ron.prowse NO[at]SPAM blueyonder.co.uk at 3/9/2004 2:32:52 AM
anyone come across this problem were the user tries to sort the a
Double type column in a datagrid that has some 'NaN' ( not a number )
displayed that causes the frame work to throw a indexOutOfBounds?
apart from preventing these columns from being sorted how do you get
around it?
Ron... more >>
Threading problem
Posted by Fabrizio at 3/9/2004 1:31:07 AM
Hi
In my application I submit a procedure using another thread, so the user can use the computer while the process is running
But, how can I send a messageBox using the main thread to the user when the procedure in the sub thread is over
Thank you
Fabrizio... more >>
Closing named pipe
Posted by Svetoslav Vasilev at 3/9/2004 12:46:06 AM
Hi,in one project I use a named pipe in a mixed managed-unmanaged environment. The server end of the pipe is created within an unmanaged code,while the client end is opened within managed code. In order to open the client end,I had imported the Win32 API functions CreteFile(),SetNamedPipeHandleState... more >>
System.NullReferenceException error ASP C#
Posted by Gaetan.Pare NO[at]SPAM mutsoc.be at 3/9/2004 12:42:42 AM
I have this error when I try to launch my Asp.Net page :
System.NullReferenceException: Object reference not set to an instance
of an object. at calformation.CalForm.Calendar1_DayRender(Object
sender, DayRenderEventArgs e)
Source COde :
protected void Calendar1_DayRender(object sender, Da... more >>
Splash form ???
Posted by genc ymeri at 3/9/2004 12:10:04 AM
Hi,
I'm a newbie in C# and I'm trying to have a splash form before the entire
app runs.
Any tip what is best way to do that, will be very much appreciated !!!!
... more >>
|