all groups > c# > march 2005 > threads for wednesday march 9
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
Custom ListBox with two columns
Posted by Steve Teeples at 3/9/2005 11:13:02 PM
I need to create a ListBox that looks a lot like the VS 2003 IDE properties
window. I'd like text in the left column and be able to put controls
(combobox, button, etc.) on the right side. Does anyone have an example of
how this can be done? I do not wish to buy any third party tools to do ... more >>
writing event handlers with argument types defined in reflected dll's possible ?
Posted by Stephen Ahn at 3/9/2005 11:10:45 PM
Suppose I have object O with an event E that are
defined in an assembly M that I am referencing in
my code via reflection. M also defines object A which
is an argument to E.
At compile-time, how can I write a function that meets
the signature for event E, when the compiler
doesn't know about... more >>
question about using the command prompt
Posted by John Salerno at 3/9/2005 10:10:01 PM
Ok, I'm still a little confused about how to use the command line with
the C# compiler that came with the SDK. I get a message saying the
command isn't recognized, so I guess I'm in the wrong directory, but how
do I find the right one?
Thanks.... more >>
Accessing Netwok Shares
Posted by diephouse NO[at]SPAM gmail.com at 3/9/2005 9:47:03 PM
I seem to be having a problem accessing networks shares. For example,
I try the following code:
File.Exists(@"\\SERVER\share");
always returns false! Or even if I map the drive
File.Exists(@"Z:\")
that will always return false as well. I can't seem to find too much
information on this... more >>
How to Open IE Window in Full Screen Mode
Posted by nicholasrolfe NO[at]SPAM yahoo.com.au at 3/9/2005 9:33:04 PM
Hi
My program is a C# Windows application and I am using the following
code to open an IE window:
Process p = new Process();
p.StartInfo.FileName = "iexplore.exe";
p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
p.StartInfo.Arguments = "www.google.com"
p.Start();
I would ... more >>
C# Button Short-cut problems...
Posted by raosundar NO[at]SPAM gmail.com at 3/9/2005 9:10:05 PM
Hi,
I have two panels on a C# WinForm contains set of buttons with shortcut
(eg. Alt+K) on each Panel.
Now when the user is on one panel, the shortcuts of other panel buttons
are not functioning. Same way when we place a UserControl on one of the
panel.
Also, when the user is in a textbo... more >>
font overflow underflow
Posted by Maarten at 3/9/2005 8:47:34 PM
when i open a form in my mdi it goes well the firstime, but the secondtime i
get an error:
overflow or underflow in arithetic operation
the debugger marks the font settings of a label.
plz help me
thanks Maarten
... more >>
Pausing and resuming a thread without Suspend() and Resume()
Posted by SpookyET at 3/9/2005 8:41:53 PM
How do you pause and resume some work without using Thread.Suspend and
Thread.Resume since they are deprecated in .NET 2.0?
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Process.Start - The requested lookup key was not found in any active activation context
Posted by Paul Aspinall at 3/9/2005 8:29:22 PM
Hi
I occassionally get the error:
The requested lookup key was not found in any active activation context
when I try to use Process.Start
Having done a search for this, it seems others have had the problem also,
but I have yet to find a solution or workaround.
Does anyone ... more >>
HTTP upload image file encoded with multipart/form-data
Posted by Patsy at 3/9/2005 7:41:05 PM
Hi
I'm using a third party software which captures image from a webcam and
saves it to local harddisk. It also comes with a function to send the image
file via HTTP encoded with multipart/form-data. To integrate this function
with ASP and PHP is no problem. I think it's also possible to bin... more >>
communicate multiple form
Posted by Maarten at 3/9/2005 7:39:35 PM
Hi all,
I' facing a problem here that i am stucked with since i started with.net
in vb6.0 i used for example Form1.txtName.text = "test"
in vb.net i used DirectCast(Me.MdiParent,
Form1).txtName.text = "test"
and in C# i use ?
i have a s... more >>
Image Dimensions
Posted by MurrayTh at 3/9/2005 7:29:02 PM
Is there any way to determine the dimensions of an image using the image's
URL?
ie load image based on URL, and then get dimensions? or perhaps better method?... more >>
URGENT Help in Updating records in c#.NET using Access Database.
Posted by keerthi kamalapuri via DotNetMonster.com at 3/9/2005 7:04:39 PM
My table name is projectDetails.
Primary keys : AirportID,ProjectId,PhaseID,SequenceID
Fields : Name
I am trying to find a specific row and update the value of that row
by the following command.
DataSet1.ProjectDetailsRow r =
dataSet11.ProjectDetails.FindByAirportIDProjectIDSequenceIDPha... more >>
Comparing XML Files
Posted by Mark Jerde at 3/9/2005 5:59:09 PM
I'm asking for ideas how to compare XML files. The files are schema-based
"Test Logs". They will be generated by several different machines, and the
longer files could be 1000 lines.
Some differences are ok:
<computer>SPITFIRE</computer>
vs
<computer>ODIN</computer>
However most... more >>
Interface, abstract class, both, which do you recommend using here ?
Posted by craigkenisston NO[at]SPAM hotmail.com at 3/9/2005 5:57:39 PM
Hi,
I will use an example to do a simplified description of my problem,
please don't laugh.
I just "believe" I would have to use either interface or abstract
classes, but I've not ever write an interface, though I know the basis
of
interfaces.
So, let's say I have a class "RoboDriver", ... more >>
DataAvailable should throw an exception...
Posted by palaga at 3/9/2005 5:44:06 PM
Hi
I'm using a TCPClient to connect to a remote server, and I get messages from
this server using the associated NetworkStream.
As soon as I'm connected to the server, I use this code to read data :
while (stream.DataAvailable)
{
// there is data, read them
int numberOfBytesRead = stream.Read... more >>
Byte Converting for *8*-bit ASCII characters
Posted by clintp at 3/9/2005 5:14:10 PM
I have a byte array that contains 8-bit ascii characters. I'm not
particular about the codepage used to display them, but I have to
preserve the position in the string with something and be able to back
to the original byte implementation.
For example, this doesn't work:
// Bytes for .0... more >>
Program files folder
Posted by RFS at 3/9/2005 4:45:30 PM
how do I get the path to the Program Files folder?
... more >>
StandardOutput and RedirectStandardError Problem
Posted by ivan mjartan via DotNetMonster.com at 3/9/2005 4:40:20 PM
Hi
I am developing win32 application and I am calling function from extern DLL
for example something like this
1) import function
[DllImport("extern.dll")]
public static extern int translate(int num, string[] arr);
this function is written in C++
2) then I in button_on_click pr... more >>
How to make application wait some time ?
Posted by BOOGIEMAN at 3/9/2005 4:19:11 PM
I want to put my console application to wait some time
(for example 10 seconds) How do you do that ?
Also, how does "Press any key to continue" code look like in C# ?
If it helps, I can post here code example in Python
Thanks in advance ... more >>
Verify/cancel entered text in textbox
Posted by David Smith at 3/9/2005 3:32:24 PM
What I want to be able to do:
A textbox is available that the user can enter information into.
Specifically (for the purposes of this post), the user is asked to
enter a number, and that number has an upper limit. I want to do
validation on what the user enters as they type it in.
I set up... more >>
How to write a RTF Control?
Posted by Malik Asif Joyia at 3/9/2005 3:28:25 PM
Hello
I have to add some more functionality in the current RichTextControl. Like
MS Word i want to draw tables. and insert header and footer
Can any body guide me ..i will be very thankfull to you .
Kind Regards
Malik ASIF
... more >>
LSA functions
Posted by Morten at 3/9/2005 3:17:36 PM
Hi!
Has anyone been able to use LSA functions to grant or remove privileges
to/from users? I'm trying to find a way to programmatically set the "Deny
logon through Terminal Services" privilege for certain users. If someone has
a small example of how to use these functions from C# it would b... more >>
Text Question
Posted by hecsan07 at 3/9/2005 2:39:06 PM
Hello
I am having a bit of a problem. I want to search through a block of text
separated by paragraphs. I would like to search through a line in a
paragraph, move to the next line, and be able to return and make changes
(like replacing a character or something) to the previous line. Any
... more >>
DataGrid Drag'n drop
Posted by Adam Klobukowski at 3/9/2005 2:34:13 PM
Hello
I'm trying to do basic drag and drop from DataGrid control. The problem
is that after I start DoDragDrop, items in DataGrid will become
unselected. I wish them to remian selected.
I hav such code:
private void dataGrid_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs... more >>
error too many arguments
Posted by Gav at 3/9/2005 2:07:12 PM
Hi all,
Upon trying to run a storedprocedure I get the error:
Procedure or function mystoredprocedure has too many arguments specified.
I checked out this site:
http://support.microsoft.com/kb/827366
and did as it says specifying the type and size but it didn't make any
difference I... more >>
classes
Posted by Maarten at 3/9/2005 1:50:31 PM
hi all,
I have a usercontrol with a checked listbox
this usercontrol is placed on a form1
is there a way to get the checked items of the checkedlisbox in the
usercontrol with a command from form1?
i beleave i have to do this with "get" and "set in a class
i've never worked with clas... more >>
Equivalent String formats in CSharp
Posted by L at 3/9/2005 1:45:35 PM
Hi there,
Something like this in C++
String sTmp;
for (int i = 5; i <=15; i++)
{
sTmp.format("%2s", i)
}
would print
5
6
7
8
9
10
11
12
12
14
15
I should imitate the same in Csharp. ( Notice the space before the
numbers 5 through 9). Is there a way to do th... more >>
mouse click
Posted by Hrvoje Voda at 3/9/2005 1:39:00 PM
How can I prevent using right mouse click ?
Hrcko
... more >>
DataBinding to Properties of a Collection
Posted by charlie NO[at]SPAM noemail.com at 3/9/2005 1:38:01 PM
I have been messing around with data binding on Windows Forms, and I'm
having a problem with the Property of a Collection (myCollection.Count)
getting out of synch with label it's bound to.
(My real problem is binding to a Property of a Collection, and not just
the simpler case of the .Count p... more >>
website content manager
Posted by freddy at 3/9/2005 1:37:03 PM
I would like to create a website content manager. where the user just types
in what she wants and than upload it to the page or make the change on the
page than upload it. Take a look here http://www.rb3webdesign.com/y/form.htm
... more >>
How in C# to do SetPolygon(SAFEARRAY(double)points)?
Posted by Doug Taylor at 3/9/2005 1:29:02 PM
How do I write the C# equivalent of the following VC6 methods? They will be
exposed on a COM interface and used by VC6, VB6, and .NET apps.
int SetPolygon(SAFEARRAY(double)points);
int SetRectangle(SAFEARRAY(double)rects_info);
int SetManyPolygons(SAFEARRAY(SAFEARRAY(double))points);
Each... more >>
MemoryStream ReadBytes()
Posted by nicolasbotto NO[at]SPAM gmail.com at 3/9/2005 1:17:14 PM
Hi Everybody, I'm working with the MemoryStream and I'm having
problems with the ReadBytes method. When I use it, this method never
returns bytes!!!!
MemoryStream sw = new MemoryStream();
sw.Write(System.Text.UnicodeEncoding.Unicode.GetBytes("Testing"),0,6);
System.Text.StringBuilder sb = new... more >>
Database class how to write it ?
Posted by Jarod at 3/9/2005 1:01:03 PM
Hey
I would like to write a database class. Let's say it would work like this:
datareader GetDataReader(string sqlquery);
This would be static, so I could do this:
datareader dr = myclass.GetDataReader("SELECT * FROM table);
But in this function I would have an open connection how to close it... more >>
Getting reference to running object
Posted by Joel at 3/9/2005 12:50:38 PM
I need to inspect the current AppDomain for an object that implements a
certain interface and get a property from the object. I know how to find out
what class implements my interface but Reflection only lets me instantiate a
new object. I want to get the property value from the already runnin... more >>
How can I retrive all the textBox from Windows Form
Posted by Fox at 3/9/2005 12:15:03 PM
foreach (TextBox tb in this.Controls)
MessageBox.Show(tb.Name);
//Error Occur for non-textBox, i.e. Button
Thank
... more >>
datagrid source
Posted by Maarten at 3/9/2005 11:53:17 AM
hi all,
i want to fill a datagrid with some variables.
i don't want it to connect with a database.
can someone please give me some code to make this work.
i think i have to make a dataset first
then a data table and then fill this with datarows
but how do i do this 3 steps
i've been l... more >>
Testing my DLL with NUnit.
Posted by Frank Rizzo at 3/9/2005 10:54:19 AM
I have a DLL that relies on an XML file (that's in the same folder as
the DLL) to read some startup information. When I test my DLL, it seems
like NUnit actually copies the DLL into some temp folder (where my XML
file obviously doesn't exist) and executes it there. Obviously the test
fails... more >>
Help need with POSTMESSAGE function in C#
Posted by Srinivasa Ra via .NET 247 at 3/9/2005 10:47:02 AM
(Type your message here)
I am writing an application that does lot of read/write's with=
computer's serial port=2E The application as a whole is working=
fine=2E
Current Approach: I have a Timer that checks once every milli=
second to see if there is any data avaialable to read at the=
se... more >>
Connection to DB on web service
Posted by Wong CS at 3/9/2005 10:40:07 AM
Dear developers,
i hav face a big problem on connect my web services to my DB. i m using MS
SQL Server 2000 to build the web services.. but i cannot invoke the input
into the database and "HTTP 500 - Internal server error" on the IE. After i
refresh, a source error occur "An unhandled exceptio... more >>
C# 2005 and SQL 2000
Posted by kids_pro at 3/9/2005 10:19:54 AM
Dear all,
When C# 2005 become production.
Can I still use C# 2005 with SQL 2000 or I have to upgrade sql server as
well?
Cheers,
Kids
... more >>
Converting a multidimensional array to 2 single dimensional arrays
Posted by Claire at 3/9/2005 10:17:54 AM
I have a multidimensional array defined as
private double[,] myArray = new double[ 2, 1024];
The first column of the array contains X values, the other contains Y values
I have a charting function defined as
Add(Array XValues, Array YValues)
How do I call the Add function, passing my array co... more >>
bug when calling unmanaged code from managed code
Posted by Ed Debrot at 3/9/2005 10:16:07 AM
This seems incredibale to me but I've done some testing and it appears I
can't pass in a long and than an int to a function. The int is not passed in
correctly.
[DllImport("ravenCore.dll")] extern static int rvCore_bl_get_schedule(long
driverNum, int nList);
When I call rvCore_bl_get_schedu... more >>
Add properties to a control at Run-Time?
Posted by Ă–zden Irmak at 3/9/2005 10:15:36 AM
Hi,
I've developed a couple of Windows Forms controls. To extend their
flexibility, in run-time, I should be able to define/add new properties for
those controls.
I know that Reflection.Emit namespace is for that purpose. I have searched
for possible examples about this and only found th... more >>
Loading debug information
Posted by Steve Teeples at 3/9/2005 10:13:03 AM
I keep getting the error below.
----------------
An unhandled exception of type 'System.NullReferenceException' occurred in
Unknown Module.
Additional information: Object reference not set to an instance of an object.
----------------
How do I load within the IDE debug symbols for the C# DL... more >>
Object reference not set to an instance of an object
Posted by Steve Teeples at 3/9/2005 10:11:03 AM
I keep getting the error "Object reference not set to an instance of an
object." The unhandled exception is a System.NullReferenceException. It is
occurring in an "unknown module". How do I load within the IDE debug symbols
for system.dll, drawing.dll, forms.dll to trace this error?
--
S... more >>
Template Projects?
Posted by aaa at 3/9/2005 10:03:05 AM
Is there any effective way in .NET 2003 to create a template project which
will have essencially the same classes and interfaces for each project?
... more >>
Sending email throught Domino notes server???
Posted by Kevin Yu at 3/9/2005 9:44:05 AM
hi all
is there any managed component out there to send out email through the
domino email server??
Kevin
... more >>
how to pass a recordset from VC6 to C# COM object
Posted by Doug Taylor at 3/9/2005 9:39:02 AM
I'm designing a C# object that must be usable from VC6 and VB6, as well as
..NET. How do I create the following method in C# so that VC6 and VB6 can
pass in readonly recordsets?
InputFARS(_RecordsetPtr *FARS);
And then how do I traverse the recordset once in C#?
[I'm very new to C#.]... more >>
properties file
Posted by zole NO[at]SPAM top.com-dot-br.no-spam.invalid at 3/9/2005 9:36:37 AM
I need something like java.util.Properties class...
I want to store properties in a text file and to get at runtime.
Example in java:
text file
------
propertieName1=propertieValue1
propertieName2=propertieValue2
propertieName3=propertieValue3
------
So, using Properties class I can g... more >>
How to save picturebox image into jpg file?
Posted by yaya via DotNetMonster.com at 3/9/2005 9:25:02 AM
Hi, I have a picture box with circles and rectangles, and I wana save all
the images into a jpg file, i tried
pictureBox1.Image.Save(@"c:\1.jpg");
but I got and error
"System.NullReferenceException: Object reference not set to an instance of
an object."
Can anyone help? Thanks...
--
... more >>
Error msg in Crystal Report
Posted by alyssa at 3/9/2005 9:19:03 AM
Hi guys...
i'm creating a crystal report in C#.NET. When I select the
-->OLE DB [ADO] next
-->Microsoft OLE DB Provider for SQL Server NEXT
-->server = localhost and database = pubs FINISH
-->ERROR : Logon failed
Details: ADO Error Code
Source: Microsof... more >>
Image and DataGrid
Posted by Daniele at 3/9/2005 9:01:03 AM
How is it possible to display images in a DataGrid column?
Thanks... more >>
Menu Recommendation
Posted by news.microsoft.com at 3/9/2005 8:27:45 AM
I am in the process of porting a program from DOS to VB.NET. I was given
the direction of recreating the feel and functionality of the menu system
from DOS. The system will not have access to a mouse so it will (read must)
all be done through Arrow/Enter keys. The way I'm planning to attack... more >>
Xpath On selected node??
Posted by probashi at 3/9/2005 8:04:55 AM
Hi,
>From the sample xml, I am trying to select a book and then select the
author of the select book.
In the example code first SelectSingleNode selects a book. Second
SelectSingleNode on the book node should return the author of the
selected book (???). But I am getting the first author in... more >>
Calling constructor override after doing some checks
Posted by Josef Meile at 3/9/2005 7:41:09 AM
Hi,
I have this constructor:
public CExcelDatabase(string host, string user, string password, string
database,
bool promptCredentials, int
findExcelInstance, bool readOnly)
{
//Some code comes here
}
Then I wrote an override like this:
public CE... more >>
MDI with a form that can move "outside" the parent
Posted by melinda at 3/9/2005 7:35:07 AM
How do you set up a MDI interface so that one of the MDI forms can be dragged
outside of the parent form. For example, in Visual Studio, you can do this
with some of the windows. Is this MDI? Or how do you that in C#.net?... more >>
Help needed!!i'm stuck!
Posted by alyssa at 3/9/2005 7:17:10 AM
Hi guys,
May I know what is the code for linking the windows form in MainMenu? For
example, in my MainMenu I have Report...so when I click the Report in
MainMenu, it will go to the Report form....that's all..
Thanks in advance..... more >>
windowsidentity inquiry
Posted by mich via DotNetMonster.com at 3/9/2005 6:54:22 AM
hi all!
i encountered an error in instantiating windowsidentity passing the upn
(user principal name). the error i encountered was "Unable to Logon". hope
you guys can help me.
do you think i still need to configure something in our domain controller?
thanks in advance
mich
--
Me... more >>
dataset and more complex relational data
Posted by skovlodden NO[at]SPAM yahoo.dk at 3/9/2005 6:09:25 AM
Hi!
I'm hoping someone can help me come up with a 'best possible solution'
for the following problem:
I'm trying to design an addressbook, i.e a storage for adresses. I
would like my adresses to have a random number of fields, all of which
are strings. Futhermore every address can belong to... more >>
Installing a TT-Font
Posted by Johan at 3/9/2005 5:25:10 AM
Hi
How would I go about installing a font file on WinXP?
I have tried this and it won't get installed properly,
private void installFont()
{
File.Copy( Application.StartupPath+"\\Lucon1.ttf",
this.fontDir+"\\Lucon1.ttf", true );
key.SetValue( "Lucida Console ANSI
TrueType)", "L... more >>
override GetHashCode
Posted by Stoyan at 3/9/2005 4:51:02 AM
Hi All,
I don't understand very well this part of MSDN:
"Derived classes that override GetHashCode must also override Equals to
guarantee that two objects considered equal have the same hash code;
otherwise, Hashtable might not work correctly."
Does any one know, why we must also override Eq... more >>
Error while using html controls
Posted by sushi at 3/9/2005 4:35:02 AM
Hello,
I am developing an asp.net website. In this I am using a web form say'
Web form1.aspx' which has two button controls say 'button1' and 'button2'.
When I am click 'button1' it displays a text 'Hi'. When I click the other
button 'button2', it redirects to different page say' Webform2... more >>
how to bind tree view control in the datagrid cell using Asp.net & c#
Posted by Boopathi v.k at 3/9/2005 4:02:56 AM
hi,
In our application i have to bind a tree view control in datagrid cell .
but i am not getting any way to do this ..if any body can give
solution!!!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!... more >>
PrivateFontCollection vs TextBox
Posted by Claus at 3/9/2005 3:57:37 AM
Hi all.
I'm messing a bit with PrivateFontCollection. Embedding a
ttf-font and
streaming it into PrivateFontCollection using
AddMemoryFont works like a
charm.
Changing the Font property on the WinForm controls works
without problems
on Label, CheckBox and Buttons. But surprisingly not... more >>
Creating .ISO with C#
Posted by Adam at 3/9/2005 3:28:48 AM
Hey guys any info on this would be great im a total noob when it comes
to compression.
What i need to do is take a bunch of files, either from the HDD or
another source and create a .ISO. I would prefer to have it a Windows
Application as opposed to a Console Application but baggers can't be ... more >>
Big Problem on SQL Server link to Web Services
Posted by Wong CS at 3/9/2005 2:30:55 AM
Dear developers,
i hav face a big problem on connect my web services to my DB. i m using MS
SQL Server 2000 to build the web services.. but i cannot invoke the input
into the database and "HTTP 500 - Internal server error" on the IE.
I hav try the same thing on newly created ASP.NET Web Appl... more >>
find closing xml tag
Posted by juli jul at 3/9/2005 2:27:31 AM
Hello,
I want to run in a loop untill I find a closing tag : for example I want
to read the xml file untill I see </file> tag. Which function in c#
determines that?
Thank you very much!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rew... more >>
Retrieve result from SqlCommand
Posted by Wong CS at 3/9/2005 2:15:51 AM
Dear developer,
I'm developing a web service with VS .NET and using C#. And part of the
webservice is to get data from database (by using SELECT), however, the
result from the sql query i cannot parse it to string, how can i get the
result from the SqlCommand..? dataset or datareader..?.
pl... more >>
use of lock keyword in single threaded applications.
Posted by Jesper at 3/9/2005 12:29:07 AM
Hi,
Once I wrote a singlethreaded program containing a somewhat large tree
structured set of objects. A treeview was assigned this structure and it was
possible to drag and drop objects - i.e. reorganize the tree structure. Each
object, tagged to a tree node, had a ref to its own userform, ... more >>
use of mxArray in C#
Posted by snowflake at 3/9/2005 12:19:02 AM
Hi all
I give you here some example code how to make it possible to use the type
mxArray (from matlab) in c and c++. mxArray is defined in matlab.h and
matlab.hpp. To use mxArray in c or c++ you need to include this h-file..and
maybe some libraries also.
My question is: How can I use mxAr... more >>
|