all groups > c# > february 2005 > threads for tuesday february 15
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
Passing an argument list as a single parameter
Posted by Craig Dunstan at 2/15/2005 10:39:06 PM
I would like to dynamically build a list of arguments to pass the
string.Format method and I am not sure how to do it.
Basically, I would like to dynamically build a list based on the results of
a regular expression match ie:
private string[] FormatContent(string pContent, string pExpressi... more >>
Adding function to Excel
Posted by Franck at 2/15/2005 10:03:36 PM
Hi,
Using Add-In project, I can't find how to make my public functions available
in Excel ?
Thks for help.
... more >>
Multicast problem..
Posted by Naveen Mukkelli at 2/15/2005 9:19:03 PM
Hi,
I'm sending multicast messages UDP socket and C#.
But the receiving clients are not receiving all the messages.
Receiving clients are missing out some messages. When I debug the
server side, the messages are being sent correctly, but receiving side
side is missingout some messages.
... more >>
Word Wrap while Printing
Posted by Jeff B. at 2/15/2005 9:17:40 PM
Has anyone come across a decent algorithm for implementing word wrap
features in .net printing? I have a small component that uses basic
printing techniques (i.e. e.Graphics.DrawString in a PrintPage event of a
PrintDocument object) to send some formatted text to the printer. However,
if t... more >>
Aborting screen saver? Hiding from alt-tab?
Posted by Hernán_Freschi at 2/15/2005 8:53:30 PM
Hi all,
I'm still working on my Caller ID software. As it sits in the traybar
and basically does nothing, after a few minutes the screen saver kicks
in and it still works, but I have to go move the mouse or something to
actually see what's being displayed.
Is there a way I can force the scre... more >>
Playing MP3 from memory
Posted by Lutz Niggl at 2/15/2005 8:49:59 PM
Can anybody point me to some documentation or examples on how to play MP3
from memory. (I receive a MP3 stream from an USB device and like to play it
without having to save it to a file first)
Thanks
Lutz
... more >>
Structures question.
Posted by Naveen Mukkelli at 2/15/2005 8:19:02 PM
Hi,
I'm deveoping a Client/Server application.
I want to send information by using structures.
I want to have a standard header structure, and variable lenght
data.
for example,
---------------------------------------
public struct Header
{
public int sequenceNumber;
public i... more >>
dataset and custom classes
Posted by glenn at 2/15/2005 7:25:41 PM
I have written as a test a customer class that has all the necessary field
handling and formatting routines in it that I need. I have dataaccess class
that controls reading and writing the class into the database. However, I
am now getting to the user interface layer and a little confused as to... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Tough Question
Posted by David Pope at 2/15/2005 7:05:41 PM
I have a combo box. I would like to show a toolip for each item in the list
when you put your mouse over it. Is this possible?
Thanks,
David
... more >>
CLR Garbagge collection
Posted by Carlos Lozano at 2/15/2005 5:50:03 PM
Hi,
I wrote an application that creates Excel objects in the background. I would
like to dispose these objects once I know they won't be used again.
I call the Excel quit function, and the objects stay there until the creator
application is closed. I also tried calling GC.Collect to force c... more >>
modifying a bitmap image at runtime in an IPAc hx4700
Posted by dcudev.lcr at 2/15/2005 5:41:12 PM
I am loading a 4X5 picturebox matrix using a bitmap file template. As each
cell in the matrix is being loaded, I append a text string using the
DrawString function to complete the cell's image.
The problem is that the DrawString function seems to work only on the
desktop and not on the hx47... more >>
Ignoring Mouse Events During WaitCursor
Posted by KarenP at 2/15/2005 5:13:02 PM
In my Windows Forms application, while executing a process that takes some
time, I am changing the cursor to the hourglass by setting Cursor.Current =
Cursors.WaitCursor.
This is working just fine, except that any mouse events generated during
this wait period (such as clicking on a button,... more >>
objects in .NET
Posted by abcd at 2/15/2005 5:05:35 PM
I am novice .NET and C# user. I am mainly C++, COM develoeper
I have written my first C# Windows applicaiton where I am using my COM
component.
in one of the C# method I have instantiated the global variable as below
public xyz.abc obj
public form1()
{
obj = new xyz.abc;
}
pr... more >>
use CDO to create public folder?
Posted by Ripley at 2/15/2005 4:58:35 PM
I have seen this article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_hosting_createpublicfolder.asp
I can't seem to make the conversion to C# - I don't see how to even do
something as simple as create a new folder object. The intellisense after
"CDO." doesn't... more >>
Center MessageBox C#
Posted by M. Roming at 2/15/2005 4:53:36 PM
Hi together,
I am trying to center a MessageBox based on the form wich is calling the
Show method. This means:
After calling the Show() method I don't want the dialog window in the center
of the desktop instead
I want it in the center of my form.
I have already tried to pass the actual f... more >>
Dynamic Property groups
Posted by Codex Twin at 2/15/2005 4:34:53 PM
Hi
I am designing a class (Q) which will contain provision for dynamic complex
properties.
For example, these properties could be any or all of the following complex
properties:
a) TeamMembers
b) Pets
Furthermore, the above properties may decompose further into sub-properties:
TeamMe... more >>
Datagrid Reset
Posted by ppn at 2/15/2005 4:24:21 PM
BlankHi,
I have two datagrids on the form. When I click on the row in the first =
DataGrids, I want to reset the second datagrid before binding the =
dataset with new sql statement. I tried with dataset.clear(). It doesn't =
work. The columns are getting added to the existing columns for the =
... more >>
Does FieldInfo.GetValue return the actual field?
Posted by Joanna Carter (TeamB) at 2/15/2005 4:22:26 PM
Hi folks
I am trying to assign a Delegate to an Event using reflection.
I use FieldInfo.GetValue to supposedly get the field object, but casting the
result to the type of the field and assigning the Delegate does not catch
the event.
1. Does GetValue really return the *actual* object held... more >>
SocketServer design
Posted by Stuart at 2/15/2005 3:58:38 PM
I need to write a socket server that accepts around 100 connections, but
this could grow to a 1000, or more in time. The data throughput will be
minimal, mostly in short random bursts, but it's important those
connections stay active.
Having googled a bit, I understand there is a limit of ... more >>
Button.Click as EventHandler via reflection [why not possible?]
Posted by Wiktor Zychla at 2/15/2005 3:32:12 PM
Let's start with an example: if you have:
class Test
{
public delegate int MyDelegate( int n );
event MyDelegate MyEvent;
}
then you can get MyEvent using reflection:
Test test = new Test(...);
Type t = typeof( Test );
t.InvokeMember( "MyEvent", BindingFlags.Instance | Binding... more >>
Printing characters
Posted by Alberto at 2/15/2005 3:29:39 PM
In a report I have the simbol "ó" but when I print it, the simbol appears as
¾.
Why?
Thank you.
... more >>
Pattern Recognition
Posted by Aaron at 2/15/2005 3:15:17 PM
This there a public program/algorithm that can tell me the key points of a
text?
For example I entered the following text:
Web logs, or blogs, the online personal diaries where big names and no names
expound on everything from pets to presidents, are going mainstream. While
still a relat... more >>
Socket Array
Posted by Dave at 2/15/2005 2:39:06 PM
How could I create a socket array? Such as if tSocket was a socket then,
tSocket(1);
tSocket(2);
... more >>
mfc activex control in c# windows service
Posted by andy.g.ward NO[at]SPAM gmail.com at 2/15/2005 2:22:55 PM
I keep getting this when trying to create an MFC activex control in a
c# windows service - anyone got any ideas what the missing module could
be???
Exception thrown : System.IO.FileNotFoundException: The specified
module could not be found.
at System.Windows.Forms.UnsafeNativeMethods.CoCre... more >>
XmlSerializer
Posted by Wayne at 2/15/2005 2:21:20 PM
I have the following code, this is a form. When I get to the second line I
am receiving "Additional information: There was an error reflecting type
'WindowsApplication3.Form1'." Am I just missing something here? It's been a
long day so it is possible.
Type type = this.GetType();
XmlSerializ... more >>
DateTimePicker custom format
Posted by Gary Miller at 2/15/2005 2:19:02 PM
Using the custom format "ddd MMMM d h:mm tt".
DataBindings.Text is set to my dataset field.
Control displays properly, I am able to change date values but the moment I
click the save button, text field resets to database value. Debugged the
first statement in the click event.
If I do ... more >>
programming an interupt
Posted by Dave at 2/15/2005 2:07:03 PM
How would I program an interupt. If I have two buttons on a form, one starts
a loop and the other stops the loop. What code would I need to add?
private void button1_Click(object sender, System.EventArgs e)
{
int a= 1;
... more >>
Namespaces and Folders
Posted by Mythran at 2/15/2005 1:35:31 PM
I have a namespace standard that I have to adhere to set by our development
staff:
[CompanyName.SolutionType.SolutionName.ProjectName]
So, an example:
MyCompany.Libraries.MyLibrary (When projectname == solutionname, we leave
the projectname off of the namespace).
Application:
MyCo... more >>
StreamReader to Dataset using Fixed Length Files
Posted by Ruffeo at 2/15/2005 1:33:51 PM
How do you read in fixed length file using the streamreader class and
input the records into a dataset with the correct field sizes and
names?
Thanks
... more >>
A few things I cant seem to find in C#
Posted by gregory_may at 2/15/2005 1:14:55 PM
I am trying to switch to C# from VB.
A few things I cant seem to find:
* How to get those handy Try/Catch templates to appear when I type "Try"
* How can I auto reformat my code?
... more >>
Treeview "Explorer like" Help Needed
Posted by Tim Geiges at 2/15/2005 1:14:47 PM
I have created a treeview for my app that on MainFormLoad I have it get
the list of drives with GetLogicalDrives() and populate the tree, then
when I click the drive it adds the first level of folders on that
drive, then click a folder and it adds the next level of folders under
the first, and s... more >>
newbie question about text boxes
Posted by Mark Reed at 2/15/2005 12:36:40 PM
What is the proper way to set a text box where it would display a few
paragraphs of disclaimer? It would be textbox, with vertical scroll bar
to run through the text.
Is this done with a textbox and setting the text property...a label and
the text property..or another method?
It seems wron... more >>
C#-DLL usable by VBA without framework?
Posted by see NO[at]SPAM signature.com at 2/15/2005 11:57:32 AM
Hi there,
Is there a way to create a DLL, written in C#, that can be referenced/used by VBA without the
necessity of installing the Framework on all the "Excel-PCs"?
TIA, Martin@Vienna@Austria@Europe
-------------------------------------------------------------------------
to get my rea... more >>
Pls HELP!- DataSet Inherited object not finalizing
Posted by MuZZy at 2/15/2005 11:55:19 AM
Hi All,
I got a issue here and hope someone can help me:
Let's consider this code:
// =================== CODE START =================================
using System;
using System.Data;
namespace TestNamespace
{
public class Test :DataSet
{
public static int i = 0;
public Test()... more >>
3D Drawing GDI+
Posted by Marcus de Leon at 2/15/2005 11:36:32 AM
Hi,
I was wondering what is the best way to implement a 3D view of a simple grid
of lines using basic GDI+ and C#. The grid is supposed to represent land and
I will place objects on the grid. I will need to be able to change
perspective views of the grid.
Any help would be appreciated.
... more >>
catching Exceptions at a top level
Posted by Laxmikant Rashinkar at 2/15/2005 10:37:01 AM
Hi,
I am working with a program that someone else wrote.
This program is full of bugs and unhandled exceptions are thrown all over
the code.
Instead of trying to catch the exception at each point it is thrown, I am
wondering
if it is possible to catch all exceptions at a top level. I tried t... more >>
determine if file is being used by another process
Posted by Gabe Moothart at 2/15/2005 10:15:18 AM
Hi,
I'm writing a windows service which interacts with a separate process.
Basically, it calls a process which creates a file, and then my service
reads that file. The problem is, the external process can take a second
or two to finish writing the file. If I try to read the file to soon, I
... more >>
REPOST: C# Guru's! ReadPrinter....I need to read printer buffer to stringbuilder...
Posted by trint at 2/15/2005 10:03:52 AM
The WritePrinter() is working. I know this ReadPrinter()
implementation isn't correct because it never reads into "reaDstrinG"
buffer from the printer...But, I'm sure one of you Guru's do know how I
can make this work (and any help is appreciated):
sb = new StringBuilder(initialValue);
... more >>
Remoting a Class
Posted by Ian Frawley at 2/15/2005 9:52:38 AM
Hi everyone
Any one managed to use properties when remoting i.e. Have a class thats
marshallbyref that returns a class that contains properties and enums.
Everytime I do this it just seems to expose the private member variables.
Cheers
--
"Life should NOT be a journey to the grave
with... more >>
Print labels in c#????
Posted by thomaz at 2/15/2005 9:43:26 AM
Hi;
I would like to know if exists a C# class or any methods
to print labels in different sizes like the labels in
Microsoft Word???
Thanks...
... more >>
Lost Focus
Posted by Harry at 2/15/2005 9:35:27 AM
I have 3 textboxes with numeric values and would like to have a running
total showing in a label ..What event do I use to show the values, when the
textbox has LostFocus. At present I have a click event to show the final
total
... more >>
NUnit for whidbey
Posted by Mark at 2/15/2005 9:26:48 AM
I'm aware that unit testing is built into Whidbey. However, does NUnit work
on Whidbey yet? I tried attaching to a Whidbey (Beta 1) .exe containing
unit tests and it bombed in a hurry.
Thanks in advance.
Mark
... more >>
Form as a control?
Posted by Chris at 2/15/2005 9:24:42 AM
Hi,
Is there a way to have a form as a control? Here's what I want to do:
I have a datagrid which displays various information. However, I want to
use it in multiple locations within the same application. Instead of
creating an instance of the grid and linking up the same data on each for... more >>
How to Deserialize to a specific object instance.
Posted by MP at 2/15/2005 9:19:55 AM
Hi,
I would like to be able to deserialize a stream to a specific instance.
Deserialize returns me a new instances and that is not really what we need,
we need to deserialized to an existing instance. Can anyone point me in the
rigth direction?
Regards
-Martin
... more >>
Javascript firing within a datagrid
Posted by Stephen at 2/15/2005 9:17:04 AM
I've got this great wee function which strips out the spaces entered into a
textbox and it does this on the key press off a user. I got this working in a
test application no problem however when I went to intergrate it with my real
application which has the textbox in the footer of a datagrid ... more >>
Problem using Reflection to Assign Generic Delegates
Posted by Joanna Carter (TeamB) at 2/15/2005 8:51:00 AM
Hi folks
I have a Generic Value Type and I want to detect when the internal value
changes.
///////////////////////////////
public delegate void ValueTypeValidationHandler<T>(T oldValue, T newValue);
public struct TestType<T>
{
private T value;
public event ValueTypeValidationHand... more >>
Explicitly cast a string to an object before testing if null
Posted by GlennDoten at 2/15/2005 8:47:28 AM
I just happened to be looking through the implementation of the
System.Version class in the SSCLI and one of the constructors starts
like this:
public Version(String version) {
if ((Object) version == null)
throw new ArgumentNullException("version");
Does anyone have any ideas why... more >>
How to: validate CheckBoxList control in ASP.NET?
Posted by charliewest at 2/15/2005 8:35:01 AM
The MSDN documentation states that it is not possible to validate the
CheckBoxList server control in ASP.NET using the RequiredFieldValidator.
Is it possible to do this via the CustomValidator using client-side script?
I have attempted to write javascript code, but cannot pull the value of th... more >>
Converting CTime read from a C++ archive file
Posted by Claire at 2/15/2005 8:19:50 AM
I need to interface to an MFC CArchive file created with Visual Studio 6.
I've found some online sample code to translate an archived string into C#
I now need to read in and translate a CTime object. This is written to the
file as 4 bytes. Can anyone tell me the structure please
(It's a s... more >>
add null to collectionbase derivation
Posted by John B at 2/15/2005 8:01:39 AM
I changed my code to replace an arraylist with a collection derived from
collectionbase to get type-safe calls. Now though, I cannot seem to add a
null value to the collection, where I could previously with an arraylist. Am
I doing something wrong? Is there a way around it?
Thx
... more >>
Check and rename file variable
Posted by jez123456 at 2/15/2005 7:57:09 AM
Hi, I’ve written a c# program to compact certain msaccess databases. The way
this works is to compact say C:\test1.mdb to C:\temp.mdb, then delete
C:\test1.mdb and rename C:\temp.mdb as C:\test1.mdb.
My problem occurs if there is already a C:\temp.mdb file. I don’t want to
just delete t... more >>
Unique Number like GUID
Posted by David Pope at 2/15/2005 7:41:28 AM
I need to create a unique number like a GUID but all numbers.
Does anyone know of algorithm to do this?
Thanks,
David
... more >>
Send Mail
Posted by Retf at 2/15/2005 7:16:14 AM
Hi All,
I need send e-mail through the form.
I tried this:
---------------------------------------------------
DateTime dt = DateTime.Now;
String sMsg = "<p><font face='Verdana' size='1'>Trinity Systems - Comprar -
Private Label Control - " + dt.Day + "/" + dt.Month + "/" + dt.Year +
"<... more >>
Assign values retrieved from a dataset to variables
Posted by gjtired at 2/15/2005 7:13:01 AM
Currently I am retrieving values from a dataset and assigning the
values to a textbox. I then assign the value from the textbox to a
variable. I don't need the values in the textbox at all. I'm sure there
is an easier way than I'm doing it. Any suggestions or help would be
appreciated. Below is ... more >>
AppDomains and Dynaimc Loading problem
Posted by JonS. at 2/15/2005 6:47:02 AM
Hi,
I posted this article (
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.dotnet.languages.csharp&mid=0ee9781a-78f7-4398-a0ef-eeb195eccaea&sloc=en-us
) last week, and have yet to receive any replies. If someone could please
give me further information I would greatl... more >>
file reading/writing
Posted by Venkat at 2/15/2005 5:03:03 AM
Hi,
I need to read a file and simultaneously modify the same file , i.e, read
a file and then change some contents in it and then save it once again.
How do I do this?
Thanks,... more >>
Managed -> UnManaged Serialization DeSerialization
Posted by Brian Keating at 2/15/2005 4:47:07 AM
Hello there,
I wonder can anyone help point me in correct direction.
Basically I have a Managed structure and I want to Serialize to to a byte
array,
Then I want to read this byte array in my <u>UnManaged</u> c++ app and get
the contents.
The reason I nead to serialize the structure i... more >>
C# remoting and load balancing
Posted by msuk at 2/15/2005 4:45:02 AM
All,
I have a load balanced application server enviroment and wish to write a
component that will sit on each node and service remote requests from many
clients.
Can anyone give me some advice in what type of remoting I should use i.e.
client activated or sever activated for my load ba... more >>
From C++ to C# and back again....
Posted by Aaron at 2/15/2005 4:37:09 AM
I taught myself C++ a while back, but never got to
involved in actually writing applications with it. I
actually spent the last 6 years working for numerous
internet web firms as well as doing a plethora of
freelance web development work. Lately I started learning
c#. The idea is to stop u... more >>
C# Guru's! ReadPrinter....I need to read printer buffer to stringbuilder...
Posted by trint at 2/15/2005 4:28:04 AM
The WritePrinter() is working. I know this ReadPrinter()
implementation isn't correct because it never reads into "reaDstrinG"
buffer from the printer...But, I'm sure one of you Guru's do know how I
can make this work (and any help is appreciated):
string reaDstrinG = "";
int pcRead = 0;... more >>
Escape chracter error?
Posted by dakkar NO[at]SPAM sylveria.gen-dot-tr.no-spam.invalid at 2/15/2005 3:47:40 AM
I have an illegal character error so i used @ escape character but it
doesnt work how can i make this work possible
String dir =
myproc[i].MainModule.FileName.ToString();
FileVersionInfo info =
FileVersionInfo.GetVersionInfo(@dir);
Thanks
Poste... more >>
Someone can check if my application installs?
Posted by Jonny P. at 2/15/2005 2:25:21 AM
I am trying to release 2 applications based on the framework.
A sound player and an Unicode tag editor.
Both can be installed an run correctly in my system.
I don't know if they can be installed in computers without the Visual
studio.
http://wusoft.ahost4free.com/en/index.html
... more >>
Compiling from the command prompt
Posted by mikkel_leslie NO[at]SPAM hotmail.com at 2/15/2005 2:25:00 AM
Im doing an application, where I have to compile from the command
prompt. Like the line shown below.
csc /optimize+ /t:exe /r:ClassTest.dll /out:Form1.exe Form1.cs
The problem is that Im using Microsoft.Office.Interop.Outlook, wich is
no problem as long as I compile from MS Visual .Net. I don'... more >>
Paging
Posted by Kannan.M.R at 2/15/2005 2:11:01 AM
Hi,
How do we create the paging effect like the one we see in google?
Kannan... more >>
Get ListView cell's handle?
Posted by redneon at 2/15/2005 1:47:03 AM
Is it possible to get the Handle property for a particular cell in a
ListView? I'm wanting to turn a cell into a progress bar rather than just
displaying text. If it's possible to get the Handle I can just do
Graphics.FromHwnd(listView1.Handle); and then use FillRectangle to display
the prog... more >>
|