all groups > c# > july 2004 > threads for thursday july 8
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
Struct VS Class
Posted by Chua Wen Ching at 7/8/2004 10:58:01 PM
Hi there,
I am very curious on this code:
// declared as structure
[ StructLayout( LayoutKind.Sequential )]
public struct Overlapped
{
public IntPtr intrnal;
public IntPtr internalHigh;
public int offset;
public int offsetHigh;
public IntPtr hEvent;
}
// declared as class
[ S... more >>
Why lookup can't found base class?
Posted by Alex Sedow at 7/8/2004 10:57:38 PM
Why C# lookup mechanism can't found indirect base class by name?
It is seems very strange: derived class can access to base members, but not
class itself.
Example:
namespace N1
{
class B
{
public static int i;
}
class D : B
{}
}
class C : N1.D
{
B *... more >>
HOWTO: Detect IIS version ?
Posted by Tamir Khason at 7/8/2004 10:57:04 PM
The target: Detect IIS version on server
The way:
switch (Environment.OSVersion.Version.Major)
{
case 4:
return IISVersion.IIS4;
break;
case 5:
return IISVersion.IIS5:
break;
case 6:
return IISVersion.IIS6;
break;
default:
return IISVerion.None;
break;
... more >>
SQL-DMO problem
Posted by Michael C at 7/8/2004 10:46:50 PM
Hi all,
Not sure if this would be better posted here or in one of the SQL groups,
but I'll try here first cause you guys are so smart :) I'm writing an app
that uses SQL-DMO to enumerate the SQL Servers on the net. Here's what the
code looks like:
private ArrayList getSqlServerList()
{
... more >>
How to create a protected method, using CodeDom
Posted by tapas.pradhan NO[at]SPAM gmail.com at 7/8/2004 10:39:28 PM
Hi,
Generating a .cs file using CodeDom. It generates the class fine.
But i have few queries about class generation.
1. How to create a protected member?
By default it generates a private method. To make it static say, I do
something like this -
CodeMemberMethod method = new CodeMemberM... more >>
pinvoke and callbacks
Posted by Jeff Lederer at 7/8/2004 9:17:11 PM
I have created a simple test C# console program that calls an unmanaged C
subroutine in a DLL where one of the arguments is a callback to the C# code.
I noticed that when the callback has no paramaters, it works fine. But when
there are parameters, I get the exception: "Runtime failure check #0: ... more >>
usercontrol in ie
Posted by Matthias Pieroth at 7/8/2004 8:36:55 PM
Hi NG,
ich habe ein UserControl in eine HTML-Seite eingebettet und zeige es im IE
an. Die dll und htm liegt auf einem weberver. Hier das html-File:
<object id="TestCtrl1" height="100" width="500"
classid="TestCtrl.dll#TestCtrl.TestCtrl">
</object>
Klappt so wunderbar. Nun kam aber zu die... more >>
Remoting and function
Posted by Mark Broadbent at 7/8/2004 7:48:07 PM
Could someone clear this up for me a bit. I am a little bit uncertain about
this but this is my understanding. Please correct where wrong or bits
missing.
There are two types of remoting :-
<Marshal-by-reference>
<SAO Properties = "Object instanciated on the server. Default
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Remoting
Posted by Mark Broadbent at 7/8/2004 7:30:30 PM
Could someone clear this up for me a bit. I am a little bit uncertain about
this but this is my understanding. Please correct where wrong or bits
missing.
There are two types of remoting :-
Marshal-by-reference
Server Activated objects (SAO). Object instanciated on the
serv... more >>
How do I escape from the exponential format when writing Double.ToString()
Posted by Rod Brick at 7/8/2004 6:19:02 PM
I'm trying to print a Double in straight decimal form, not exponential. I can't seem to accomplish this. This seems like it should
be simple enough. The output I'm looking for is "0.00001", not "1E-05".
I'm obviously baffled by the NumberFormatInfo class, I can't seem to make it do what I wan... more >>
VS.NET 2005 and 2003
Posted by Phil Wright at 7/8/2004 5:59:05 PM
I have installed the VS.NET 2005 Beta 1 and now VS.NET 2003 projects in
VS.NET 2003 do not compile. Is the Beta supposed to run side by side with
the older version? Or is it supposed to make older versions stop working any
more?
... more >>
Show an image field
Posted by Alberto at 7/8/2004 5:48:22 PM
I want to see in a c# application the image who is in the field Picture of
the table Categories of NorthWind. How can I do it?
Thank you.
... more >>
Serialization with/out WebService
Posted by Tamir Khason at 7/8/2004 4:37:17 PM
Strange thing indeed...
I serialize my object on Client Side and apply it to WS, wich recieved
XMLDocument as Input.
WS saves it and it's possible to retrive the XMLDocument from WS by Client
Side and the Deserialize it. This working fine!
The SAME object with SAME serialization procedure, BUT ... more >>
Contrast and ColorMatrix
Posted by Bill Petzke at 7/8/2004 3:55:02 PM
I am of the understanding that a ColorMatrix can be used to adjust the contrast of an image. Any idea how this is done?... more >>
Thread synchronization problem
Posted by Ivan at 7/8/2004 3:02:15 PM
Hi
I have following problem: I'm creating two threads who are performing some
tasks. When one thread finished I would like to restart her again (e.g. new
job). Following example demonstrates that. Problem is that when program is
started many threads are created (see output section), when only ... more >>
Win Control to display/modify ascii files?
Posted by VM at 7/8/2004 2:39:15 PM
In my Windows application, I use the streamreader to display a txt file into
multi-line textbox and /streamwriter to modify the txt file if the user
decides to change the contents through the textbox control. Is there an
easier way of doing this? Is there some control that automatically displays
... more >>
Numeric Country Code
Posted by Susanne Christe at 7/8/2004 2:38:39 PM
Hi all,
I know how to use System.Globalization.RegionInfo, but I have problems
to get the Numeric Country Code like this here:
http://www.atmajaya.ac.id/Weblinks/KodeNegara.html
ISO-3166.
Do somebody know how to get them in C#.
Thx
Susan
... more >>
install of C# 2005 express
Posted by Jeff at 7/8/2004 2:36:40 PM
Is it possible to install C# 2005 express on a computer that have VS 2003
installed??
I want to be able to use both version of VS, evaluating VS 2005 and
programming in VS 2003!
Is this possible??
Jeff
... more >>
OFF: Question to MVPs :)
Posted by Tamir Khason at 7/8/2004 2:17:13 PM
What NNTP client are you using?
How it is possible to track ALL messages responded and flaged?
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
... more >>
Compiling (?) for C-Sharp using Mono ... problem w/ InitializeComponent
Posted by arcadefx NO[at]SPAM msn.com at 7/8/2004 2:00:21 PM
I am new to programming in C# using Mono (mcs). What .dll does this
"InitializeComponent()" method reside in?
Code:
// mcs web.cs -lib:C:\Program~1\Mono-1.0\lib -r:System.Data
-r:System.Web -r:System.Web.Services -r:System.Drawing
//
using System;
using System.Collections;
using Syste... more >>
prompt
Posted by Bill Yin at 7/8/2004 1:54:05 PM
javascript-- prompt
C# -- ????
I want pop a winform for inputting my password before submitting
... more >>
OK to call return within a lock?
Posted by Earl Teigrob at 7/8/2004 1:11:57 PM
If I set a lock within a function and then call a return within the lock,
will the lock on the object be released immediately?
Thanks
Earl
... more >>
interger to binary
Posted by mei xiao at 7/8/2004 12:55:58 PM
Hi, there,
I want to change an integer into 4 bytes, what should I do? Thank you.
-May
... more >>
integer into binary in c sharp
Posted by mei xiao at 7/8/2004 12:40:54 PM
Hi, there,
I want to change an integer into 4 bytes in c sharp, what should I do? Thank
you.
-May
... more >>
Couln't find namespace ' Microsoft.Web.Services.Dime'
Posted by rp at 7/8/2004 12:21:48 PM
HI,
I got this compilation error for using namespace 'using
Microsoft.Web.Services.Dime' because I need to call 2 webservices in my
C# project. Would anyone tell me how can get this 'using
Microsoft.Web.Services.Dime' namespace? Thanks in advance.
rp... more >>
SubComponent to appear in main component's properties?
Posted by Glenn Shukster at 7/8/2004 11:43:34 AM
Hi
In Delphi a call to SetSubComponent will expose all of a subcomponents
properties and events at design time to the main component.
Does anyone know how to do this in CSharp?
eg
MyObject
+ MySubObject
click on + and see MySubObject's properties of (Height, Weight, age)
MySubObject
- H... more >>
Help with error message
Posted by Christopher Ireland at 7/8/2004 11:30:42 AM
Hi --
I'm not looking for a definitive solution here, just some pointers in the
right direction.
I have a very simple UserControl in an HTML page enclosed within <object>
tags virtually identical to this one:
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=187
The only... more >>
.Net Remoting problem: No connection could be made because the target machine
Posted by Data at 7/8/2004 11:27:28 AM
In my project I want to execute some commands on the remote machine. I
am using .Net Remoting to achieve this. My server which is an exe is
copied on the remote machine and it receives command from client which
is executed by the exe. I am facing problem while executing the exe on
the remote mac... more >>
Storing a user's password
Posted by Jefferson Cowart at 7/8/2004 11:18:01 AM
I'm writing a program for a college to use to allow students to register their computers for use on the network. Aside from a bunch of security related checks I would like the program to offer to store the users network username and password so when they access network servers they are not prompted ... more >>
displaying many lines in ListView
Posted by Piotrek Stachowicz at 7/8/2004 11:10:07 AM
Hello,
Is there possibility to display many lines of text in a single item (in
ListView)? I'd like the text to wrap. I must use View.Details mode.
If so, how?!
Thx
Piotrek
... more >>
Declare an Event within an Interface
Posted by Derrick at 7/8/2004 10:45:20 AM
How does one declare an event within an interface, so that every class which
implements that interface must implement that event? I think I just need to
specifiy the actual event as I would a function, but what about the
delegate?
Up to now, all my interfaces have only dealt with properties a... more >>
debug flag at run-time?
Posted by Daniel P. at 7/8/2004 10:30:15 AM
How can I figure out at run-time if he code that runs is a debug or a
release build?
Thanks!
... more >>
Why bother with .Net language conversion?
Posted by softeng84 NO[at]SPAM yahoo.com at 7/8/2004 10:20:48 AM
There are various utilities that you can buy to convert VB.Net to C#
(C-Sharpener For Vb, Instant C#, etc.). I'm sure there are others that
convert C# to VB.Net. I don't understand the point of these tools. MS
designed .Net so that I can create assemblies in one language (VB for
instance) and ca... more >>
Convert a string to Ascii codes and then back to string again
Posted by Kai Bohli at 7/8/2004 9:53:38 AM
Hi all !
I need to translate a string to Ascii and return a string again. The code below dosen't work for
Ascii (Superset) codes above 127. Any help are greatly appreciated.
protected internal string StringToAscii(string S)
{
byte[] strArray = Encoding.UTF7.GetBytes(S);
string ... more >>
why can I overload the != operator??
Posted by Chris at 7/8/2004 9:36:01 AM
To me, this seems rather redundant. The compiler requires that if you
overload the == operator, you must also overload the != operator. All I do
for the != operator is something like this:
public static bool operator !=(MyType x, MyType y)
{
return !(x == y);
}
That way the == opera... more >>
Native code
Posted by Lubos at 7/8/2004 9:10:04 AM
Hi,
Is possible when i create application in C#, then this application compile
in native code ( application run without .NET Framework ) ?
Thanks Lubos
... more >>
Function Implementation
Posted by morphius at 7/8/2004 9:04:46 AM
I have a function called PostName(). An error occurs when i try to run
it -- the error says:
"Method PostName in type group.name from assembly PostName does not have
an implementation"
What does this mean?
Thanks!
*** Sent via Devdex http://www.devdex.com ***
Don't just participate i... more >>
Win32 Svc!
Posted by Vai2000 at 7/8/2004 8:58:38 AM
How do I add a dependency on a Win32 in C#? My WinSvc depends on MSMQ
Service
TIA
... more >>
Graphical engine
Posted by Alexander Muylaert at 7/8/2004 8:40:13 AM
Hi
I'm in need of a graphical engine for custom-made-GUI. I don't mind writing
it myself, it's fun, but
I need it to run on Pocket and PC.
What technology can I use best in .net. I don't need complex drawing. I
need a lot of lines, fills and drawing bitmaps with alphablending. Can I
us... more >>
P/Invoke structure question
Posted by Duncan Mole at 7/8/2004 7:58:35 AM
Hi,
This is probably an easy one but it iy first bit of p/invoke. I am trying to
use the following C struct in a call:
typedef struct
{
BYTE SRB_Cmd;
BYTE SRB_Status,
BYTE SRB_HaId;
BYTE SRB_Flags;
DWORD SRB_Hdr_Rsvd;
BYTE HA... more >>
Create DSN
Posted by Steve Sweales at 7/8/2004 7:55:14 AM
I'm trying to find some code on how to create a DSN using C# and
SQLConfigDataSource.
Can anybody help me please, before I tear my hair out!!
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!... more >>
Events In Form Thread
Posted by James Lennon at 7/8/2004 6:03:03 AM
I want to execute an events delegates in the windows forms thread. What is the easiest way to do this?
I created another delegate and called BeginInvoke on the active form and inside this delgate handler I invoked the events delgates. Is there an easier way?
Thanks in advance,
James... more >>
What is the opposite of BitConverter.ToString(byte[]) ?
Posted by grennis NO[at]SPAM gmail.com at 7/8/2004 5:49:57 AM
If I run the following code:
Byte[] bytes = System.Text.Encoding.ASCII.GetBytes("test");
return BitConverter.ToString(bytes);
I get the string "74-65-73-74" back. My question is, what is the
easiest way to convert the string back to "test"?
Can it be done without breaking the string and u... more >>
Foreach with DataGrid
Posted by Gidi at 7/8/2004 4:56:01 AM
hello, i want to "run" on my DataGrid (in C#) on each row
i tried to do a foreach loop but i got erros, what is the correct syntax??
thanks...... more >>
Manipulating bits in 1Bpp Bitmap class
Posted by James Dean at 7/8/2004 4:34:36 AM
Could anybody tell me the most efficient way to set the bits in a 1Bpp
class. I am reading in byte lines of an image. The byte array tells me
what what bits are turned on or off.....i do bit masking to get the
colour....i can just convert the whole Line byte array to a
bitarray.....Also i have t... more >>
PHP and ASP.NET go HEAD to HEAD
Posted by showme at 7/8/2004 4:14:43 AM
PHP and ASP.NET Go Head-to-Head
By Sean Hull
http://otn.oracle.com/pub/articles/hull_asp.html
SUMMARY at the BOTTOM
Speed and efficiency. As I mentioned earlier, ASP.NET is a framework
allowing you to use various programming languages. In addition, it is touted
as having a great object-ori... more >>
Is this a known bug with the Bitmap class??
Posted by TCR at 7/8/2004 2:41:51 AM
Hi,
I posted this earlier and got a suggestion that didn't pan out. I am
trying to determine if there is a known bug related to the resolution value
returned when opening a .jpg file by passing the file path to the bitmap
class constructor or by using the Image.FromImage() static function to... more >>
How to use regular expressions to get data
Posted by baila_pau NO[at]SPAM hotmail.com at 7/8/2004 2:01:29 AM
Hi !!
What regular expression should I write to get data from an html tag?
Example: <title> The data I want to retrieve </title>
I want to get "The data I want to retrieve"
Could be right this one? @<\s* (title)\s* > [(\s* \w+)]+ (</title>)+
Thanks... more >>
question on using collection - Queue and Threading
Posted by kelkel at 7/8/2004 1:54:01 AM
Hi all,
I got a question here which about using queue. i have create a class of queue.
Public Sub Add(ByVal data As Object)
SyncLock Me
_Data.Enqueue(data)
Monitor.Pulse(Me)
End SyncLock
End Sub
Public Function GetNext() As Object
... more >>
Serializing CultureInfo problem
Posted by choyk1 at 7/8/2004 12:55:01 AM
Hi all,
I cannot serialize CultureInfo property as below.
It invokes InvalidOperationException.
[Serializable]
public class One
{
private CultureInfo culture;
[XmlAttribute("Culture")]
public CultureInfo Culture {get {return culture;}}
public One() {}
public One(CultureInf... more >>
|