all groups > c# > march 2004 > threads for wednesday march 10
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
Coding this bitwise computation...
Posted by Michael A. Covington at 3/10/2004 11:34:29 PM
I'm assembling text attribute bytes (upper and lower nybbles) and have the
following line of code:
ushort a = (ushort)((csbi.wAttributes & (ushort)0x0F) |
(ushort)((ushort)value<<4));
Here value is an enum of base type ushort, csbi.wAttributes is a ushort...
so why is everything cover... more >>
cannot append string
Posted by winthux at 3/10/2004 10:54:52 PM
I have something like this:
socket.Receive( buffor, 0, buffor.Length,
System.Net.Sockets.SocketFlags.None );
string tagS = System.Text.Encoding.ASCII.GetString( buffor );
// in tagS I have always tagS "<s i='404F8C46' c='1'>" , only i is changing
tagS += "</s>";
// this doesnt append ... more >>
Keystrokes inside a Panel
Posted by Yaron at 3/10/2004 10:26:07 PM
How would I be able to process keystrokes inside a Panel? The panel class has no KeyDown event, and I even tried to make a custom Panel derived from Panel, and used its OnKeyDown to create an event, but it doesn't fire when a key is pressed! I'm using this panel on a control I'm making, and I'm draw... more >>
Configuration problems.
Posted by Peter Morris at 3/10/2004 9:17:48 PM
Hi, folks.
I'm just learning ASP programming in C# using Borland C# Builder
I'm having problems, which I think are some sort of configuration
issue, with .NET framework or IIS.
I'm using XP Pro on a standalone PC.
I use C#Builder to create a new ASP.NET Web application.
It creates vario... more >>
Problem with regular expression
Posted by Morten at 3/10/2004 8:58:30 PM
Hi!
I'm trying to validate a password by means of a regular expression. I've
found the following: ^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$ which should
guarantee that the password length is between 4 and 8 characters and that it
contains at least 1 lower case letter, 1 upper case letter and 1 nu... more >>
Can objects be added in bulk to a Queue.
Posted by Peter Rilling at 3/10/2004 7:36:16 PM
After looking at the documentation for the Queue class I became
disappointed, or maybe I just did not see what I want. Is there any way to
add a batch of objects to the queue similar to the AddRange method on other
collections, or do I have to manually add them one at a time? I don't mean
in t... more >>
Chat room
Posted by Benny at 3/10/2004 7:08:58 PM
Hello Experts,
I want to write a chat room using C#. Does anyone in here know any
articles that teaches you how to write a chat room in C#? I tried search
in google, but could not find what I want.
Thanks in advanced,
Benny
*** Sent via Developersdex http://www.developersdex.com ***
D... more >>
FileInfo.Exists exhibits weird behavior
Posted by Rlzsmith at 3/10/2004 6:11:06 PM
I am seeing something I don't understand. I am creating a new file that does not exist. After instantiating StreamWriter passing the file name then FileInfo.Exists is true. Great. If I access FileInfo.Exists before the StreamWriter it is false. Great. Now if I access FileInfo.Exists before and... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to get an element's type in XML ?
Posted by C# newbie at 3/10/2004 6:00:58 PM
Hi Group,
Assume we have an xml as:
<GrandFather>
<Father>
<Son/>
<GrandSon>'Tim'</GrandSon>
</Son>
</Father>
</GrandFather>
How can I get the type of every element during a search by XPath query in
above xml file ? Let's ... more >>
msgina.dll about please help me :(
Posted by Eray Çakýr at 3/10/2004 5:52:18 PM
Hello
How could I use msgina.dll in C#
The reason of using this dll is re-calling the Window Named WINDOWS SECURITY
(also can be accessed by pressing CTRL+ALT+DEL keys) in a winform.I 've
searched
mfc in google but i do not really understand. How could I do this in C#I
look
forward to hearing... more >>
RegEx
Posted by Mac McMicmac at 3/10/2004 5:44:15 PM
I need a regular expression that will match a string (retrieved from a
TextBox in the UI). I need to verify that the string represents a fully path
to a file.
I know these things can get pretty complex - so I'd be happy to keep it
simple by having the expression simply verify the text entered ... more >>
Debugging Woes
Posted by ChrisM at 3/10/2004 4:58:52 PM
I have written an application in C#, using VS.NET
When debugging the program, break-points etc. work find, but if I hit any
unhandled exceptions, I just get an Error box, and no chance to jump back to
the faulty code. The error box talks about invoking Just-In-Time debugging,
and I think I've do... more >>
help me
Posted by CHY at 3/10/2004 4:48:10 PM
I will change listBox's scrollbar,I think add a image to scrollbar,can you
help me?
... more >>
Get type information from another assembly
Posted by Michi Henning at 3/10/2004 4:19:05 PM
Hi,
I'm stuck on a reflection problem. Here is an outline
of what's happening
// In A.exe:
class A
{
// ...
System.Type t = System.Type.GetType("A"); // Works fine
}
// In assembly B, used by A.exe:
// ...
System.Type t = System.Type.GetType("A"); // Returns ... more >>
'+' sign in non-negative numeric
Posted by Peter Luschny at 3/10/2004 4:18:43 PM
Hi all,
is there an equivalent to C++ 'showpos' for C# ?
This format generates a '+' sign in non-negative
generated numeric output.
Thanks, Peter
... more >>
Populate to IE
Posted by Grey at 3/10/2004 4:15:30 PM
Can I export a data list from Data grid of windows application into IE =
HTML page?? If so, how to do it.=20
Million Thanks=20
Eric... more >>
Asynchronous ICMP
Posted by Andrew Jones at 3/10/2004 4:09:48 PM
I have seen some posts here about asynchronous ICMP and I am having a little
problem with threading.
Here is what I am trying to do.
I have a large number of hosts to ping. Each host is a class, that has a
method running in it's own thread. I send out 10 ICMP packets and call the
socket.B... more >>
Rendering ASP controls programmatically
Posted by Zanoni at 3/10/2004 4:06:08 PM
I just started using ASP.NET yesterday (literally). I've been using ASP for some time, though
This code is in mypage.aspx, and it works just as I intended, showing each table in a separately rendered grid
for (int i = 0; i < 5; i++
{ // iterate through dataset table
grd0.DataSource= dsM... more >>
Retrieving list of filenames
Posted by Dan at 3/10/2004 3:07:20 PM
I'd like to retrieve a list of files in a directory, but I don't want the
full path included in the name (i.e. I want "myfile.dat" instead of
"d:\foo\myfile.dat"). Directory.GetFiles returns the full path of all the
files in the directory. Is there a way around this problem?
... more >>
edit & continue
Posted by Gary Hoffer at 3/10/2004 2:58:13 PM
Having come from C++, I don't understand why C# does not
get the same type of "Edit & Continue" support as VB.NET
is scheduled to receive. Is it perceived that we can
somehow "live" with it as opposed to VB programmers?... more >>
Debugger window?
Posted by Angel at 3/10/2004 2:22:25 PM
Visual Basic 6 has a debugger window where you can see the value of a
variable during runtime with "debug.print". Does C# have something like
this?
Thanks.
... more >>
CopyTo() in ArrayList vs. SortedList
Posted by David Veeneman at 3/10/2004 1:56:46 PM
Does a SortedList have a more limited ability to cast that an ArrayList?
I have an array of objects that I store in an ArrayList. I use an ArrayList
because of its flexibility in adding and removing items. I use the array to
populate a list box, so I use the ArrayList CopyTo() method to get a t... more >>
Parent Page Refresh without losing values
Posted by bammer22 at 3/10/2004 1:46:10 PM
I have a parent page that has some form fields. The user can click a link on this page and open a child pop-up window to add a value. Once submitted, the child window is closed and the parent needs to be refreshed to update the value just entered. However, I do not want to lose the values already... more >>
Fw: .NET-BroadcastEventwindow.1.0.3300.0.9:---Application Error
Posted by James P at 3/10/2004 1:09:37 PM
Anyone seen this error?
Any workaround/fix available?
Thanks.
James P
... more >>
CS0679 / internal virtuals
Posted by Rob Agar at 3/10/2004 12:50:12 PM
hey up everyone,
Is there a workaround for the cause of this warning in .net 1.0? (other than
upgrading to 1.1, which my client doesn't want to do)
warning CS0679: Other languages may permit the internal virtual member
<member>' to be overridden
Failing that, can you disable warnings as y... more >>
possible to call javascript from IE hosted winform control ?
Posted by Dave Brown at 3/10/2004 12:21:55 PM
Hello everyone,
Can anybody tell me if it is possible to call a javascript function in the
html from a embedded winform control ?
Note. this is not ASP, just a plain html page with a javascript function
such as
function Hello(name)
{
alart("Hello "+name);
}
and then in the body of t... more >>
Help - Custom tool warning
Posted by kll at 3/10/2004 12:06:07 PM
I am receivng the following error when I add web reference to my windows application
Custom tool warning: DiscoDodeGenerator unable to initialize code generator. No code generated
I believe this is causing other errors in my code because I do not see any reference to my localhost or web service... more >>
Error while complation
Posted by Boniek at 3/10/2004 12:00:35 PM
Hi
I have one problem with my LLBGEN assmebly. When I want to compile my
TestProject I have that error:
"Error: The dependency 'SD.LLBLGen.Pro.DQE.SqlServer.NET11,
Version=1.0.2003.2, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27' in
project 'TestApplication' cannot be copied to the run ... more >>
Splitting a FLAGS enum into its individual enumerated values
Posted by creepiecrawlies NO[at]SPAM hotmail.com at 3/10/2004 11:45:02 AM
Any ideas on what the best way to do this is:
[Flags]
public enum EOptions
{
op1 = 0x01,
op2 = 0x02,
op3 = 0x04,
op4 = 0x08,
op5 = 0x10,
op6 = 0x20,
op7 = 0x40,
op8 = 0x80,
}
public void F()
{
EOptions e = EOptions.op1 | EOptions.op3 | EOptions.op7;
EOptions... more >>
how to cast DBNull to int?
Posted by js at 3/10/2004 11:42:31 AM
Hi, I used a dropdownlist in an ASP.
I try to assign a db field to the SelectedValue. but got this error:
Exception Details: System.InvalidCastException: Object cannot be cast from
DBNull to other types.
<asp:DropDownList id=edit_Province runat="server" SelectedValue='<%#
Convert.ToInt32(Data... more >>
C++ equivalent in C#
Posted by faktujaa at 3/10/2004 11:41:05 AM
Hi All,
Best way to implement the following in C#.
C++ Code:
ClassOne {int a;}
ClassTwo{int b; ClassTwo *pClassTwo;}
I can do the above in C# by using ArrayList as fallows:
ClassTwo{int b; ArrayList objClassTwoList;}
But is there any performance penalty in coding this way or else is there any... more >>
Get value from Datagrid?
Posted by Lasse Edsvik at 3/10/2004 11:33:49 AM
Hello
I've managed to list data from a database and present with a datagrid like
this:
ProductID Productname
65 A
34 B
11 C
problem now is that when I doubleclick on a row i need to pass the value for
selected Product... more >>
.NET with "big" programs
Posted by Amberite at 3/10/2004 11:16:07 AM
Just out of curiosity, are any big name developers / apps using the .NET framework to develop? Is Microsoft itself using the framework to develop any of their products
Thanks!... more >>
SQL query on DataSet
Posted by PawelR at 3/10/2004 10:49:30 AM
Hello Group,
I've dataSet with 3 tables. How to make Sql Querys with 1.join and 2. sql
function min, max :
- Select a,b,c from tab1 as t1 join tab1 as t2 on (t1.id1=t2.id) where
t2.id2<100
- Select a, max(b), min(c) from tab1 group by a
on the DataSet object
Thx PawelR
... more >>
SMTP
Posted by Felbrigg at 3/10/2004 10:37:29 AM
I've created a class to SMTP EMail from web apps, but find that I cant use
this class in a windows app. The "Using System.Web.Mail" gives me an error.
Is there a quick way to utilise this class from a windows app?
... more >>
multiple updates into oracle via C#
Posted by Sam at 3/10/2004 10:26:13 AM
Please help
can I specify a string with mutiple update statements as the command statement using the .NET Managed Provider for Oracle? Or for that matter is there any way to do so from within c# into oracle
Thank you
Sa
... more >>
New Platform Invoke Resource for Developers
Posted by Jesse Kaplan at 3/10/2004 10:21:46 AM
Platform Invoke Resources
In our efforts to make the .Net platform continuously easier to develop for
we have reviewed developer feedback and help requests from Product Support
Services, Microsoft.dotnet newsgroups, and other
blogs(http://blogs.msdn.com/brada/archive/2004/02/06/69095.aspx)... more >>
Copying properties to 'this'
Posted by Adam W Root at 3/10/2004 10:15:31 AM
I had this post that never got a response:
I have a base class A and a derived class B and need to create a new B
from an existing A:
A a = new A();
B b = new B(a);
I've thought about this:
A a = new A();
B b = B.GetFromA(a);
I only want a shallow copy, and I DON'T want to copy eac... more >>
1.1 billion calls per second??
Posted by None at 3/10/2004 9:47:25 AM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/htm
l/csharp02172004.asp
Can that possibly be right or is that chart mislabeled or am I just
interpreting it incorrectly?
... more >>
string comparisons in .NET
Posted by Steve Long at 3/10/2004 9:46:00 AM
Hello,
I am looking for some opinions the way that the:
string.Compare method returns results in the .NET Framework.
I'm building a strings object that inserts strings in sorted order so I
would like to know your expectations about this topic.
Example 1:
In the following, each line is a si... more >>
CheckBox - How to cancel a event?
Posted by SQLNewbie at 3/10/2004 9:43:07 AM
Scenario:
I have a checkbox, if flag=1, check it(as usual, no extra coding is needed),
otherwise keep old status and give Message to user.
Any way to do it?
Thanks in advance!
... more >>
Asynchronous socket problem
Posted by mgroch NO[at]SPAM brisksystems.com at 3/10/2004 9:39:57 AM
To All Networking/.NET/C# gurus out there:
Can anyone explain the behavior of what's happening under the covers
when the following client intereacts with the following server (code
below)? This code is basically a stripped down version of a system I'm
trying to put together that is having majo... more >>
Recursive Function Question
Posted by johnwadeunderwood NO[at]SPAM yahoo.com at 3/10/2004 9:02:41 AM
Hi.. I was hoping someone could help me understand whats happening
in my code, it works fine, I just don't understand one part of it
and would like to.. I've pasted some c# code and xml below..
When I open the xml file, it calls myTest and passes in the xmlNode
and is recursive in calling itse... more >>
XSD of config files
Posted by Francois Vanderseypen at 3/10/2004 8:55:09 AM
Anybody has seen DTD or XSD of web.config and/or app.config?
Alternatively, is there an example of the most extended app.config file you
can have? (to infer a schema)
Thanks for your attention/help.
... more >>
playing with Reflection and Exceptions, need a little help
Posted by Torre Quinn at 3/10/2004 8:34:50 AM
I was just performing the following inorder to gain a deeper understanding
of reflection and exception handling, so don't anyone go breaking their
backs to help me. That said I cant figure out how to accomplish something. I
was trying to write a function that would except an object (in this case ... more >>
Newbie Webform Datalist Question
Posted by Mike at 3/10/2004 8:30:02 AM
I am just beginning C# after being in Powerbuilder for many years. I
have a web application that displays information on a datagrid. After
a user clicks on the datagrid, a new webform to displays with more
detailed information about that record. There are 25 fields that need
to be displa... more >>
Any event?
Posted by Jacek Jurkowski at 3/10/2004 8:24:59 AM
Is there an event that fires globally for application
whenever some window is showing? I want to know
about any window displaying in my application ...
... more >>
Outlook
Posted by T. Pleatman at 3/10/2004 8:23:54 AM
I am trying to use the Interop assemblies with Outlook. If Outlook is
waiting for a login when I call something like
new Microsoft.Office.Interop.Outlook.Application();
it will hang. No error or exception, just hang. And I can't seem to tell if
Outlook is in that waiting for login condition ... more >>
communication via gpib-drivers in c#
Posted by Brink, Thorsten at 3/10/2004 8:15:45 AM
hy,
i have to communicate with multimeters via IEEE-port / gpib-drivers.
all devices are found without causing any problem.
data is read by using "ibrd (ID, data, length)". the data is transmitted in
an ascii-code.
during my tests, i found out that using a string or an array of chars for
... more >>
console to service app. HELPPPPPP
Posted by DaveF at 3/10/2004 8:10:27 AM
The following code does not seem to work in a Windows service. Is there
anyway I can make it work?
Stream inStream = Console.OpenStandardInput();
if (this.archiveName != null && ! this.archiveName.Equals( "-" ))
{
inStream = File.OpenRead(archiveName);
}
if (inStream != null)
{
if (this.... more >>
Network programming and .NET - some advise
Posted by skrishnan NO[at]SPAM snet.net at 3/10/2004 7:11:11 AM
This is my first attempt of network programming, I would like to
client to receive information from a server (another internal PC) in
the firm, so one
is a publisher and another is a subscriber. What exists in .NET that I
could
use to achieve this. I have seen some socket programming examples, ... more >>
Rapidly changing datagrid
Posted by mac_c_0000 NO[at]SPAM yahoo.co.uk at 3/10/2004 5:37:54 AM
Hi all I looking for a bit of help.
I have this app with a datagrid that needs to add rows or edit cells
at a rate of about 100 rows a second (15-16 columns in a row) with
data received through a socket connection, (no user edits will be
allowed, it's strictly a viewer)
I've used static dat... more >>
creating an array of objects
Posted by sebastian at 3/10/2004 4:16:10 AM
I use Visual Studio .NET 2002 for developing such a program
(...
public Population(int quantity, int gntpLength
currentPop = new Person[quantity]
for (int i = 0; i < quantity; i++
currentPop[i] = new Person(gntpLength)
// * Console.WriteLine(currentPop[i].ToString() + "\n")
... more >>
Retrieve Z-Order position
Posted by Roland Wolters at 3/10/2004 2:38:25 AM
Hi,
My application shows two seperate forms. I need both forms to be visible.
Form one is kind of a paret form so it has a handle to form2. So when the
user activates form1 a try to do from2.BringToFront but that causes me to
loose focus. Yes I can think of a trick to send focus back to for... more >>
|