all groups > c# > september 2003 > threads for thursday september 18
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
Sanity Check; C library memory management through through C#
Posted by arthurmnev NO[at]SPAM yahoo.com at 9/18/2003 10:55:02 PM
Does anyone know if there are any ramifications of using crtdll.dll
from within the framework?
[System.Runtime.InteropServices.DllImport("crtdll.dll")] extern public
static IntPtr malloc(Int32 size_t);
and simmilar will work fine; looking at the source of CLR itself:
ILNativeInt _IL_Mars... more >>
Using Progress Bars with CopyFileEx
Posted by hgh NO[at]SPAM byu.edu at 9/18/2003 9:29:21 PM
I know this has come up a couple of times on the group, but I'm still having
trouble with it.
I'm fine with creating the delegate and CopyFileEx declarations and the function
which gets delegated to. The problem I have is the actual updating of the
progress bar. I can understand passing ... more >>
Reading Structures from binary file
Posted by Matt Laver at 9/18/2003 8:38:09 PM
Hi,
I have a binary file that I'm currently reading byte by byte using code
similiar to:
string FileName = @"c:\myFile.dat";
FileStream fs = new FileStream(FileName, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
Header = r.ReadInt32(); //file header... more >>
combobox problem
Posted by drishtik at 9/18/2003 8:34:47 PM
hi
i have a combobox which has some values loaded in it
like (eg)
a
b
c
d
i want to retrieve the value from the database (a, or b or c or d)
and then select that item in the combo according ly
foreach (DataRow dr in recs)
{
cmbType.SelectedText = dr["description"].ToString(); //... more >>
Working with Active Users
Posted by Arvind P Rangan at 9/18/2003 6:33:52 PM
Hi all,
I am working on a project which checks for windows login and its rights and
then opens up the rest of the forms according to the login and the rights
already set in the windows.
I just know that this can be done using Active Directory Class can anyone
who has worked on it give me we... more >>
List -> Array
Posted by muscha at 9/18/2003 6:25:39 PM
Hello,
What's the easiest way to convert List -> Array in c#? Say for example the
same thing like in Java:
List list = new ArrayList();
Item[] items = (Item[]) list.toArray(new Item[list.size()]);
Is there a way to do this?
Thanks heaps,
/m
... more >>
Looking for good books
Posted by johnny_xia NO[at]SPAM wistron.com.cn at 9/18/2003 5:40:57 PM
Dear All,
I am new to C# and looking for some good books for a start. I have been
working on Windows Platform for several years and have extensive experience
in C++ and COM. I decide to shift to .Net from now.
Regards,
Johnny Xia.
... more >>
A bug in String.ToCharArray?
Posted by Michael Barnes at 9/18/2003 5:29:12 PM
I have encountered what appears to be a bug in
String.ToCharArray, and so far I have not found any
mention or discussion about it. I am interested to know
if anyone else is encountering this problem. I am
using .NET framework 1.1, and Visual Studio 2003. I can
reproduce the problem with... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Making the correct class at runtime based on loaded data
Posted by Jon Rea at 9/18/2003 5:19:03 PM
I hav been looking for the last 2 hours on how to do this without much luck.
Im going to give a simplifed model of the problem i have.
I want a collection class that can holds a series or objects, for arguments
sake, lets make these fruit :
apple
orange
bannana
in my application i hav... more >>
CSV Files and RegEx Pattern
Posted by Robbie Spencer at 9/18/2003 4:58:15 PM
Hi,
Does any know where I could find a Regular Expression pattern that will
parse a csv file? The file may contain fields with embedded commas as well
as embedded quotes.
If someone could point me into the right direction in would be great.
Robbie
... more >>
Checked Exception
Posted by Lalit Parashar at 9/18/2003 4:49:25 PM
Hi,
Unlike Java, there is no Checked Exception in C#.
Is there any work around for this.
For example, I am declaring an interface and inside this interface I have a
function and I would like to force this function to throw an exception in
the implementation.
public interface IMyInterfac... more >>
simple operator overload question
Posted by Norvin Laudon at 9/18/2003 4:13:42 PM
Hi,
Should be simple, but I can't seem to get a handle on it.
I've over-ridden the == operator in my class.
public static bool operator==(XrayImage lhs, XrayImage rhs)
{
return ( (lhs.name == rhs.name) && (lhs.imageTimeDateStamp ==
rhs.imageTimeDateStamp) );
}
but now I can't com... more >>
Thread timeout?
Posted by ll at 9/18/2003 4:05:58 PM
Hi,
How to specify the timeout value(ms) for a thread?
Thanks.
... more >>
MDI Application - Need Help
Posted by Eric W. Holzapfel at 9/18/2003 3:47:29 PM
Hello C#,
I am trying to create an MDI app in C# (Windows
Application). I have a "container" window. I would like
to add more than one child window to the container (2 for
starters). I would like to display one child first, and
when user clicks button of child1, child1 disappears, and
... more >>
Hoiw to expose a property that can be null.
Posted by MP at 9/18/2003 3:42:56 PM
Hello,
I am trying to write a class that will expose some properties. One of the
property is extracted from a SQL database and can be NULL or some integer
value.
Is there a elegant way of implementing this in C# ? I do not want to use
variant (or similar types) because I want to retain ... more >>
How to execute commands in Command Line?
Posted by Madhanmohan S at 9/18/2003 3:35:58 PM
Hi All,
I want to run a command line appplication from C#. When i start
the application, it will go into specific mode. After that, i have to give
commands to use the application.
How Can This Be Done in C#....
Thanks and Regards,
S.Madhanmohan
... more >>
UserControl properties not browsable in properties panel?
Posted by james at 9/18/2003 3:34:20 PM
I cannot get my UserControl's browsable properties to show up
in the designer properties panel.
I have [ Browsable(true), Category("TEST"), Description("This is a test") ]
then public virtual bool TestProp { {get return testProp; } set { testProp =
value; } }
but it doesn't show up in the d... more >>
newbe C# Project Question
Posted by Jones at 9/18/2003 3:24:42 PM
I am having problems with my C# project. The project was built using VS.net
(original release with service pack 1). The project includes windows forms
and a DLL (dot.net)
After getting the application working, everything compiled and was
troubleshooted. Ready for delivery, the owner decided... more >>
C# and Newbie DIME Questions
Posted by Richard at 9/18/2003 3:18:46 PM
All,
I need to construct, send, receive, and unpack a DIME
package from a C# client talking to an ASP .NET/C# Web
Service. Three questions, question #2 I'm absolutely
clueless on and so I could really use a snippet or a link
to an MSDN article for #2:
1) I've got an MSDN article that ... more >>
Something else: Unsafe code gives a error CS1577: Assembly generation failed
Posted by Olaf.Baeyens NO[at]SPAM skyscan.be at 9/18/2003 3:05:25 PM
Wel, I am rebuilding the VC# 2002 project that I have deployment problems
with the 2003 version, hoping this solves the problems, but now I encounter
this wierd bug???
If I have the project, and do not compile with "Allow Unsafe Code
Blocks=false" set to true, then the project compiles and no ... more >>
processModel userName="MyDomain\UserName"
Posted by alien2_51 at 9/18/2003 2:49:54 PM
Greetings,
I apologize for the cross post I posted previously to .Net Framework with no
replies...
I have an application server that potentially will service all enterprise
applications from the context of business components.. The components that
will run on this machine in some circumstance... more >>
Escape single quote in string
Posted by DDE at 9/18/2003 2:36:55 PM
Hi,
wich way can I escape a string sent to an OleDbComman containing single
quote?
Thanks
Dominique
... more >>
winforms - change the default printer
Posted by Pablo at 9/18/2003 2:00:05 PM
Friends,
I need to change the default printer from code, with no
user iterativity. Any sample code? suggestion? C#,VB,
nevermind!.
Thanks
Pablo... more >>
StringBuilder
Posted by Alvin Bruney at 9/18/2003 1:54:36 PM
Is string builder intelligent enough to handle concats without behaving like
string?
Consider
myStringBuilder.Append("one" + "two")
what does the '+' do here? Because this syntax is also legal but what is the
cost compared to
myStringBuilder.Append("one");
myStringBuilder.Append("two");
... more >>
dispaly controls in panel
Posted by keith at 9/18/2003 1:26:04 PM
I have a panel on my form and add controls (e.g. TextBox)
into it at runtime.
What I want is the controls will display on same line if
they are visiable in the panel horizontally. If any of
the controls outside panel, it will be displayed to next
line.
Is there any property I can set ... more >>
An equivalent to JTable/AbstractTableModel paradigm
Posted by drskimania NO[at]SPAM hotmail.com at 9/18/2003 1:24:32 PM
Hey guys,
Heres something I used to do very commonly in java, and I'm having a
hard time coming up with a good paradigm for how to manage this in c#.
In Java, to show data on a grid, you need to extend
AbstractTableModel,
and simply define three methods:
object getValueAt(int i, int j);
int... more >>
Program as both service and application?
Posted by Rich Bernstein at 9/18/2003 1:20:16 PM
Is it possible to write a .NET service that could also be run as a user
application? This might be something along the lines of defining multiple
entry points, to be used based on how the program is executed.
I would like to do this without creating a DLL for all the program code, and
two exe... more >>
have variable that all dlls used by C# program can access?
Posted by Les Caudle at 9/18/2003 12:48:58 PM
With the Thread.AllocateNamedDataSlot("aVarName") it is possible to create a
slot that only a thread can access. A child thread cannot.
Is there a way to create a data variable that ANY thread of the main process
(whether a referenced dll or code in the main program) can read and write to?
--... more >>
How to scan/parse through Word Document?
Posted by Bob at 9/18/2003 12:45:53 PM
What I want to do is write a program that reads through a
Word Document, finds certain words or sentences I want,
and then paste into an Excel spreadsheet.
I dont know much about C#. But I learned how to use
those COM Interop things. And Im able to write code that
allows me to open exis... more >>
Combobox
Posted by Phill at 9/18/2003 12:19:14 PM
I have loaded a combobox with two columns, ReportName and
ReportParameterForm. The ReportName is shown and the
other is the ValueMember. How do I get the value in the
selected ValueMember?... more >>
Auto reformating c# code
Posted by muscha at 9/18/2003 12:13:01 PM
Hello,
I'm using Visual Studio .Net Enterprise Architect 2003. Is there a way/add
in that is freely available to atutomatically reformat source code (C#)?
Thanks heaps,
/m
... more >>
Datagrid MouseDown event
Posted by Randy at 9/18/2003 11:11:51 AM
Hello all,
I'm trying to capture the column and row of the datagrid cell clicked. I'm
have problems figuring this out. I think it is simple but eludes me.
I have a datagrid and a MouseDown event...
private void dataGrid1_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
Dat... more >>
Resizing controls
Posted by john sutor at 9/18/2003 11:00:39 AM
If you allow a user ro resize the screen, how can you make the controls
resize annd maintain their position on the screen
... more >>
Dynamic dll loading and PInvoke
Posted by Andrea Palmieri at 9/18/2003 10:44:35 AM
hello everybody,
I have to invoke a function defined in a c dll from a c# program, but I
don't know the dll name at compile time.
How do I declare and invoke this function using LoadLibrary and
GetProcAddress (GetProcAddress returns a function pointer!) ?
Any idea ? Any code example ?
Thank... more >>
How to find an available UDP port for binding?
Posted by Pawan Singh at 9/18/2003 10:25:50 AM
Does anyone know if there is an .Net API which allows me to find an
available UDP port for binding?
Thanks
Pawan
... more >>
C# and Unix !
Posted by Gary at 9/18/2003 9:43:36 AM
Hi,
Can I use C# to write Server components that has to run in Unix server ?
TIA,
Gary
... more >>
Project "Simple COM Server", where?
Posted by Axel Dahmen at 9/18/2003 9:18:34 AM
Hi,
I'd like to write a simple COM Automation Server in C# but couldn't find a
matching project. I want to have the IDE maintain the IDL and the REG file
automatically.
Which project should I use to achieve this?
TIA,
Axel
... more >>
Email out of C#
Posted by Pkant at 9/18/2003 8:55:43 AM
Hi ,
I want to sent an Email out of an C# Programm.
I am using this code :
private void button3_Click(object sender, System.EventArgs e)
{
MailMessage myMail = new MailMessage();
myMail.From = "Torben";
myMail.To = "pkant@isc-greiner.de" ;
myMail.Subject = "HALLO" ;
myMail... more >>
DLL warpper help!! Nick Paldino
Posted by amaddala NO[at]SPAM myrealbox.com at 9/18/2003 8:44:09 AM
How to wrap the following function using PInvole-
VARIANT _stdcall retVariantArray(void) {
COleSafeArray saRet;
DWORD numElements[] = {10, 10}; // 10x10
// Create the safe-array...
saRet.Create(VT_R8, 2, numElements);
// Initialize it with values...
long index[2];
for(index[0]=0; index... more >>
NetworkStream / BeginRead / EndRead / Dataavailable: can't understand MSDN code sample
Posted by dc NO[at]SPAM upsize.de at 9/18/2003 8:43:12 AM
Hi,
I need to asynchronously read from a network (TCP) stream, and I am
having trouble with retrieving whole blocks; I get a break in the data
block every 1460 bytes which relates to network packet sizes I guess.
To get this fixed, I am trying to follow an example in the MSDN, which
pretty ... more >>
Process.StartInfo.WindowStyle problem
Posted by Barry Frank at 9/18/2003 8:42:09 AM
I am starting a process setting UseShellExecute to false and
RedirectStardardOutput to true so that I can use StandardOutput.ReadToEnd to
get the "screen" output of a command line program. When I do this the
WindowStyle property seems to be ignored and is always "normal".
Is this the correct beh... more >>
Compile a C# source code file Without Building in IDE?
Posted by Peter van der Goes at 9/18/2003 8:38:31 AM
I'll guess this has been addressed many times, but my finding skills (Google
Groups, etc) seem to have failed me (not unheard of).
Using VS.NET 2003 Pro, I have a multi file project consisting of several
class definitions, each in its own file) from which I wish to instantiate
objects and test t... more >>
What is the fastest collection class?
Posted by johngilmer NO[at]SPAM yahoo.com at 9/18/2003 8:26:56 AM
I need to use a class that is a collection of objects where I can do a
comparing operation like this:
col = new FastCollectionClass();
bool b = col.IsThisItemAlreadyInTheCollection(obj);
Where the function to see if an object is already in the collection is
fast. I was thinking of using a H... more >>
Access Form Controls From Another Class?
Posted by Michael Ramey at 9/18/2003 8:23:17 AM
How can controls on a Windows Form be accessed (or referenced) from another
Class? I know how to do it from another Form. The following doesn't work
even though the Control Modifiers property is set to "Public":
frmMain.myControl
Thanks.
Michael
... more >>
Coding Conventions from Microsoft
Posted by Ralph Lund at 9/18/2003 8:22:04 AM
Hi.
I am starting a new project with C#. I am searching for "good" coding
conventions. I know that there are some coding conventions from microsoft,
(but they are very extensive and not clear). In the example programs of
Microsoft they use different coding conventions:
private members sometim... more >>
print an html
Posted by Pablo at 9/18/2003 8:14:18 AM
Folks,
i need to send to the printer, an html document. How can
i do this from winfroms??
thanks
Pablo... more >>
Developing controls - visual studio problem ?
Posted by paul.carre NO[at]SPAM polarinstruments.com at 9/18/2003 7:21:56 AM
This one is driving me nuts.
I have a Windows application and a windows control library contained
in the same project. In the controll library I have a control derrived
from System.Windows.Forms.Button :-
public class neatBtn : System.Windows.Forms.Button
I am using neatBtn on the fo... more >>
Does C# and .NET support SmartCards?
Posted by Peter at 9/18/2003 6:21:25 AM
Hello,
Thanks for reviewing my question. I am starting to use
C# and would like to know if .NET and C# support Smart
Card development? In C#, is it as easy as this:
using SmartCards;
Peter... more >>
Categories Hierachy
Posted by A. Elamiri at 9/18/2003 5:05:39 AM
Hello,
I have a list of product categories and each category may or may not have
children and it goes down in a varying level of depth.
Now I have to pull this category information for navigation, I was thinking
of store the ID#'s and category names as well as parent ID's but actually
using a... more >>
Gyro, object creation
Posted by Ole Andre Karlson at 9/18/2003 4:02:40 AM
Hi
Im using the generic constructs provided by the Gyro
installation.
I want to create an object of a generic class parameter,
my code goes something like this:
class Node<T> where T : Node<T> {
....
T temp = new T(); <- Error
....
}
class City : Node<City> {
....
}
This isn't... more >>
Circular Shift Operator
Posted by Ckwop NO[at]SPAM hotmail.com at 9/18/2003 1:11:37 AM
Is there an inbuilt circular shift operator in c#?
I've googled it but because c# happens to be musical note.. i get a
large noise to signal ratio :P
Simon.... more >>
archive ?
Posted by Jon Rea at 9/18/2003 12:47:54 AM
does this forum have an archive of old posts ?
... more >>
|