all groups > c# > june 2004 > threads for sunday june 20
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
string.Format() Question
Posted by Roger Helliwell at 6/20/2004 11:39:15 PM
Hello Everyone,
Has anyone found a quick reference for the many string formatting
options for string.Format() ? I'm spending a ridiculous amount of time
trying to write one line of code that would take about 3 seconds in C.
(Sarcasm not intended.)
All I need is a format string to zero pad a... more >>
why Math.Log(8,2) is 2.9999999999999996 and not 3
Posted by indianiowan NO[at]SPAM yahoo.com at 6/20/2004 11:13:11 PM
Hello Gurus,
Here is a problem, where i am unable to reason HOW it happens? I wrote
a dll using math.log. This dll when used within application A works
fine, but not with application B. On debugging I was biting my nails,
when i saw result in immediate window.
?Math.Log(8,2)
2.99999999999999... more >>
about events
Posted by e-mid at 6/20/2004 10:53:07 PM
i registered two events with a button.
when i press it , how can i know which is fired first?
or is there a way to make one of them get fired before the other one?
in fact i made a experiment about it :
i put message boxes in the events, when i press button only one event is
fired and other... more >>
Changing properties of form controls
Posted by Tony W at 6/20/2004 10:31:21 PM
Hi,
I am trying to write a simple application to retrieve data from the
Windows registry and insert it into textboxs on a windows form.
So far I have one namespace containing two classess.
The first class handles the form generation - (this was done using GUI
form designer).
The second... more >>
How to get user company
Posted by Tintin at 6/20/2004 7:17:53 PM
(Sorry my bad English)
Hi,
I want to get User company not User name. How to do it?
Regards,
Son
... more >>
Fixed-length arrays as struct member
Posted by Dr. Len at 6/20/2004 6:27:23 PM
Hi NG,
is it possible for struct to have a fixed-length array of primitive
types as member variable as in C++, such that the array doesn't need
to be allocated explicitly?
Eg.:
--------
public const int MAX_VALUES = 4;
public struct Weight
{
int indexes[MAX_VALUES];
float weights[MAX... more >>
currently logged on username from within service
Posted by ChrisB4745 at 6/20/2004 6:23:01 PM
I'm working on a system service application that is supposed to report various information about the computer it is running on back to a central server. One of the things I need to know is the username of the person who is currently logged on to the actual computer. I've tried using
Name = System.... more >>
interactive user name from within service
Posted by ChrisB4745 at 6/20/2004 6:21:01 PM
I'm working on a system service application that is supposed to report various information about the computer it is running on back to a central server. One of the things I need to know is the username of the person who is currently logged on to the actual computer. I've tried using
Name = System.... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
double/float insert into mssql
Posted by Jan Agermose at 6/20/2004 6:18:20 PM
Im writing a small test app that reads stringvalues, parses them to
doubles and inserts the doubles into a mssql database. But the values
inserted are not the same as the original string values?
I tried paring the values using one of the two linies:
double vekselkurs =
double.Parse(node.... more >>
copying to a different computer using File.Copy()
Posted by Ram Baruch at 6/20/2004 5:38:58 PM
Hi,
I'm trying to use the File.Copy() function. It works well when the
desenation file is local (Like: C:\dest\dest.exe). The problem is that when
I'm trying to copy to a destenation that starts with '\\' it doesnt work and
exception is thrown (for example: \\MyComputer\DestDirectory). Even if t... more >>
[Newbie] Maximize and minimize events
Posted by Flix at 6/20/2004 5:16:38 PM
Hi everybody.
I've made a complete scalable window.
When I drag the window borders, all the controls in my window change their
dimension, and the font in the controls change its dimension too.
The problem is that when I maximize my window, or when I minimize it and
then reopen it, the font ... more >>
Image Size Determination
Posted by Thom Little at 6/20/2004 5:07:59 PM
I would like to dynamically add a .jpg image of arbitrary size to an .aspx
page and reserve the space for the image before it is loaded. Loading the
image is no problem. How can I determine the height and width of the image
before it is loaded? Is there an article that you can point me to on t... more >>
ArrayList grouping question
Posted by Hans De Schrijver at 6/20/2004 4:50:54 PM
I have a private ArrayList variable that holds objects of various types,
though they're all derived from a common base class (User).
What I would like to do is provide public accessor properties per type. I
have written some code that does the trick now, but it involves looping
through the priva... more >>
COM Objects
Posted by David at 6/20/2004 4:03:37 PM
Hello!
How can I create COM and ActiveX objects in VS.BET 2003?
... more >>
C# and ISAM
Posted by Robert Schuldenfrei at 6/20/2004 3:37:29 PM
Dear NG,
This fall I may try to convert an old MRP-II system from COBOL to C#. I
have been using Microsoft SQL Server while I have been learning C# to hold
the data. This is fine, but if I sell my product I will be forcing my
customers to buy SQL Server. In addition, the original COBOL ... more >>
P/Invoke and FILE*
Posted by SamoK at 6/20/2004 2:55:21 PM
Hy!
I have to invoke a function that has a FILE pointer for its parameter.
e.g.
int myfunct(FILE *f);
Does anyone know how can P/Invoke such function? And would it be possible to
pass StreamReader as a parameter to an invoked function (I know it is not
possible to do so directly)?
Tha... more >>
add DataTable to existing Table
Posted by Mark Broadbent at 6/20/2004 1:27:45 PM
my brain has short-circuited. I am trying to add a DataTable to an existing
DataTable (of same schema i.e. no columns etc). Cannot find an add method of
datatable and the rows add method has no overload for multiple rows.
Any ideas?
--
Br,
Mark Broadbent
mcdba , mcse+i
=============... more >>
How to create a dll to use in PowerBuilder
Posted by Vakkaas at 6/20/2004 1:11:50 PM
Hi,
I am trying to create a dll to use in PowerBuilder. My concern is that i
want to create a few function in C# code that i want to use in PowerBuildre.
Anybody knows how i can do this?
Thanks.
Vakkaas
... more >>
FileStream.EndRead, Does it cause a context switch?
Posted by Nadav at 6/20/2004 8:34:01 AM
Hi,
I am using FileStream's Async API: BeginRead/EndRead, upon completion callback execution I use the read data and call EndRead, Taking that in mind, I Wonder... does calling EndRead will cause a context switch? What is the kernel object used for blocking EndRead calls? Event and mutex cause a ... more >>
Mixed mode '__pin' internals: does '__pin' does anything at all?
Posted by Nadav at 6/20/2004 7:27:02 AM
Hi,
I am writing a mixed mode application, I have a mixed mode Assembly manipulating a managed byte[] array, to access this array in unmanaged code I '__pin' the array, As I understand, pining an object guarantee that it will not be collected by the GC ( by increasing it's refcount or so ), Takin... more >>
cut and paste
Posted by Mats at 6/20/2004 6:52:01 AM
Hi,
I have got problem to use clipboard in, it work fine when it is a string but when I try to add a custom object to the clipboard it will not work. The class that I will store on clipboard inherits from ISerializable and IDataObject. When I get data from clipboard I say it is a serialize type.
... more >>
Is there easier way to regenerate a dataset in VS.NET?
Posted by Peter at 6/20/2004 5:48:01 AM
Hello,
Thanks for reviewing my question. I would like to know if there is an easier way to regenerate your dataset in VS.NET when your database schema changes. I am frequently add or remove fields in my database and then on the VS.NET C# windows form side, I delete the dataset, the dataadapeter... more >>
(Beginner) VB.NET piece of code, How is it coded in C#?
Posted by NewBie at 6/20/2004 3:37:01 AM
Hello Fellows,
Can you let me know how do i convert the below VB.NET piece of code into c#?
Dim targetTypes(0) as Type
targetTypes(0) = GetType(Order)
Thanks :)... more >>
Basic Question on code diff between vb.NET and C#
Posted by NewBie at 6/20/2004 3:36:01 AM
Hello Fellows,
Can you let me know how do i convert the below VB.NET piece of code into c#?
Dim targetTypes(0) as Type
targetTypes(0) = GetType(Order)
Thanks :)... more >>
How to create an array of label
Posted by jhs at 6/20/2004 3:21:33 AM
Hello,
I developping a .NET windows form application an need some help to create an
array of System.Windows.Forms.Label in order to be able to manage all of
them using index.
I'm trying to do this in form_load void:
System.Windows.Forms.Label[] labelArray = new
System.Windows.Forms.Label[91]... more >>
Backup database
Posted by Mohammed Abdel-Razzak at 6/20/2004 2:58:35 AM
Dear sirs
I want to konw how can I make a backup to my database
using C#
using SQL commands???... more >>
update with textboxes
Posted by Jose_Csharp at 6/20/2004 12:37:16 AM
Hello group,
I trying to do an aplicattion where it shows the data from a sql server
database and you can save the changes. When I use a datagrid I haven´t any
problem to update de changes but when I use textboxes to show and make the
changes of any field of the table the command UPDATE doesn´t ... more >>
Define Struct
Posted by [Yosi] at 6/20/2004 12:08:01 AM
How I define the following C struction in C#
typedef struct _T_Edit
{
char Name[256];
char EditBox[256];
} T_Edit;
the struct member is :
char [256] Name;
char [256] EditBox;
but the typedef ...... more >>
INI file access
Posted by dominicjoseph NO[at]SPAM rediffmail.com at 6/20/2004 12:02:32 AM
Hi,
In C#, is there any Class or any other way to efficiently read an INI
file - read sections, read values of certain settings and so on.
Do let me know if anyone know of anything. Thank you.... more >>
|