all groups > c# > may 2005 > threads for friday may 27
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
Overriding == and testing to null
Posted by EL OSO at 5/27/2005 11:29:15 PM
Hi, let's suppose I have a
class A
{
int x;
...
public static bool operator == (A a1 , A a2)
{
return (a1.x==a2.x);
}
}
But, outside the class, I have a problem when I try to test a probably not
initialized class.
For instance, think about this code:
public void myFunc()
{
... more >>
question about calling a method (more fun with polymorphism)
Posted by John Salerno at 5/27/2005 5:50:45 PM
I have a question about how one of these methods is called. The call
theNote.Write();
uses the Write() method in the Document class, and not the Write()
from the Note class. Why is this? theNote is a Note type, isn't it? So
shouldn't it call the method from the derived class? Or does it have... more >>
Textbox minimum height and width
Posted by Chuck Bowling at 5/27/2005 4:10:11 PM
I'm trying to figure out how I can get the minumum height required for a
textbox containing a string in a given font with a set width and also the
converse, the minimum required width of a textbox with a set height.
I want a textbox that is resized to fit the text inside with either the
hei... more >>
Injecting c# built system hook dll into another process
Posted by murl at 5/27/2005 3:18:13 PM
I have been reading alot about local system hooks, and am able to
inject a c# built system hook into a thread outside of my app but
unsuccessfully, the program crashes(ie: notepad keyboard hook for
testing). I assume that you cannot inject a c# built dll into an app
other than your own appdomain... more >>
Debug/output
Posted by Peter Kirk at 5/27/2005 3:14:57 PM
Hi
I am "playing" with some simple aspects of C# with Visual Studio. All I
would like to know right now is how do I get the Console.Write method to
write its output in the Visual Studio debug/output pane? At the moment my
application creates a "command" window and writes output there (all b... more >>
Event Handler on INT variable watching for value?
Posted by Peter Styk at 5/27/2005 2:36:40 PM
Hi,
Is there a way to create an event handler on variable and watch for a
specified value to occour?
Let's say i want a method executed when value of x = 10 and x=15
Thanks
... more >>
.INI files in vogue?
Posted by wschlichtman at 5/27/2005 2:32:04 PM
I've been out of programming for awhile, so need a bit of info.
Are .INI files still the way to save application settings?... more >>
Newbie enumeration question
Posted by Lionel at 5/27/2005 2:31:03 PM
Hello all.
The Microsoft documentation for the .NET SDK has the following description
for the "StartPosition" property of a Form:
public FormStartPosition StartPosition {get; set;}
I'm confused about the "FormStartPosition" type. I understand that the
StartPosition property is used to ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
KeyDown without focus?
Posted by Tony at 5/27/2005 2:30:33 PM
I'm building a simple "breakout" style video-game, and I want keyboard
control of the paddle.
What I need is for an event handler to respond whenever a key is pressed,
regardless of what the focus is set to. So far, the best I've been able to
accomplish is to create a button and have that b... more >>
ASP.NET Impersonation Problem
Posted by Ram P. Dash at 5/27/2005 2:21:56 PM
Now this is a classic. The impersonation fails for CASE I but doesn't fail
for CASE II or III.
Case I:
Client Side Code
-----------------
System.Net.NetworkCredential credential = new
System.Net.NetworkCredential("myUserName", "myPassword", "myDomain");
ServiceA a = new ServiceA();
a.Cre... more >>
Navigation through records with NEXT, PREVIOUS, LAST, FIRST buttons
Posted by Jon Smith via DotNetMonster.com at 5/27/2005 1:05:31 PM
Hi all,
I have a windows form which contains several text boxes. I would like
these text boxes to DataBind to records in an Access.mdb. I have connected
to the Access.mdb using ADO.Net.
When I click on a navigation button, it doesn't matter which navigation
button, the text boxes are not ... more >>
Send codes to a Printer
Posted by JC at 5/27/2005 1:02:32 PM
How do I send escape codes to the printer
I used to be able to do Printer.Print chr$(27) & chr$(71) & "20" and get it
to send. Of course this was vb but there should be some method of talking to
a printer.
thanks,
jc
... more >>
xml documentation
Posted by Bill at 5/27/2005 11:29:50 AM
Does anyone know where I can find good information on formatting the XML
comments in C#? I want to add line breaks, color, spacing, etc.. but I
can't find this documented anywhere in MSDN. I am using NDoc to build a
help file from the developer studio generated XML file.
--
Bill
... more >>
getting int out of a plain text file
Posted by Zephyr . via .NET 247 at 5/27/2005 11:14:08 AM
(Type your message here)
--------------------------------
From: Zephyr .
hey, i got trouble getting integers out of a plain text file.
i dont want to use binary files, just plain text files so they
can be hand-edited more easily.
now, for all i know (still a rookie)
there's StreamReade... more >>
Dataset DateTime Null values
Posted by John S at 5/27/2005 11:01:11 AM
Does anyone know why the dataset blows up when it is reading a column
that is defined at DateTime and there are null values or empty strings?
... more >>
Getting text from RichTextbox using a Hook
Posted by murlbrown NO[at]SPAM gmail.com at 5/27/2005 9:40:47 AM
Basicly im trying to determine when a new line has been appended to the
textbox of another application. Using spy++ I see that the msg (wm_user
+ 97) is being sent, which is the EM_SETTEXTEX msg(combination of
wm_settext and em_replacesel).
Below are a few lines of code of what im trying to acco... more >>
UnhandledExceptions and System.IO.FileNotFoundException
Posted by Brian Keating at 5/27/2005 9:32:06 AM
Hi there,
I'm wondering is there any way i can gracefully handly the
System.IO.FileNotFound exception.
Let me explain my situation.
I've got a window forms app.
I've exception handlers for
AppDomain.CurrentDomain.UnhandledException
and for
Application.ThreadException
and and a try... more >>
Cell create
Posted by JeyJey at 5/27/2005 9:09:24 AM
hi ,
i am using c#. how to creat a data grid with using event handler programming.
With Regards
JJ... more >>
Assembly version
Posted by JeyJey at 5/27/2005 8:58:03 AM
hi,
How to get the assembly version from system.
regards
JJ... more >>
cryptEncrypt never returns the same ciphertext twice
Posted by othman taj via .NET 247 at 5/27/2005 8:47:34 AM
Hi everyone,
I want to encrypt and decrypt a message. I'm using RSA encryption/decryption with PRIVATEKEYBLOB, no hash, and everything works fine, ie I can see my plaintext.
I notices that cryptEncrypt in cryptoAPI never returns the same ciphertext, can anyone explain me why ?
Thanks a lot,
... more >>
cookie null references in c#
Posted by odonel at 5/27/2005 8:44:27 AM
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Source Error:
here is my code:
HttpCookie cookie = Request.Cookies["forumuser"];
if(cookie != null)
{
string sUserId = cookie.Values["Name"].ToString(... more >>
triplets
Posted by Mike P at 5/27/2005 8:32:21 AM
I just stumbled across some code with triplets, but I'm not sure what
they are used for. Why not just use ViewState instead? Can anybody
enlighten me?
Cheers,
Mike
*** Sent via Developersdex http://www.developersdex.com ***... more >>
Best way to run external program?
Posted by david NO[at]SPAM guenthners.com at 5/27/2005 8:11:11 AM
I have a simple csharp form with a 'Go' button on it. This event
launches a external exe successfully but the form color becomes white
and does not repaint while that external program runs, usually about 10
seconds.
I tried creating a thread in seperate class to run that process instead
on r... more >>
DllImport -> Object Reference not set to an instance an object
Posted by Frank NO[at]SPAM etc.be at 5/27/2005 7:59:47 AM
Hi,
I've got a problem with calling a unmanged function :
function call in the .H file :
DWORD _stdcall DoCmdRequest(long lMode, long * plTagType);
my definition in C#
[DllImport("3964Lib")]
internal static extern int DoCmdRequest(long mode, ref long cardType);
When i try to excut... more >>
How do I stop the designer from assigning properties to my usercontrols?
Posted by Jim at 5/27/2005 7:43:49 AM
I have some complex (fairly) user controls that I have created. Some
of those user controls host other user controls. When I host one of
these on a WinForm, I sometimes run into problems where the designer
blows up with an "Object Reference Not Set to an Instance of an
Object". Sometimes it e... more >>
inconsistent compile results?
Posted by Tim at 5/27/2005 6:53:21 AM
hi, I'm wondering if anyone else has seen this. I've just built and
published a web site on my developer machine, then copied the
precompiled web to a staging / test machine. The code runs fine on my
machine. On the staging machine I get a compile error:
Compiler Error Message: CS0012: The ... more >>
GUI programming, MFC and C#
Posted by Siddharth Jain at 5/27/2005 4:59:50 AM
Hello,
Could someone please tell me the history of GUI programming for
windows. In the early days, we had to write 100s of lines of code to
make a simple dialog box. Then along came MFC to simplify things. And
now, finally we have visual C#.NET.
Is that right? Is there anything else to it? Ca... more >>
prblm wrkin with System.Management
Posted by sudheer dacha via .NET 247 at 5/27/2005 3:52:42 AM
When iam including System.Management Namespace and working with it its raising an error : Invalied Namespace.
Its working fine on one system and when the same application is being executed on another machine its giving above said prblm.
Can i get a sol. for this prblm.
----------------------... more >>
Multiselct ListBox
Posted by jez123456 at 5/27/2005 3:28:01 AM
Hi I have a windows form with 3 ListBoxes.
m_listBoxUsers – this displays all users from a database.
m_listBoxRoles – this displays available roles that can be assigned to users.
m_listBoxUserRoles – this displays the role assigned to a selected user.
When I select a user in m_listBoxU... more >>
Photo Gallery with next and previous buttons
Posted by msnews at 5/27/2005 3:20:05 AM
Hi All,
My client has following request. I am not sure how to do it.
Dynamically from database, we are getting set of images names. Now we want
to display them with next and previous buttons.
I am able to pull all the information from database and put it in javascript
array. Now using two f... more >>
TCP File Transfer application!
Posted by sacchi.alessandro NO[at]SPAM gmail.com at 5/27/2005 2:58:03 AM
Hi all!
I'm trying to write a file transfer application using TCP, but I'm
having some problem to connect the client and the server.
Sniffing with Ethereal I can see the packets sent from the client:
SOURCE = 130.237.15.219 DESTINATION = 130.237.15.224 PROTOCOL = TCP;
INFO = 1464 > 11115 ... more >>
DataView and DateTime
Posted by Jarod at 5/27/2005 1:18:02 AM
Hey
I have dtMessages dataTable and there is columnt DateTime, how can I compare
dates using DataView ? I need to compare hours more than dates. But the dates
are also needed because sometimes 02:00 will be after 23:50 and sometimes
before. So I initialize myTime = new DateTime.Now; and I nee... more >>
How to update DataGrid's data to the DB using DataSet ??
Posted by Jason (Kusanagihk) at 5/27/2005 12:54:44 AM
To all,
I am writing a C# application; I've a DataGrid to show and edit data;
then I tried to update the updated data by calling ADO_Adapter.update
(ADO_DataSet, "TableName");
But it pop up a DBConcurrencyException!
Anyone get ideas on how to properly use DataGrids and DataSets together
... more >>
Testing that a sql server is running
Posted by Claire at 5/27/2005 12:00:00 AM
My dotnet windows service, that is sampling data in real time, sits on 1
machine and the SQL server it talks to is likely to be sited on a different
pc.
The pcs are situated in an environment where there's likely to be power cuts
on a regular basis and it's never guaranteed that the client ca... more >>
Hiding inherited protected member
Posted by Fabio Cannizzo at 5/27/2005 12:00:00 AM
Is there a way to hide an inherited protected member so that it is no longer
accessible nor visible from the inherited classes?
The code below makes c1.foo() no longer accessible, but c2.foo is visible to
c3! If instead I make c2.foo private, then c3 will access directly c1.foo
Thanks, Fab... more >>
Cannot explicitly call operator or accessor
Posted by Gav at 5/27/2005 12:00:00 AM
What is this error message all about?
I cannot find anything about it on the net... it is giving me this error
from code i have found on the net that should work but for me i get a load
of these errors. If anyone could help it would be great?
Thanks
Gav
... more >>
How to hide base class in assembly?
Posted by mfc_mobile at 5/27/2005 12:00:00 AM
Hi,
I'm trying to develop a control and want to hide the base class of the
control, how do i do that?
I want to do something like the follow :-
internal class BaseClass {
}
public class SubClass : BaseClass {
}
but i get an Inconsistent accessibility error.
... more >>
Howto: Validate in memory XML against in memory Schema
Posted by Allan Ebdrup at 5/27/2005 12:00:00 AM
Hi
I have two strings in memory, a XML document and a Schema, I would like a
function that takes these two as parameters and returns an errordescription
if the XML does not validate and an empty stirng if the XML does validate
againsg the schema.
What's the easiest way to do this?
Kind ... more >>
Dealing with bad HTTP headers
Posted by Colin Crossman at 5/27/2005 12:00:00 AM
So, I'm trying to write a web spider for some data gathering from a
public database webserver. Anyway, in response to a POST, the webserver
returns "200 Script Results Follow" instead of "201 CREATED". While
both IE and Firefox ignore the odd header, this response kills my
HttpWebRequest w... more >>
is there any free component of rtf to html?
Posted by abc at 5/27/2005 12:00:00 AM
Hi,
In my project I need to convert rtf to html. Is there any free component?
thanks...
... more >>
|