all groups > c# > december 2006
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
Regular Expression Translate
Posted by Amy L at 12/31/2006 11:22:36 PM
It looks as if there is no equivalent .Net regular expression method that is
comparable to tr/// (Translate) in Perl.
I was looking to squash a specific duplicate character in a string.
In Perl its pretty trivial.
$myString =~ tr/././s;
This will essentially remove duplicate "." period... more >>
How do i draw on top of button control
Posted by Prasanthgs at 12/31/2006 10:50:00 PM
hi all ,
i would like to know how to draw on top of the Button control,
(vertical lines with different sizes ).
thanks in Advance... more >>
What is Smart Client Software Factory?
Posted by Ronald S. Cook at 12/31/2006 11:53:35 AM
What is Smart Client Software Factory and how does it related to/fit in with
Composite UI Application Block (CAB)?
Thanks,
Ron
... more >>
Can I ignore linebreaks in Regex Singleline mode?
Posted by MrNobody at 12/31/2006 11:40:00 AM
I want to match some HTML string using Regex but the linebreaks are getting me.
Is there a way to just completely ignore linebreaks in my regular expression?
If not, how would I specify a linebreak in the regex? I know how to do begin
line/end line but that only works in non-singleline mode... more >>
.NET mix C# with vb.NET
Posted by koby at 12/31/2006 10:40:00 AM
it is accepted to combine in one system both C# projects and vb.NET projects?
if i have a system that wrote in vb.net and i'm C#-er, can i continue to
develop the system with C#?
thanks
koby... more >>
Examine Source files in Solutiuon
Posted by Joe at 12/31/2006 8:26:49 AM
Hi
Working with a large solution with many projects and many different people
working on the code
I was looking for a way to loop thru all projects and file to ensure
everyone has done some standard things
ie
-all forms have localizable set to true
-name spaces following same format
... more >>
"MS Access Object Model" examples needed
Posted by dk9 at 12/31/2006 6:29:54 AM
I want to use Access Object Model from .NET to open access database
files and change/add/delete Tables, Views, etc and to repair/compact
Databases.
MSDN is lacking this kind of information.
Any links where I can get source code examples?
Thank you
... more >>
How To Duplicate A String
Posted by sternr at 12/31/2006 3:44:54 AM
Hey,
Is there a way to duplicate a certain string multiple times?
I.E: I've got the following string: "<0>" and would like to create:
"<0><0><0><0>".
Is there a CLR API for this behavior or should I create this function
myself?
Thanks
--sternr
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
DAtagrid for Flat File
Posted by Thom Little at 12/30/2006 11:14:13 PM
I need to maintain data in a flat file (probably a tab delimited .txt file)
and would like to access it with gatagrid. I would populate it during
startup and save it on exit.
Can I access a flat file with datagrid? If I can can you point me to a
simple sample.
____________________________... more >>
How to grab attachment from a list of given URL
Posted by Sophie at 12/30/2006 9:56:03 PM
Hi,
I try to design a window application to grab attachment from a list of given
URL and save them to a user difined folder on their local drive.
The list of URL for me to grab attachment will be saved in text file format.
The URL's might be ending with attachment file types: .jpg, .gif, pdf... more >>
GetHashCode() does not work as expected
Posted by AbeR at 12/30/2006 5:35:00 PM
I am trying to look for change in an instanciated object that contains a
generic list<>. I first get an int value of objA.GetHashCode(). I add a few
objects to the list<> collection in objA I compared the initial value with
the current hash code of objA and they were still the same. OK I thou... more >>
Compare Serialized object
Posted by Paez at 12/30/2006 4:49:16 PM
Hello There.
I hava a Myclass [] obj1 in wich I add my computer hardware configuration.
After this object is "filled", I serialize it, into a dat file.
Then I deserialize it into obj2 and I compare the original and the
deserialized object, and they do not match! They sould match, I think.... more >>
combobox selectedindexchanged event
Posted by tbrown at 12/30/2006 4:47:11 PM
I have a combobox with items like this: {one,two,three}. The selected
index is 0, so "one" appears in the combobox text. When the user drops
down the list, and selects "two", for example, I modify the Items
collection to be {two,one,three} and now want "two" to appear in the
combobox text. How... more >>
How do I: Dynamically embed resource files (specifically, XML) (...)
Posted by CodeLeon at 12/30/2006 3:09:04 PM
Hi, All. I am creating a setup program. The way it works is that the
user creates their setup info, my program generates the C# code for a
setup executable, embeds the xml file containing the info for the
setup, and compiles the whole thing into one EXE. How do i embed
resources, and access them... more >>
Speed Freaks & Bit Fiddlers: Can you make this go faster?
Posted by Russell Mangel at 12/30/2006 1:39:30 PM
Can someone show me how to speed this up?
1. Whats the fastest way for Unsafe C#?
2. What the fastest way for Safe C#?
public static Int64 ToInt64(Int32 low, Int32 high)
{
Byte[] lowBytes = BitConverter.GetBytes(low);
Byte[] highBytes = BitConverter.GetBytes(high);
Byte[] bytes =... more >>
TopItem & ListView [Win C#]
Posted by MikeY at 12/30/2006 9:36:49 AM
Hi Everyone,
I am trying to ensure displayed items at the top most portion of my ListView
when being added to my ListView, no matter where the items are being added
with in the listview. So that the users can easily find where their added
items are located. Can this be accompished with "Top... more >>
help for changing the default installation folder
Posted by sunil at 12/30/2006 7:28:21 AM
Hi,
I want to change the default installation folder to my own path. I did
it by changing the application folder's DefaultLocation property. The
installation works fine as long the path that I give is complete path.
If I give relative path, there is an error.
The path is relative to the locatio... more >>
How can you make a class register an event?
Posted by Shawn at 12/30/2006 5:04:00 AM
Here is what i am trying to accomplish.
I have a group of user defined controls and i have a form. the form has a
tab control and a menubar. the user defined controls will be add one to a tab
page.
what i want to do is create a class that will manage the tab control. it
will have methods th... more >>
FileIOPermission
Posted by Emil at 12/30/2006 12:46:02 AM
When I compile the application and run it (on my computer) it works fine, by
on the other computers exception is thrown: "Request for the permission of
type 'System.Security.Permissions.FileIOPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
E... more >>
System Properties -> How to extract "User"
Posted by Adrian at 12/29/2006 10:34:29 PM
System Properties show the User. I would like to be able to extract that
information in an application (not change it, only retrieve it). How can
that be done?
Thank you,
Adrian.
... more >>
Remote Server Status
Posted by Thom Little at 12/29/2006 10:17:21 PM
What is the best way to determine if a remote server is available?
HTTP server.
Mail Server
_______________________________________________
Thom Little www.tlanet.net Thom Little Associates, Ltd.... more >>
Stacktrace class and CLR 2.0
Posted by rani.yaroshinski NO[at]SPAM gmail.com at 12/29/2006 10:05:57 PM
Hi all,
The Stacktrace class (system.diagnostic) in CLR 2.0 (Framework 2.0),
still offers a constructor to allow showing the stack-trace of another
thread. However, the usage involves suspending the diagnosted thread.
Now, CLR 2.0 turns the Suspend method into obsolete, which leaves the
abo... more >>
Best practice to allocate this byte array for this situation?
Posted by trevor.farchild NO[at]SPAM gmail.com at 12/29/2006 9:14:09 PM
Hi, long time reader, first time poster
I have an application that will be doing this 5 times a second:
Get a bunch of data from a NetworkStream and convert it into a Bitmap
Therefore, the process looks like:
Read the NetworkStream to find out size of the data
Allocate that amount as a byte... more >>
CSharp and Excel
Posted by gumbystation NO[at]SPAM gmail.com at 12/29/2006 5:00:43 PM
I am looking to take data from an excel spreadsheet into a csharp
application to manipulate the data in various ways. Currently, I am
using VS2005 (self-taught C#) and Excel 2000. I have researched into
using the Excel.Application object and have successfully openned a
worksheet in Excel (thou... more >>
Memory leak
Posted by Frank Rizzo at 12/29/2006 3:54:57 PM
Hello, I have a very frustrating issue I've been working on. I have a
routine that does the following:
1. Load a large (declared local to the function) DataSet from the
database. It contains 5 tables.
2. Load the database into a fairly complicated object model.
3. I dispose of the Data... more >>
Creating a 'console application'
Posted by Marco Shaw at 12/29/2006 3:29:24 PM
C# novice...
Can I create a console application (think the Pine email reader or even
'edit' in DOS) where I can use my up/down/side arrows to move around the
app?
I'd want something with a simple menu system as well as popup functionality.
Any hints/pointers to get me started?
Marco ... more >>
Showing Save As dialog in C# 2.0 - Windows
Posted by Omer at 12/29/2006 3:01:28 PM
HI,
I have showed a Save As dialog in ASP.Net many times. Now trying to
show one in windows based application but to no avail, can anybody tell
me how to do it ? My application is writing a file, and I just want a
Save As/ Open File dialog, like the one we have in web based
applications.
I'll ... more >>
How do I get the file size of a JPEG and resize it if too big?
Posted by Karen Hill at 12/29/2006 2:07:06 PM
How do I get the file size of a JPEG and resize it if it is too big in
terms of MB or KB? I am using Windows Forms, .NET 2.0, C#. I want to
put this image in a database so I want to make sure it isn't too large
(ideally no more than 200K. I tried discovering the size of a JPEG
using sizeof but... more >>
the pains of casting ushort + ushort...
Posted by xlar54 at 12/29/2006 1:52:42 PM
I have some code that ends up looking alot like:
ushort x = (ushort)(m + b);
whereas both m and b are ushorts also. This is due to the automatic
casting of values to int. Some quick questions:
1 - Why? Why would they do this, this way? Why not automatically cast
it to the size of the r... more >>
Help with documentation in Csharp
Posted by JC at 12/29/2006 1:33:30 PM
I like your opinions about the best way of documenting the code in Csharp.
To my particularly I like the solution given in VST 2000 but that they
(Microsoft) removed of 2005.
That you think about Ndoc and others? What do you prefer for VS2005 and
..Net 2?
Thanks...
... more >>
How to use XmlWriter Class to convert a Object with data to Xml format?
Posted by Sugandh Jain at 12/29/2006 1:22:26 PM
How to use XmlWriter Class to convert a Object with data to Xml format?
Regards,
Sugandh
... more >>
C# ListView background color question
Posted by Jason Huang at 12/29/2006 11:45:38 AM
Hi,
In my C# Windows form MyForm, I have a ListView LVW1 and it's size is pretty
big, says it can accommodate approximately 25 rows.
The LVW1 is in a GroupBox.
Now that I only have 5 rows of ListViewItem in the LVW1, and we leave empty
space on the LVW1.
In some situation the color of the ... more >>
Access form controls from another form
Posted by Paez at 12/29/2006 10:10:23 AM
Hi there.
How can I modify a form control property from another form. Let's say, I
have a frmMain that has a ToolStripMenuItem with the current user info.
Then, I open another form (frmChangeUser) and after I enter a password in
that form, the current user will change and the frmMain ToolSt... more >>
DataRepeater
Posted by Amjad at 12/29/2006 3:19:00 AM
Hi i have datarepeater in which i have textboxes, how to create
txtCustID_TextChanged event in datarepeater like simple textbox its easy
double click it and it create automatically the event but in data repeater we
have multiple textbox and cannot directly create event handler for that
textb... more >>
Digital rights management for images
Posted by Henrik Dahl at 12/28/2006 11:26:12 PM
Hello!
I have some images (for instance in .jpg files) which I would like to apply
digital rights management for, i.e. that only authorized users may wiew then
using their www browser, i.e. if a non-authorized user is attempting to
address the .jpg file with a url, or for that sake gets a c... more >>
Binary search class: small problem retrieving the last element in the ordered array
Posted by Bob Rock at 12/28/2006 10:53:06 PM
Hello,
I have an array of strings and need to find the matching one with the
fastest possible code. I decided to order the array and then write a binary
search algo.
What I came up with is the following. I noticed that if I set:
int upper = strings.GetUpperBound(0);
I never match the l... more >>
Trace class truncates string when it contains null chars???
Posted by Bob Rock at 12/28/2006 10:52:15 PM
Hello,
using the WriteLine method of the Trace class I noticed that strings
containing null characters (i.e. \0) get truncated in the output window at
the first null char and anything that follows simply gets lost. I'm using
..NET 1.1 (have not tested with 2.0).
Try the following to see ... more >>
Retrieving from inside a static method the type of the containing class???
Posted by Bob Rock at 12/28/2006 10:51:12 PM
Hello,
is there a way of retrieving the type of the class containing a static
method from the method itself when it gets called?
I have this situation: an abstact class that defines a static method, a
class that derives from the abstract class and I need
to retrieve the type of the concre... more >>
Xml element declaration with the namespace attributes
Posted by anoop.mangal NO[at]SPAM gmail.com at 12/28/2006 10:27:06 PM
I need to form an xmlelement like the declaration below:
<message xmlns="http://abcd.com" xmlns:s2s="http://abcd.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://abcd.com message.xsd">
Can you please let me know what needs to be done. I need the solutio... more >>
setting form control property from class
Posted by tirrell payton at 12/28/2006 9:13:15 PM
Hello,
I am trying to manipulate the properties of a form's controls from a class.
I dont want to make the form's control public.
Attached is a code snippet of what I am trying to accomplish:
Public Form1()
public void SetLabel4Text(string theText)
{
label4.Text = ... more >>
using enums in refleciton
Posted by bshumsky06 NO[at]SPAM yahoo.com at 12/28/2006 8:01:20 PM
Hi,
I am trying to parse some text into c# commands using reflection. I am
new to this so there may be a simpler way of doing things. Anyhow, the
below code works fine except for enums. PropHere is an array
containing the string name of the property I want to set and newValues
is an array co... more >>
Convert a DataGridView to HTML?
Posted by phrankbooth NO[at]SPAM hotmail.com at 12/28/2006 7:53:18 PM
Hello,
Is there a way to convert .Net2's DataGridView into an HTML table?
Any pointers appreciated.
Thanks,
--PhB
... more >>
MessageBox.Show() after FolderBrowserDialog doesn't get activated
Posted by Marcel Brekelmans at 12/28/2006 4:42:29 PM
Hi,
I'm trying to display a MessageBox after a FolderBrowserDialog. I see that
it gets displayed, but not activated. The form is not in front and when I
have some other forms open the MessageBox is hidden behind them. The problem
seems to occur only after using the FolderBrowserDialog.
H... more >>
DataTable or DataSet from XML
Posted by JohnAD at 12/28/2006 4:01:31 PM
Hello NG,
Originally I posted this question on microsoft.public.xml but did not get
any reply all day so cross posting it on this NG in hope of getting some
answer -
I have a very basic understanding of XML so need some help here. I have a
XML file (structure given below). I want to chang... more >>
Serialize to Xml.
Posted by Sugandh Jain at 12/28/2006 3:01:42 PM
I am using a method to serialize objects to xml.
this method is working fine to serialize most of the objects to Xml.
For one collection object, it is not doing so. The Collection and its
containing object are marked [Serilizable].
What could be the reasons for the object not getting serial... more >>
Kill a MessageBox
Posted by Dave Booker at 12/28/2006 2:50:01 PM
How can I kill or close a MessageBox that is shown in a thread that I later
abort? In the following code, the MessageBox will always stay open until
closed by the user, even when the other event terminates first and the main
WaitForData method returns!
static public void WaitForData()
{
... more >>
CultureInfo and Decimal point.
Posted by Hector at 12/28/2006 2:37:15 PM
Hi,
My application supports different languages, and i have a problem with the
decimals:
In this application, i receive datas like "10.528".
When i use CurrentCulture = "en-US", no problem.
But with "fr-FR" for example, there's a bug.
Of course, one way to solve this problem is to test if... more >>
Understanding Generics....
Posted by SpotNet at 12/28/2006 12:19:43 PM
Hello NewsGroup,
Reading up on Generics in the .NET Framework 2.0 using C# 2005 (SP1), I have
a question on the application of Generics. Knowingly, Generic classes are
contained in the System.Collections.Generic namespace. Literature I have
read on this ties generics in with collections, ... more >>
PlaceHolder + Events
Posted by AdamK. at 12/28/2006 10:00:03 AM
/*
Hello,
Its maybe simple but i cant fix it :(
First i would say sry for my english, but i will try my best :)
Its web application and what i have in the files:
In aspx:
<table>
<asp:PlaceHolder ID="placek" runat="server" />
</table>
In cs:
*/
protected void Page_Load(object sen... more >>
ASP.net 2.0 deployment
Posted by marc.cueto NO[at]SPAM gmail.com at 12/28/2006 9:09:00 AM
Hello,
I'm trying to build a deployment package for an application that was
migrated to ASP.net 2.0. My problem is that after I deploy the
application, I still have to into the IIS manager, go into the web
sites ASP.net properties and switch the ASP.net version to 2.0 because
by default the 1... more >>
|