all groups > c# > february 2006 > threads for monday february 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
Redirecting Standard Input Interactively
Posted by Sudesh at 2/27/2006 10:11:27 PM
Hi,
I am a newbie to C# and Im trying to redirect standard input, output and
error of a console program written in C (MS VC 6.0) to a textbox on a form.
The code for the redirecting looks like this:
private System.IO.StreamWriter c_StreamInput = null;
private System.IO.StreamReader c_Stream... more >>
WebBrowser Doubleclick Selection
Posted by atn2002 NO[at]SPAM hotmail.com at 2/27/2006 9:46:52 PM
With WebBrowser control in .NET 2.0, in DesignMode, when I double click
a word to select it and then try to type, it won't let me, until I
press Delete or Backspace and manually click on the page to reset the
carriage. Clicking and dragging to select text works as expected, it's
only when doubl... more >>
Factory and Generic class: are wildcards necessary?
Posted by Jock at 2/27/2006 9:23:12 PM
Hi all,
Could anybody suggest what should be the return type of the method Create in
the Factory class?
In Java I would have used the wildcards, but here in C# apparently there is
no way do do it?!?
public class B<T>
{
}
public class D1 : B<int>
{
}
public class D2 : B<float>
{... more >>
Can I determine the delegate instance that was fired?
Posted by Peter Rilling at 2/27/2006 9:11:52 PM
This may sound like a weird desire, but is there any way to get a reference
to the actual MulticastDelegate that was used to invoke a handler, from
within the handler? Maybe through the call stack or something?
... more >>
Question about Guid
Posted by Roy at 2/27/2006 9:07:27 PM
Guid is a structure type. How can I add it to an ArrayList?... more >>
Sending raw ASCII to a printer share...
Posted by Paul Aspinall at 2/27/2006 8:47:16 PM
Hi
I'm writing a web based system, which needs to direct prints to a Zebra
barcode printer.
I plan to use the ZPL (Zebra's own) programming language for sending Raw
ASCII to the printer, and therefore enabling the printing.
Does anyone have any sample code on sending Raw ASCII to a printe... more >>
auto default GridColumnStyles
Posted by Russ at 2/27/2006 7:57:27 PM
Whats wrong with this code?
DataSet ds = new DataSet();
DataTable tbl = new DataTable("Tbl");
tbl.Columns.Add("field1", typeof(string));
tbl.Columns.Add("field2", typeof(string));
tbl.Columns.Add("field3", typeof(int));
ds.Tables.Add(tbl);
DataTable tbl2 = new DataTable("Tbl2");
tbl2... more >>
mouseHover
Posted by Rudiga at 2/27/2006 6:59:25 PM
Hi,
I am trying to get this code to work just to check if i can trigger an event
when the mouse goes over a button. But it doesnt seem to be working, can
anyone help?
void butRussia_MouseHover(object sender, System.Windows.Forms.MouseEventArgs
e)
{
System.Console.Write("ello");
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
rich text editor
Posted by mark.macumber NO[at]SPAM gmail.com at 2/27/2006 6:47:45 PM
I would like to know how people these days are creating their own rich
text editors for use in web pages. Does anyone know where to find
material on how to go about doing this? I would just like a basic
control for bolding and highlighting text. Do I need to learn active-x?
Can it be done in .ne... more >>
PInvoke: super stuck on this one :0(
Posted by sklett at 2/27/2006 6:22:54 PM
Just when I thought working with this unmanaged DLL could get any more
difficult.... I have to deal with this:
<exception>
{"An attempt was made to load a program with an incorrect format. (Exception
from HRESULT: 0x8007000B)"}
<exception>
Here is the sig. of the unmanaged DLL I'm trying t... more >>
DirectX
Posted by Alun Harford at 2/27/2006 6:11:37 PM
I'm trying to learn to use DirectX in C#, but all of the examples I've found
so far are pretty unstable (crash when minimized, crash when the window is
resized so its height is 0 pixels, crash on ctrl+alt+del, etc)
Does anybody know of a tutorial out there that handles the exceptions
correctly... more >>
Handle des Desktop-Fenster (nicht des aktuellen Bildschirms)
Posted by Alexander Mueller at 2/27/2006 6:06:54 PM
Hallo
Mein Ziel ist es, das Desktop-Fenster als Bitmap zu speichern bzw
als Bitmap-Objekt zu erhalten.
Das geht auch recht gut mit Graphics.FromHwnd() und der Verwendung
von GetDesktopWindow() und BitBlt() (Win32).
Das Problem ist, dass die API-Funktionen GetDesktopWindow() und
GetShellWindo... more >>
Using Http Post
Posted by Yogesh at 2/27/2006 6:06:17 PM
Hi all
I want to do Http POST from C# application i m using webclient for that .
Mi prob is when i am posting data i need to fire Button1_Click event which
is not firing .
Like this is client Code
WebClient myWebClient = new WebClient() ;
req.ContentType = "application/x-www-form-urlencoded... more >>
moveing down an item in a listbox - strange behaviour
Posted by Michael Meckelein at 2/27/2006 5:22:10 PM
Hello,
I run into trouble move down a selected item in a listbox. The code moving
down the item is the following one:
for (int j = lv.SelectedItems.Count-1; j >=0; j--)
{
ListViewItem moveItem = lv.SelectedItems[j];
selIdx = moveItem.Index;
// ignore movedown of la... more >>
Where is the C# Text Editor Options?
Posted by Lee at 2/27/2006 5:18:51 PM
I've just started using VS(2005) and the first couple of projects I've
used VB since it's easy and I wanted to get my feet wet with the
framework.
Now I want to start on some C#, but I can't find the editor options for
the C# syntax.
I remember when I first started playing around with VS2... more >>
PDF Viewer/Extractor
Posted by Joe at 2/27/2006 5:08:33 PM
Does anyone know of a PDF viewer component that allows a user to select a
range of data (text) and then be able to extract it?
I don't need to modify the PDF at all.
-Joe
... more >>
Handling an exception inside an exception's constructor?
Posted by Rick at 2/27/2006 5:04:39 PM
I have created a custom exception class for my application. In it, I want to
be able to automatically output the ToString() from the object causing the
exception. (I use the ToString() to output the state of my objects to help
with debugging). However, the ToString() method, being often overri... more >>
VB6 Help me plzzz
Posted by Islamegy® at 2/27/2006 4:44:47 PM
Hi,
I'm C# Developer re-write VB6 Application to C#.Net, also support the old
VB6 till i finish the project..
I Try to use VB6 Visual data manager to create a DataEnviroment connection
and 3 command.. Command1 is the parent for other to command..
I didn't find anyway to pass the paramters to ... more >>
How can I get the instance name of a component?
Posted by Eric at 2/27/2006 4:20:13 PM
I have a custom component that can be dragged from the ToolBox onto a
Windows Form (which means I can't modify it's constructor to add a name
parameter). VS assigns it an instance name, but the developer can
modify it's name. The name shows up in the property window as "(name)",
I want to find a... more >>
How to file-read ASCIIZ (null-terminated strings)?
Posted by Carlo Stonebanks at 2/27/2006 3:46:24 PM
I need to read a binary file which has mixed data types embedded in it.
Fixed length strings, 16-bit integers and zero (null) terminated ASCII
strings. (akak ASCIIZ)
The first two types are no problem, but the zero terminated string is a
problem because I have to read byte--by-byte with Bin... more >>
Creating a library with my web services
Posted by tshad at 2/27/2006 3:11:42 PM
I am trying to create a dll that I can call from my web pages. The problem
is that it doesn't work the same way as a web page that calls the web
services.
I created a Library Project and added a web reference: RemoteUser, just like
I do in my Web Page.
I have the following:
************... more >>
Call a webservice from winform
Posted by John at 2/27/2006 3:09:39 PM
Hi,
Is it possible to call a web service without referencing.
Since I have to get the url (web service is running) from the user and then
call a method in that.
Regards
John
... more >>
Able To Have Generic User Controls in .net 2.0? / Winforms and Generics
Posted by AtariPete at 2/27/2006 3:03:06 PM
Hey All,
I'm wondering if I'm able to have create generic user controls in .net
2.0 much like one can create generic classes.
I would like to do this so that I can handle a set a types derived from
the same base type within a user control
Consider the following scenario:
* I create a b... more >>
Updating DataTable cell?
Posted by Brett Romero at 2/27/2006 2:58:33 PM
Is there a way to update data in a DataTable cell? I have column dates
that are string type. I want to add another column to this table:
dt.Columns.Add(new DataColumn("Datecolumn2", typeof(DateTime)));
Then loop through the table adding all of the string dates to the same
row but in the ne... more >>
Access an object on one form from another?
Posted by JamesB at 2/27/2006 2:53:41 PM
Hello,
I have a (hopefully simple) problem.
I have a form, lets call it frmMain, and this has a database connection
object on it (sqlconnection) declared as public. All works well.
One of the operations I want to do will occur on a second form (call it
frmChild).
I can open up this qui... more >>
What is the use of a static method?
Posted by Doru Roman at 2/27/2006 2:38:52 PM
Hi,
Can somebody explain please the meaning and use of a STATIC method?
Thanks,
Doru
... more >>
Chinese character sets
Posted by Steven Nagy at 2/27/2006 2:30:11 PM
Hi all, I have to do a website in chinese!
Basically I just need to know how to output chinese characters. I am
assuming its very easy, but have never done it before. I can however do
simple things like changing the formats of currency and calendars and
so on.
I am guessing the answer is qu... more >>
How to call the right constructor
Posted by Alex D. at 2/27/2006 2:21:08 PM
Hi guys. I am trying to create a specific object calling its constructor
based on a string containing the name of the object. Let say I have three
objects A, B, and C. Also let say I let the user enter a text in a textbox.
If the user enters 'A' or 'B' I want to do this
if (TextBox1.Text ==... more >>
OT: Importance of UML
Posted by Jeff S at 2/27/2006 2:09:25 PM
Several years ago UML became a hot topic in the tech industry. At the time I
was taking a class and the prof told us all that UML was really nothing new
and that its authors were trying, for better or worse, to get some
standardized object modeling notation into common use so that we could all... more >>
Commercial Error Handler
Posted by Mark Jerde at 2/27/2006 2:05:19 PM
Can someone recommend a commercial error handling package I can add to my C#
programs? (VS .NET 2003.) I'm not finding any googling.
I know I could write my own or adapt something off the interet but time is
of the essence and I prefer supported software.
Thanks.
-- Mark
... more >>
Unregistering a Delegate
Posted by Jeff S at 2/27/2006 1:57:49 PM
Please consider this sample code: It registers a delegate with an event.
p1.FirstNameChanged += new Person.NameChanged(p1_FirstNameChanged);
Now the following code removes the delegate:
p1.FirstNameChanged -= new Person.NameChanged(p1_FirstNameChanged);
The above line that removes the dele... more >>
Mouse over
Posted by Rudiga at 2/27/2006 1:44:33 PM
Hi,
Is there any kind of mouse over type method in C#, that will change the
mouse to a different pointer when the mouse is over a picture box. The
reason i as is that i am intending to use a picture instead of a button to
move to another form and its not obvious, without writing on the ... more >>
Inheriting from a text box.....
Posted by UJ at 2/27/2006 1:41:15 PM
I have a user control that inherits from the standard windows text box. I
have a routine that adds stuff to it. I have compiled it into a dll. I have
added it to my app and I can debug into it. I can see that the text changes
but it doesn't actually update on the screen (the text itself is cor... more >>
Generic constraints: compiler errors on conversion that should be valid
Posted by Harold Howe at 2/27/2006 12:45:02 PM
Howdy all,
I am getting a compiler error regarding a consrained conversion. It
complains that it can't make the type conversion, even though the
generic type argument inherits from the target of the conversion. I have
trimmed my source down as much as possible.
The classes implement some... more >>
difference between component class and regular class in C#.
Posted by RK at 2/27/2006 12:45:01 PM
whats the basic differences between component class and regular class
in C#.
Apart from component class have container support feature, does these
classes enjoy any special behaviors??
thanks in advance
--RK
... more >>
Question on Collection Sorting
Posted by Lee at 2/27/2006 11:42:58 AM
When extending CollectionBase is it possible to sort on a particular
field of each object in the collection? For example if I created a
inherited class from CollectionBase and filled it with "Sale" objects
and each Sale object had a SaleID property, can I sort by that?
Thanks,
--
War... more >>
Move the windowform
Posted by cql90 at 2/27/2006 10:49:42 AM
Hi All Pro,
First, thanks you all in advance for your kindest help, I am very
appreciated. I did have two event on the form, which are:
Form1_MouseDown(...) and Form1_MouseMove. The problem is: my form didn't
move at all when I do move the mouse. But, If I have a breakpoint at
mousedown, w... more >>
performance of Generic List?
Posted by ZenRhapsody at 2/27/2006 10:05:09 AM
Has anyone done any performance testing between new generic Lists and single
dimensional arrays?
I really like the code flexibility the List provides since I don't know how
many items I will have in the list. With my array approach, I have to
manage re-sizing the array myself.
So, is... more >>
Common area dor dlls ?
Posted by UJ at 2/27/2006 8:52:34 AM
Is there a way to make a common place for directories other than the Windows
folder? I have a group of dlls used by multiple programs that when I update
them, I need to have all the apps use the new version (specifically there's
a class that holds my messages for a message queue and everybody ... more >>
Where in the registry does the following goes?
Posted by academic at 2/27/2006 8:49:49 AM
Does anyone know where in the registry the following goes?
WriteProfileString("windows", "Device", DeviceLine)
Or where this comes from?
GetProfileString("PrinterPorts", vbNullString, "", ProfileString,
Len(ProfileString))
Or where this goes?
In Start/Printer and Faxes/File/Server Pro... more >>
using Microsoft.Office.Interop.Word not working!
Posted by R Reyes at 2/27/2006 8:10:31 AM
ISSUE (reposted)
===========================
Can someone please explain to me why I can't get the MS Word Interop assembly
to work in my VS2005 project? For many people, they say they add the
reference and it works, however when I add the reference the application
can't find it. Not sure w... more >>
Request.Form
Posted by Scott Durrett at 2/27/2006 7:46:28 AM
Hello everyone.
I have an html page posting a form to my ASPX page and no matter what I try
the Request.Form is always blank when I get it on my aspx page. Anyone have
any clues?
Scott
... more >>
Generics calling static methods?
Posted by taub.adam NO[at]SPAM gmail.com at 2/27/2006 7:18:33 AM
Hi,
Can generics be used to call a static method of a class? The below
example gives an error in my generictest class. Anybody know why?
class foo
{
static public void Test() { Console.WriteLine("foo.Test");}
}
class GenericTest<T>
{
public void CallTest() { T.Test();}
}
... more >>
ClickOnce reference to web server
Posted by cathywigzell NO[at]SPAM yahoo.co.uk at 2/27/2006 6:48:06 AM
I have a small ClickOnce application which communicates with the server
it loaded from. When I created the ClickOnce app, I added a Web
Reference to a .asmx file on the server. The app then uses this
reference to make calls to the server. That all works nicely.
However, at deployment, every se... more >>
Web.Caching.Cache Memory Leak?
Posted by sternr at 2/27/2006 6:42:52 AM
Hey,
(Sorry if the thread has been posted twice!)
I'm using the System.Web.Caching.Cache object in my Win App and
basically, it's great!
I use a sliding expiration TimeStamp to the object I put in the Cache.
When I try and get the object after it's sliding expiration time I get
null (as exce... more >>
C# and VB6 Debugging
Posted by Usman at 2/27/2006 6:23:53 AM
Hi,
I have a simple visual basic 6 program that calls a function in a class
written in C# assembly. Running executeable directly gives me no
problem, debugging VB6 program is also working fine. However, when I
try to debug C# assembly with VB6 program, VB6 program simply crashes
upon trying t... more >>
Email Through Exchange
Posted by wg at 2/27/2006 6:17:37 AM
I am developing an application to send emails from within a company using
MS-Exchange. I know next to nothing about Exchange. Does anyone know how to
get started in this? Can I use the SendMail from .NET?
Thanks
Wade
... more >>
Regular Expressions question
Posted by yaron at 2/27/2006 6:17:27 AM
Hi all,
let say that my string is :
/// <author> aaa
/// <author> bbb
/// <author> ccc
1. how do i match all the authors except author aaa ?
2. how do i append the string "2006" to the authors names found in #1 ?
Thanks.
... more >>
Font size is messing up my form!
Posted by Jesper at 2/27/2006 6:00:29 AM
Hi,
When working with high display resolution it's sometimes preferable to
increase the general font size using control panel-> display properties->
settings -> advanced -> general -> Display -> DPI setting.
However I find that my form area doesn't scale correctly with this settings.
Butto... more >>
Printing problem need help
Posted by Sukh at 2/27/2006 5:35:48 AM
Hi
I am stuck with a problem Can anyone help me out from this...
I am printing a report on pre-printed continue paper using dot-matrix
printer using vb.net.
Data is printing on all the locations. But
After printing first page it increase paper 3cm vertically/Height so on
second
page act... more >>
Http protocol violation error
Posted by Khadim at 2/27/2006 5:34:41 AM
I m using HTTWebResponse which is running smoothly on my system which
is behing a proxy server. When I run the application with Live IP it
gives
"HTTP Protocol violation error"
I can't use 'useUnsafeHeaderParsing' because it is not recognized by
framework without sp3.
I have urlencoded m... more >>
Database only getting updated after focus lost from bool column in datagrid
Posted by Greg at 2/27/2006 4:02:17 AM
My problem is that values in the bool column of a datagrid are only
being updated to the database once the focus of the bool cell is lost.
This is completely counter-intuitative. When a user clicks on a bool
type cell in a datagrid and sees a check mark put in / removed, then
he/she would expect... more >>
Unit Testing and Test Cases
Posted by Water Cooler v2 at 2/27/2006 3:53:05 AM
Here's my understanding as of now.
If I were writing a function
bool IsValidContact(Offerer objOfferer, Accepter objAccepter,
TermsAndConditions objTermsAndConditions);
Before writing the function, I'd enlist all the conditions that must be
met for a contract to be valid. Something alon... more >>
Session, Cookies, QueryString
Posted by CodeRazor at 2/27/2006 3:21:27 AM
In web app development you can use session, cookies, querystring to reference
variables you set in a previously in the app.
My question is how does windows let you access a variable value you set in
the previous form.
i am perplexed. I thought you did it somehow with properties, but i don... more >>
Why the Bitmap.MakeTransparent() changes the PixelFormat ?
Posted by Sharon at 2/27/2006 2:15:27 AM
Hello Experts,
I'm creating a bitmap object like this:
Bitmap myImage = new Bitmap(1024, 1024,
System.Drawing.Imaging.PixelFormat.Format24bppRgb);
But when I invoking the function myImage .MakeTransparent() (with or without
parameters), the myImage.PixelFormat changes to Format32bppArgb.
... more >>
Windows - carrying a property value to next form
Posted by CodeRazor at 2/27/2006 2:00:11 AM
In Windows app development, how can you carry a property value from one form
to another?
In web development, you would use session.
I have been trying to use properties. I have a class with a property of type
int.
In form 1 i set my property as e.g. 20 but then when i check the value of... more >>
Web Service related question.
Posted by archana at 2/27/2006 1:23:43 AM
Hi all,
I am developing one web service in c#.
What i am doing is processing some heaving data in one of the method of
web service.
In my client i am calling one web method which is doing heaving
processing and what i want is to provide cancellation functionality for
this web method. So ... more >>
Converting 8bpp raw data to a 32bppArgb Bitmap
Posted by Sharon at 2/27/2006 1:00:30 AM
I have a buffer of byte[] that contains a raw data of a 1 byte-per-pixel
image data.
I need to convert this buffer to a Bitmap of Format32bppArgb and to a Bitmap
of Format24bppRgb.
Can anybody tell how to do it?
------
Thanks
Sharon... more >>
PLS HELP:Phone system integration
Posted by MuZZy at 2/27/2006 12:50:02 AM
Hi,
One of our bigger clients requested to have a phone automation option for our CRM product (developed
on C#) as they are using it now with ACT CRM. Unfortunately i don't have much info on how do they
use it and no way i could get to tehir place as they are in Europe (i'm in US). All i know... more >>
Help with Sunken/Pushed Button
Posted by Julie-anne at 2/27/2006 12:24:25 AM
Hi everyone :-)
I want to have a button that has the ability to be sunken when clicked.
Checked would be correct name. Very similar to a toolstripbutton, but a
control. How do I do that? Is there a way to do it?
Thanks.
... more >>
ORM.Net
Posted by Dragon at 2/27/2006 12:00:00 AM
ORM.net is under GNU licence now?
if I use ORM.net to develop application, I need to open source my
application also ?
... more >>
Print Preview bug ?
Posted by Todd Gibbs at 2/27/2006 12:00:00 AM
Hi guys,
Im trying to use the PrintDialog stuff in my graphics package to allow
people to print their photos.
It all works fine and the user can specific margins and photo size, but I
can't get the preview to show the margins.
I must be setting them correctly because they print ok, but no... more >>
c# EXCEL close problem
Posted by Jason Huang at 2/27/2006 12:00:00 AM
Hi,
In my C# windows form application, we can open and close an EXCEL file.
However, in my Windows XP's task manager, there is a EXCEL on the task list.
If I open and close that EXCEL file several times, then there're several
EXCEL on my XP's task list.
My question is will this cause any pro... more >>
|