all groups > c# > april 2004 > threads for tuesday april 13
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
network stream
Posted by cs at 4/13/2004 11:59:04 PM
I need to get the position and also seek in a network stream, is there an
easy way to do that? (I am converting some java code so thats the easy
path).
... more >>
Multicast socket
Posted by Jim H at 4/13/2004 11:06:58 PM
Is there something special I need to do to send data to a multicast IP and
have it go across a router? Router is a Win2000 Server connecting 2
networks via RRAS PPTP. The routing appears to be working because I can
ping the multicast address and get responses from the server on the other
netwo... more >>
AudioVideoPlayback: swapping videos = black interval
Posted by D Cameron at 4/13/2004 11:04:18 PM
I'm using the (managed) Microsoft.DirectX.AudioVideoPlayback namespace
to program an app where I want to quickly swap the video that is being
displayed, playing the new video from the position where the old one
left off. Here's a sample of the relevant code:
// when this code is executed t... more >>
How do I cancel a BeginReceiveFrom ?
Posted by Jim H at 4/13/2004 10:57:07 PM
I'm sure this has been asked a million times, but I did a search and didn't
see anything.
I have a socket in my form and I call MySocket.BeginReceiveFrom to listen
for incoming data asyncronously. How do I cancel it so I can close the
application. I call MySocket.Shutdown(SocketShutdoen.Both) ... more >>
string length
Posted by Aaron at 4/13/2004 10:48:32 PM
I have a string assigned a value from a querystring
public string a = request.querystring[1]
how can i make sure string a is less than 250 char? without using if's
aaron
... more >>
Problems with Converting Sting to Byte Array
Posted by Max Gattringer at 4/13/2004 10:18:44 PM
I have written a little programm, which converts normal Text into Unicode
Bytes - nothing special, but i tried to creat 2nd Encoder which converts
strings(numbers) in a textBox (strings which i had converted from
UnicodeString to Bytes) to a UnicodeString.
<textbox Text : 0770>
->>> byte[] <--... more >>
Reflection question
Posted by Ben Fidge at 4/13/2004 9:59:42 PM
I'm using Reflection to obtain data about a given objects public properties.
I need to perform different actions depening on whether a properties class
type is derived from one of the collection classes or not.
Take the following theoretical classes:
public class MyClass {
private int F... more >>
CodeDom and CodeBinaryOperatorType, no "not equal"
Posted by Glenn Roberts at 4/13/2004 9:26:57 PM
Hi,
I've been using CodeDom to generate and compile source code...
.....but, have found that in the CodeBinaryOperatorType (used when making a
CodeBinaryOperatorExpression), there is no "not equal"
.....there are the usual, equals, greater than etc...but no, not equals.
I would have thought... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
newbie question on assigning color at run time
Posted by Raymond Du at 4/13/2004 8:35:49 PM
Hi,
How do I change the backcolor of a control at run time. I know I can do
this: .backcolor = Color.Yellow. But what if I want to use color #ffffffcc?
TIA
... more >>
String cleansing
Posted by Patrick de Ridder at 4/13/2004 8:30:15 PM
Given a short string that should only contain an (integer) number, is there
a way to filter out anything that is not a number?
Many thanks.
Patrick.
... more >>
systray
Posted by mario at 4/13/2004 8:09:37 PM
How to put an application in systray with F1 or any shortcut button?
... more >>
2 datarepeaters on same page
Posted by suzy at 4/13/2004 8:08:32 PM
hello,
how can i have multiple datarepeaters on the same aspx page?
i have tried something similar to this:
<asp:repeater id="repeater1" runat="server">
<itemtemplate>
<td>text</td>
</itemtemplate>
</asp:repeater>
<asp:repeater id="repeater2" runat="server">
<ite... more >>
Remoting: A blocking operation was interrupted by .....
Posted by José Joye at 4/13/2004 5:42:38 PM
When I unload my appdomain, I got the following exception:
A blocking operation was interrupted by a call to WSACancelBlockingCall:
.....
My appdomain uses remoting...
From previous post, I know that I should call "RemotingServices.Disconnect"
to close the remoting channel while unloading m... more >>
datagrid paging buttons
Posted by David Petersen at 4/13/2004 5:12:01 PM
I need to change the paging buttons in my C# web datagrid from "previous"
and "next" to something like "Records 10-20 of 100", etc., depending on
which page the user is on. Any ideas?
Thanks,
Dave
... more >>
column null
Posted by juan at 4/13/2004 5:05:13 PM
hi,
how do i chk if a column in my dataset is null?
... more >>
Windows Forms application configuration
Posted by Dave Veeneman at 4/13/2004 4:53:05 PM
Is there a 'best practice' methodology for storing and retrieving
configuration data in C# Windows Forms applications? I'm talking about the
sort of stuff that went into INI files in the old days.
I'm planning to create a class to hold initialization information, then
serialize the class to th... more >>
Help w/ choosing a control type
Posted by Julie at 4/13/2004 4:51:46 PM
I have the following need for a custom control.
Two columns, n rows.
Column 1 is simple text (non-editable).
Column 2 is drop-down combo boxes (1 for each row).
Needs to be sortable (with column headers).
I'd prefer the second column to not display a column of combo boxes, but rathe... more >>
aplication blocks
Posted by suzy at 4/13/2004 4:32:42 PM
hi,
can anyone explain to me how application blocks differ to references. from
my understanding an application block is a reference to a pre-compiles bit
of code, (which is what a reference is).
thanks in advance.
... more >>
Appended text in the message
Posted by Wajih-ur-Rehman at 4/13/2004 3:30:58 PM
Hi,
I use the following way to write to the Windows Event Log from my C#
application.
EventLog eventLog = new EventLog();
eventLog.Source = "My Source";
eventLog.WriteEntry("Just a test:",EventLogEntryType.Error);
Initially i was using 1.0 framework with VS 2002. It wrote "Just a test"... more >>
enumerators
Posted by juan at 4/13/2004 3:25:27 PM
hi i have an arraylist that has doctor objects with various properties,
members and methods.
i want to enumerate this arraylist object.
but i dont understand how.
this is what i have done
ArrayList arrDoctors = Doctors.GetAllDoctors();
for (int cnt =0;cnt<1; cnt++)
{
Doctor p = ... more >>
HELP: where's my C# csc compiler???
Posted by KevinGPO at 4/13/2004 3:24:27 PM
Ok. I just downloaded and installed the MS .NET SDK 1.1 (~120MB).
However, I can't seem to find the csc.exe or vsvars32.bat? I searched
for those files but they're not on my PC.
I thought the command-line c# compiler comes with sdk 1.1?
To C# or not to C#. That is the statement.
*** Sent ... more >>
VB.NET Module and C#
Posted by Kevin Jackson at 4/13/2004 3:14:00 PM
Is there anyting in C# equivilent to the VB.NET module?
... more >>
DirectoryEntry Disposal Test
Posted by cameron at 4/13/2004 3:04:59 PM
I am in a situation in which I am recieving a DirectoryEntry that may or
may not be already be disposed. I need a very fast, (from a code point
of view not necissarily a coding point of view), way of testing if it
has been disposed.
Currently I have:
try
{
string Junk MyDirectoryEntry... more >>
Client/Server decoupling
Posted by Ken Allen at 4/13/2004 2:58:14 PM
I am relatively new to .Net and C#, but I hav ebeen programing in other
languages and done some COM work for a number of years. I am attempting to
understand how to map an older program architecture into .Net -- not looking
to do it at this time, just to understand how I would achieve it.
In t... more >>
property prob
Posted by ichor at 4/13/2004 2:36:29 PM
hi
public string LastName()
{
get //ERROR HERE
{
return this.lastName;
}
}
this code gives me a compilation error.
says
: ; expected
what am i doing wrong.?
... more >>
Differnce between virtual/override and new
Posted by Jazper Manto at 4/13/2004 2:17:11 PM
hi
what is the difference between virtual / override and new? until now i only
knew the virtual / override thing.
thanx for hint.
Jazper
//--- new ----------------------------------------
public class MyBaseA
{
public void Invoke() {}
}
public class MyDerivedA : MyBaseA
{
... more >>
global instances
Posted by fpleyer76 NO[at]SPAM gmx-dot-de.no-spam.invalid at 4/13/2004 2:05:46 PM
Hi,
I have a project with 5 Classes. PMAIN ist my main class, where I make
instances of all the other classes.
The Class ENVIRONMEN, ROOM and CHARACTER are instanciated only one
time !!!
Many methods in all these classes need to be some instances of the
other classes as prameters.
e.g. my... more >>
POCKET PC CUSTOM CONTROLS HELP!!! please...
Posted by Jax at 4/13/2004 1:51:06 PM
I'm going absolutely insane trying to set this thing up....
I've read a tutorial on setting up these controls and I understand you need to have a design time version and a run time version
My run-time version is fine and was working perfectly by itself, until VS decided to go spastic and started ... more >>
How to convert string charset?
Posted by Miros³aw Iwanowski at 4/13/2004 1:27:48 PM
Hello!
I need to conver string (sql statement) from one Polish charset standard
(ISO-8859-2) to another (Win-1250). Using help I managed to create line like
this one:
sql=Encoding.ASCII.GetString(Encoding.Convert(Encoding.GetEncoding("ISO-8859
-2"),Encoding.GetEncoding("windows-1250"),Encodin... more >>
DataSet: passed by value, but behaves like by ref
Posted by Christian Ahrenkiel at 4/13/2004 1:25:57 PM
Hi,
I've got a DataSet (ds) which was created by a DataAdapter (da) method:
ds.Fill(ds).
This DataSet is passed through various methods (by value). Each method
changes some fields in the DataSet (for converting data in another format).
As this DataSet is _not_ class-wide declarated, each... more >>
format
Posted by ichor at 4/13/2004 1:12:42 PM
hi
how do i format my c-sharp code?
sometimes when i delete certain lines of code , the code is not formatted
automatically.
how do i do that?
thnx
... more >>
"overclassing"
Posted by Tabulator at 4/13/2004 12:55:54 PM
Hi
it's possible to "overclass" (at runtime) a base control with a new instance
of a derived class?
Thanks
... more >>
Passing arguments to C++ class library
Posted by Philipp at 4/13/2004 12:46:03 PM
My application is written in C# and I'd like to pass 'double' array to managed C++ class library (which is a native C++ wrapper)
Of course the array should be passed by reference and not by value, therefore the C++ prototype is something like that
Void myFunc(double * myData
Since C# doesn't sup... more >>
Help on sppeding up a 15,000 line batch process
Posted by VM at 4/13/2004 12:18:35 PM
In my Windows app, I'm running a batch process that's composed of a FOR loop
that'll run 15,000 times (datatable row count), copy cthe data of each
row -3 fields- to a struct, and send the strct to an external method (using
DLLImport). The problem is that the processing speed is very inconsisten... more >>
Tutorial on XML namespaces?
Posted by Jon Davis at 4/13/2004 11:36:14 AM
I would like to parse RSS 1.0 (not RSS 2.0) files. But I don't know how to
work with these XML namespaces! And when namespaces are improperly used in
RSS 2.0 files, I don't know how to deal with them and exceptions keep
getting thrown! Does anyone have a tutorial or know of one that deals with
X... more >>
Memory management/leak?
Posted by James Sadlier at 4/13/2004 11:34:51 AM
I'm writing a windows service, that does some stuff every second in a loop,
generating random numbers. It works fine apart from the fact that for some
reason it's using an extra 8K of memory every loop. I've isolated it down to
the use of the Random object. When I remove the use of this object my... more >>
multiple datarepeater
Posted by suzy at 4/13/2004 11:10:44 AM
hello,
how can i have multiple datarepeaters on the same aspx page?
i have tried something similar to this:
<asp:repeater id="repeater1" runat="server">
<itemtemplate>
<td>text</td>
</itemtemplate>
</asp:repeater>
<asp:repeater id="repeater2" runat="server">
<ite... more >>
Quick Mutex Question
Posted by dln at 4/13/2004 11:09:55 AM
If I were to use the following call:
Mutex my_mutex = new Mutex();
bool got_lock = my_mutex.WaitOne(500, false);
and then got_lock returns false, do I need to call "my_mutex.ReleaseMutex()"
on it? So put another way, should I always call ReleaseMutex, regardless of
whether or not I got the... more >>
QuickSort
Posted by user NO[at]SPAM domain.invalid at 4/13/2004 10:41:41 AM
Hello
Is there any class in C# with qsort() function ?
Thanx
Michal
... more >>
Microsoft graph and C#
Posted by Andres Romero at 4/13/2004 10:41:03 AM
I can´t find information about how to work with a Microsoft Graph object in windows forms using C#
I have a macro in PowerPoint which creates slides and elements like graphs using Microsoft Graph 10 ("MSGraph.Chart") and I'm migrating to C# with Visual Studio .Net 2003 but not enough information ... more >>
Problem with pages talking between two servers
Posted by Brent at 4/13/2004 10:37:57 AM
Hi,
I have a problem. We have web applications on 2 seperate servers that need
to talk to each other. App 1 needs to pop open a second windos with App2 in
it where you choose a value and that is returned to App1. The problem is
that when we try to call App1 from App2 with a value say in it's add... more >>
Getting Rid of the Nulls
Posted by Drew at 4/13/2004 10:17:07 AM
I have been using System.Text.Encoding.Unicode.GetString(byte[],0,72)
to converter a byte array from the registry to a string.
This works, but I end up with a bunch of null characters after
the "good" string data that I need to parse. This is evidenced
by the fact that string.length returns 3... more >>
xml
Posted by ichor at 4/13/2004 10:12:39 AM
hi,
I have a table in sql 2000 that has a few fields. one of which is
datecreated.
I have an xml document that i created from this table.
i need to find out the max(created date) from this xml file using c#.
how do i do this?
do i need to use xpath?
or do i need to use one of the reade... more >>
Queue read by multiple threads
Posted by Hollywood at 4/13/2004 10:07:07 AM
I have a system in which I have a single thread that places data on a Queue.
Then I have one worker thread that waits until data is put on the thread and
dequeues the Queue and processes that information. Works just fine.
However, I possibly need 1..m worker threads that can act on the same pi... more >>
"Hiding" an inherited property?
Posted by Jacob at 4/13/2004 9:57:50 AM
Is there a way to make a property of an inherited class invisible to the
programmer? I know that using the keyword "new" allows you to create
another property in the place of the existing one, but how can I make the
property hidden and not available at all?
Thanks,
Jacob
... more >>
HTML TextBox
Posted by Mike Morse at 4/13/2004 9:49:17 AM
Does anyone know of a textbox like control that allows to markup text and
save the results as HTML. This would be very helpful.
Thanks
-mike
... more >>
RichTextBox
Posted by user NO[at]SPAM domain.invalid at 4/13/2004 9:44:06 AM
Hello
Is there any proprety/method to set that i always see new text (vertical
scrollbar always on bottom) ?
Thanx
Michal
... more >>
Sharing classes (.cs) between multiple projects
Posted by cybertof at 4/13/2004 9:35:52 AM
Hi !
What is the common use of sharing a single .cs across multiple project
files ?
I think it's to share common classes between projects.
I have actually a .cs file shared accross multiple projects in a same
solution. It's nice to have a common "set" of Classes.
Is this the only way t... more >>
Windows Forms - Extended DataGrid.
Posted by eladgutman NO[at]SPAM hotmail.com at 4/13/2004 9:17:34 AM
Hi,
I wanna buy an advanced 3rd party DataGrid for windows forms .Net
framework.
The best tool for me will be a grid inherits from the
'Windows.Forms.DataGrid' object, meaning that I will have a full
compatibility with the object I'm using today.
Any recommendations are most welcomed.
... more >>
Serialize Person Object
Posted by Roberto Carriquiry at 4/13/2004 9:08:16 AM
I am writeing a webService that needs to recieve a CDO.Person object as a
parameter. but when I run it I have a runtime error.
Cannot serialize member CDO.PersonClass.DataSource of type CDO.IDataSource
because it is an interface
I assume that something is wrong with the serialization of this... more >>
Drag/Drop custom controls
Posted by Curtis Justus at 4/13/2004 8:58:30 AM
Hi,
My goal is to have a series of thumbnail images on a control/panel and to
drag/drop those items onto another control (i.e. a treeview). I am able to
drag one item and need to somehow select more than one thumbnail image. I
would like to use the Control key/Left Mouse Click to select more... more >>
int v. Int32, string v. String
Posted by Mark at 4/13/2004 8:55:31 AM
Is int to Int32 as string is to String?
If that's the case, then the following is logically equivalent:
//equivalent
int MyInt = 5000;
Int32 MyInt2 = 5000;
//equivalent
string MyString = "slick";
String MyString2 = "slick";
Correct? Is int then essentially an alias for Int32?
Tha... more >>
event handler
Posted by bpfa at 4/13/2004 8:52:21 AM
hi
there is a way to obtain the handler's list for a specific event of an
object?
thanks
... more >>
Close an app from another app
Posted by Susan at 4/13/2004 7:56:03 AM
I am finding the windows handle for an application using the FindWindow() call. I need to then close that application if it is running. Any suggestions on how I should do this? I tried to use the CloseHandle() call, but that doesn't seem to work. Maybe I am just doing something wrong, or maybe I... more >>
Reset Password Right
Posted by Sneid at 4/13/2004 7:56:02 AM
Hi
I'm trying to apply the "reset password" right to a computer object in Active Directory..
To do this, i used the ActiveDS lib
Whatever i do, i get the 'The security ID is invalid
Here is my little code (in C#)
ActiveDs.IADs dsobject
Ac... more >>
Alternative to 'abstract' in base forms?
Posted by Dave Veeneman at 4/13/2004 7:38:21 AM
I'm creating several forms that inherit from a base form. I want to require
the derived forms to implement certain methods of the base form. The easy
solution would be to declare abstract methods in the base form. But I can't
do that, since the WinForms Designer can't instantiate an abstract form... more >>
Sending XML to a Web Service
Posted by Brent Goodwin at 4/13/2004 7:16:03 AM
I'm using a web service proxy with a method that accepts a byte[] as a parameter. The intent is to send an XML document via this byte[]. I'm trying to do it with the following code
MemoryStream byteStream = new MemoryStream()
XmlTextWriter xml = new XmlTextWriter(byteStream, System.Text.UTF8Enc... more >>
Read Text From Stream Then Reposition And Repeat
Posted by Garibaldi at 4/13/2004 6:30:14 AM
Thanks to all...
I need to read a block of text, operate on the read text then move to the
next text block and so on and so on from a 650MB file.
Pseudo code would be something like this:
1. Start at the beginning of the text file
2. Read in 100K of text
3. Work with the 100K of text
4.... more >>
Forms authentication
Posted by Bonj at 4/13/2004 5:41:02 AM
I'm trying to use Forms authentication for my site, I've got
<authentication mode="Forms"><forms loginUrl="MyLoginPage.aspx">
.....</forms></authentication>
in my web.config file, and I've designed a login page. But the login page never gets displayed. How can I make the login page get displayed ... more >>
Data Binding for ListView?
Posted by Peter at 4/13/2004 5:11:04 AM
Hello
Thanks for reviewing my question. I noticed that the ListView properties do not offer any Data Binding option. Did Microsoft forget this
Many Thank
Peter... more >>
How to get pixel in picturebox??
Posted by MAY at 4/13/2004 5:00:41 AM
hi, i m new in C#....... here have the simple question abt GDI+
i draw some lines and rectangle into a picturebox by using pen and brush.
By what way, i can check a particular of pixel on this picturebox is drawed
or not??
Beside, how to convert these lines or rectangle shapes into objects... more >>
Reflection: Determining a Method's Attributes from within the Method
Posted by Good Enchiladas at 4/13/2004 4:45:19 AM
Is it possible to determine a method's own attributes from within the method
without hardcoding the name of the method as a constant within the method?
Please tell me if it is possible and how it is done.
Thank you,
Kelly
... more >>
NT Service & Window messages
Posted by michaelc NO[at]SPAM random-logic.com at 4/13/2004 4:40:42 AM
Hi,
I'v created NT service using Windows service project template.
Now , I want to recieve WM_USERCHANGE and WM_DEICECHANGE messages
after the service started.
How can i do this?
Thanks.... more >>
Newbie Question
Posted by altergothen at 4/13/2004 3:12:03 AM
Basic of basics ......
OK I have created a basic winows application using Sharp Develop.
I have built it successfully as a windows .exe.
The problem is that I am only able to run this application on my own
computer,
because I have the .Net framework installed.
How can I compile my applicat... more >>
character set encoding: how to generate errors
Posted by spacehopper_man NO[at]SPAM yahoo.com at 4/13/2004 2:33:44 AM
Hi -
I am using the Encoding class to encode unicode strings.
I am encoding into a variety of target encodings eg utf-8,
'iso-8859-1' or 'iso-8859-5' etc
like this:
encodedBytes = Encoding.GetEncoding("iso-8859-1").GetBytes(TextBox1.Text);
anyone know a technique to cause exceptions t... more >>
About Interop
Posted by Bilo at 4/13/2004 2:17:25 AM
When I add a reference in Visual Studio to quartz.dll it creates a new file
named "Interop.QuartzTypeLib.dll"
into to bin folder. My app only works when this file is in the application
folder.
Is is legal to ship this file with my app ? Does Microsoft allow it?
If not how can I use directShow w... more >>
Debug/release ASP pages?
Posted by Bonj at 4/13/2004 2:01:04 AM
When building a windows forms application in C#, I notice that you get two different folders for different builds, debug and release. But when building a web application there is only one, c:\inetpub\wwwroot\<projectname>\bin ..
Am I right in thinking that whether the current build that is prevale... more >>
One Copy at a Time
Posted by Thom Little at 4/13/2004 1:48:28 AM
How can I limit an application to running only one copy of itself at a time?
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--
... more >>
Uninstall - Target Still Running?
Posted by Thom Little at 4/13/2004 1:36:04 AM
During an uninstall, how can I check to see if the application I an
uninstalling is currently running?
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--
... more >>
instances and constructors: creating using System.Type
Posted by Jamie B at 4/13/2004 12:18:04 AM
Is it possible to use System.Type, Activator or whatever to create a
complete "blank", unitialized object of a given type, and then at a later
time call a constructor on it. The only caveat is that before I call the
constructor I still want the object to correctly return its type if
GetType() is... more >>
|