all groups > c# > may 2005 > threads for friday may 13
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
Converting a string to hexadecimal
Posted by bernardpace NO[at]SPAM yahoo.com at 5/13/2005 11:27:58 PM
Hi,
I need to convert a simple string such as "12", to hexadeciaml. What
method should I use, because I can't find the correct one?
Can someone help me out.
Thanks in Advance... more >>
How self-aware can an item in a complex nested class be?
Posted by Robert W. at 5/13/2005 8:18:03 PM
I'm thinking of building a complex data model with a number of nested classes
but need to know something first. To simplify my question, let me present
you this sample data model
MainClass
Questions (collection)
Question (class)
Text (property)
Answers (collect... more >>
Dialog boxes and how to get the DialogResult return value
Posted by steve bull at 5/13/2005 6:56:47 PM
I have built what I think should be a dialog box. It contains 4 tabbed panes for generating a range of colors. Each
tabbed pane consists of a panel with all the widgets on them including the OK and Cancel buttons. These buttons have to
be on the panels themselves so that they can create the colo... more >>
How to get the last date of the month?
Posted by Alpha at 5/13/2005 5:36:07 PM
Hi, I have a datetime variable. How can I get the date for the end of the
month according to that varilable's month and year?
Thanks,
Alpha
... more >>
Is this a reasonable way to use generics?
Posted by J.Marsch at 5/13/2005 5:12:47 PM
All:
I have an interesting problem in front of me. does this sound reasonable,
or ridiculous?
I have to build something that is sort of like a style sheet for Windows
controls.
Picture a collection of dissimilar value types: a couple of Color types,
some ints, some strings etc.
I _... more >>
Threading Issue
Posted by Mythran at 5/13/2005 4:56:24 PM
Part #1:
I have a Thread, MainThread, and a child thread that is started in the
MainThread called ChildThread.
I have a DataSet created in the MainThread in which needs to be passed to
the ChildThread. The ChildThread needs to update the DataSet with new data.
The MainThread, after the Ch... more >>
Problem with reading byte[] from Stream
Posted by Li Zhang at 5/13/2005 4:49:30 PM
I have a problem with reading byte[] from a memory stream. Basically I
want to resize a image and then store them to sql server. Here is part
of the codes. every time I tried to read byte[] from stream, I only got
all 0 byte[], I don't know what is the problem. Please help me to check
my err... more >>
DataAdapters, DataSets, DataTables
Posted by Christopher Weaver at 5/13/2005 4:30:19 PM
I'm confused about the relationships between these objects. I've written
this:
DataSet dsTaskActivities = new DataSet("TA");
DataTable dtTask = dsTaskActivities.Tables.Add("Tasks");
DataTable dtActivity = dsTaskActivities.Tables.Add("Activity");
OdbcCommand cmd = new OdbcCommand();
cmd.Con... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
odd behavior is list box
Posted by Phil Barber at 5/13/2005 4:00:28 PM
I can drop a listbox on a clean winform form, set the collection with a few
strings. they show up fine in desgin, but when I run the app the list box is
totally blank. I can set the proper code and I can select say the thrid item
in the list and have it show in a text box, so I know the value ... more >>
Carriage Return and String confusion...
Posted by eric_mamet_test NO[at]SPAM yahoo.co.uk at 5/13/2005 3:33:12 PM
I am preparing the text of a stored procedure using StringBuilder but
bumps into \r\n issues...
I use some syntax like
MyStringBuilder.Append("Something very clever here");
MyStringBuilder.Append("\r\nGO");
If I then write MyStringBuilder.ToString() into a file, it's perfect as
I have in... more >>
SCCI question
Posted by MumboJumbo at 5/13/2005 3:15:23 PM
Hi folks ...
I was wondering if there is a C# library i can use to integrate source
control into a gui project i am working ... it would be really nice i
could let my users integrate with a CM tool without having to do much
work ...
Cheers,
Jim... more >>
extra row
Posted by Moti at 5/13/2005 2:45:38 PM
Hi all
I connect DataGrid with table:
dataGrid1.DataSource = dataSet.Tables[0].DefaultView;
There always an extra row, How can I delete it? or can I control this row?
Moti
... more >>
programmatically removing a service
Posted by J Childs at 5/13/2005 2:22:02 PM
I would like to write a program that can remove a windows service and I do
not wish to use the windows installer. Can someone point me in the right
direction?
Thanks... more >>
file access question in c# dll
Posted by jason at 5/13/2005 1:37:55 PM
saw another thread on this topic, but no solutions were presented, so
here is my question:
i have a c# class library dll that must access a config-like text file.
when using the FileStream constructor, it seems to attempt to open the
file from the directory that the parent process (the one uti... more >>
Map a drive to an ftp share
Posted by John Bailo at 5/13/2005 1:28:57 PM
I build an NT service using the FileSystemWatcher() class to detect when
new files arrive at our ftp server.
Now I want to configure it to watch for files on someone else's remote
server.
Questions:
1. Can I map a drive letter to an ftp share?
2. Do you think the FileSystemWatche... more >>
Is there a way to look at the data in a table in a dataset?
Posted by Alpha at 5/13/2005 1:22:20 PM
I tried looking at the dataset at debug time but there were a ton of
information and levels. Is there a place or a different way to look at the
data?
Thanks,
Alpha... more >>
datetime variable to dataset
Posted by Alpha at 5/13/2005 1:22:11 PM
When I select a datetime variable into a dataset does that stay a datetime
column? I specified it to be so in the dataset but having problem formating
it in the Crystal.
Thanks, Alpha
dtFinancial = this.dtpFinancial.Value;
dtFinancialEnd = this.dtpFinancialEnd.Value;
... more >>
Creating Excel spreadsheet
Posted by Randy at 5/13/2005 1:07:44 PM
Hello,
I'm getting an "Access Denied" error when I hit the line of code...
Excel.Application oXL = new Excel.Application();
From what I've read, you can get around this by putting the file (where this
code is) in a separate directory and also putting its own web.config in this
separate di... more >>
concurrency/lock problem?
Posted by Matias Woloski at 5/13/2005 12:09:54 PM
I have the following code which is running in every Page_Load of my ASP.Net
app.
It basically will add rows to a table upto MAX_CACHED_ITEMS and then will
flush all the cached items to the database.
Do you foresee any concurrency problem? or any performance problem?
private object lockObj... more >>
How to cast for GetOcx()
Posted by Brett at 5/13/2005 12:01:29 PM
I have this code and VB.NET and need to use it in C#:
Dim cacheInfo As clInetSuiteX5.IclIECacheInfo
cacheInfo = clUploader1.GetOcx()
Reference in VB.NET project:
AxclInetSuiteX5 (AxInterop.clInetSuiteX5)
clInetSuiteX5 (Interop.clInetSuiteX5)
[C#]
public string myMethod()
{
... more >>
how can I get the string representation of an enumeration??
Posted by Green at 5/13/2005 11:09:20 AM
Hi, All
I have an Enumeration SqlDbType.Int, I want to convert to
"SqlDbType.Int". How to do this, thanks very much!
... more >>
xml problem in .net
Posted by helpful sql at 5/13/2005 9:41:56 AM
Hi all,
In my code, I need all "datasetMPI" nodes in an array. Here is a portion
of my xml file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:v="... more >>
Trying to convert a macro from C++ to C# What does this do?
Posted by Garry Freemyer at 5/13/2005 9:31:16 AM
I'm trying to convert this macro to a c# function but I have a big problem.
It's on the LEFT side of an assignment statement and I am extremely
flustered over this one because I'm a little rusty and have been struggling
over this for days, not wanting to show all my ignorance in final desparat... more >>
Architectural question
Posted by J-R at 5/13/2005 9:22:44 AM
If I had a question about designing and architecturing a software which
newsgroup is the most appropriate one for that?
Thanks a lot
... more >>
Regular Expressions
Posted by Justin Rich at 5/13/2005 8:42:28 AM
using .net 2.0.50110
String line;
RegexOptions options = ((RegexOptions.IgnorePatternWhitespace |
RegexOptions.Singleline)| RegexOptions.IgnoreCase);
Regex headerRE = new
Regex(@"\\d{5,5}(?<an8>\\d{5,5})\\s(?<bu>\\d{2,2}).(?<mcu>\\d{3,3})",options);
Match headerM = headerRE.Match(line)... more >>
DataGrid Boolean Column
Posted by ZS at 5/13/2005 8:22:04 AM
Hi,
I have a boolean column in my datagrid. During runtime when I check the
checkbox there are actually Three states for the checkbox. So I have to
actually double click to change from true to false. is there a way in which I
can just click once and then when I check it toggeles. Something l... more >>
.1 + .2 = 0.30000000000000004
Posted by Craig at 5/13/2005 7:52:17 AM
In the below code, mOnePlusTwo evaluates to 0.30000000000000004 (although it
displays as ".3"). Consequently, comparing that value to mThree (.3) results
in false.
What's going on? Is there something else I should do (other than switch to
using decimal types)?
double mOne = .1;
double... more >>
I to draw a string at an arbitrary angle
Posted by Val at 5/13/2005 7:52:14 AM
When I am using Graphics.DrawString, I can only draw a string either
horizontally or vertically. Is the a way to draw under arbitrary angle -
parallel to some line?
I would appreciate a code sample.
Thanks,
Val
... more >>
windows service Logon credentials change
Posted by Anil at 5/13/2005 6:38:02 AM
Hi All,
we have four app servers and 5 services are installed in each machine.
For every 60 days we need to change winodws domain users passwords, which
the services run.
Is there any way we can grab the service programatically and change service
logon credentials using C# utility?
I can... more >>
Hook function to RMB context menu
Posted by _|_|_ at 5/13/2005 6:14:34 AM
Is there an example or doc that illustrates how to hook new
functions into the right-mouse-button's context menu?
... more >>
Changing folder attributes
Posted by _|_|_ at 5/13/2005 6:12:27 AM
Since XP loses control of what folders are supposed to look like
(details view, List view, icons, etc) I was considering writing some
functions to reset some of my folders. For ex: MP3 folders could
be set to details view and have bitrate and comments added to
the window header/display.
Is ... more >>
Delegates and Classes
Posted by Robert at 5/13/2005 5:44:06 AM
I have a form that needs to be updated from a procedure in a class. I have a
loop in the class that processes records. Each time a recored is processed,
I need to update a textbox on the form. Can a delegate be used to pass back
the data? What would be the best way to handle this? I tried... more >>
Hard killing a thread that's got resources open (SqlDataAdapter, SqlConnection)
Posted by Sgt. Sausage at 5/13/2005 5:14:00 AM
New to multi-threading (less than 24 hours at it <grin>)
Anyway, it's all making sense, and working fairly well
thus far, but I'm having a minor issue I'm not sure how
to get around.
I've got a form that uses SqlDataAdapter. It fires off
a thread to fill a DataSet. Not a big deal, this work... more >>
Threading issue -- InvokeRequired on Form is unreliable.
Posted by Sgt. Sausage at 5/13/2005 4:59:04 AM
Problem. Work-around. No issues, just looking to see
if I'm the only one that's seen this.
I just lost 3 hours (shoulda found it sooner) to the
InvokeRequired on a form being somewhat unreliable. It
will sometimes return incorrect results.
I've got it isolated to the Form's Handle property.... more >>
Basic question about Public Private Key Pairs
Posted by Sahil Malik [MVP] at 5/13/2005 3:32:11 AM
Public Private Key Pairs - How do they work?
-----------------------------------------------
I was looking at a presentation recently in which it was suggested that -
User 1 Encrypts a message using User 2's Public Key.
User 2 Decrypts the transmission using his Private Key to get the origna... more >>
Multiple MDI children
Posted by groast at 5/13/2005 2:34:03 AM
Hi,
I try to create a MDI children form everytime I click the "new" option. I
used a standard source code provided at MSDN.
But something weird happen, the first time I click it generates 1 child
form. The second time i click, it generates 2 child forms at once. Then the
third time I cli... more >>
Image not Displaying
Posted by Barry at 5/13/2005 1:25:25 AM
Hi
why does the following code not display the image
public Form1()
{
InitializeComponent();
Bitmap imgBg = new Bitmap("Monitor.bmp");
Graphics gr = Graphics.FromImage(imgBg);
gr.DrawImage(imgBg, new Rectangle(10,10, imgBg.Width, imgBg.Height));
}
if i... more >>
Maintaining Security from java to .net page and back
Posted by yatharth NO[at]SPAM gmail.com at 5/13/2005 12:40:18 AM
Hi,
Its Urget plz help me out on this issue.
I m working on a project in which we have used both java and .net,
and the issue is how to maintain security ,if we move from java page
link to .net page and back .We have used the .net authentication
security in our .net project and suppose the ... more >>
didn't work
Posted by liranbaryoav NO[at]SPAM gmail.com at 5/13/2005 12:13:17 AM
i allready tried this and its still shows the System.IO.File.File()
is inaccessible due to its protection level error... more >>
re help with array of functions more info
Posted by CobraStrikes NO[at]SPAM al.com at 5/13/2005 12:01:02 AM
Hi,
I hope the following makes it clearer what I am trying to do.
lets say I have 3 methods
private int method1()
{
}
private int method2()
{
}
private int method3()
{
}
How can I code the following
setup the array
method [] ArrayMethod = { method1,method2,me... more >>
reference not removed revisited
Posted by Frank at 5/13/2005 12:00:00 AM
Hello,
I again ask for help on the next problem, a previous question did not give a
solution.
The method at the bottom of this message leaves a reference to somethig, as
far as I can tell to the _sqladapter variable. As you can see I use the
'using' statement so the adapter and the connect... more >>
How to pass arguments to a property in C#?
Posted by Prachi Dimble at 5/13/2005 12:00:00 AM
Hi,
In vb.Net one can pass arguments to properties. How does one achieve it =
in c#? Given below is the vb.net code for passing arguments to property =
getters and setters..
Thanks,
Prachi
Public Property Field(ByVal strFieldName As String, Optional ByVal =
tableName As String =3D "", O... more >>
Negative optimization in C# compiler?
Posted by Gianluca at 5/13/2005 12:00:00 AM
..method public hidebysig newslot virtual final instance object
GetValue(object target) cil managed
{
// Code Size: 16 byte(s)
.maxstack 1
.locals (
object obj1)
L_0000: ldarg.1
L_0001: castclass WindowsApplication2.CMyClass
L_0006: ldfld stri... more >>
How can I randomly pick either 5 or 8??
Posted by Paul Tomlinson at 5/13/2005 12:00:00 AM
How can I randomly pick either the value integer 5 or integer 8??
I don't want a value between 5 and 8 but either the values 5 or 8 randomly.
Any ideas on how can I do this please??
MA
... more >>
Dispose
Posted by aaj at 5/13/2005 12:00:00 AM
Hi
can anyone point to a good link explaining (simply) when I should use the
dispose method.
Sort of things I'd like to know are
how does it differ from finalize in VB.net (or is it nothing like finalize)
Does the garbage collector automatically call the dispose method when an
object g... more >>
Virtual directories in IIS
Posted by Ably+ at 5/13/2005 12:00:00 AM
Is possible to create virtual directories in IIS through code?
If yes, is there some example?
Thanks in advance.
... more >>
DataList - accessing <tr>
Posted by Dunc at 5/13/2005 12:00:00 AM
I have a data list control with 3 columns. I want every second *row* to
have a dfferent CSS class. Can someone tell me how to access the parent
tablerow, and add a cssclass? I'm guessing I'll need to put some code in
the itemcreated or itemdatabound?
Thanks in advance,
Duncan
---/ ... more >>
What is your weightage of the 3 characteristics of Object-Oriented Programming....
Posted by G.Ashok at 5/13/2005 12:00:00 AM
Hi All,
What is your weightage of the 3 characteristics of Object-Oriented
Programming
i.e. Inheritance, Encapsulation and Polymorphism. for a total of 100%
Please quote your values and let's discuss how the people thinking about OOP
:-)
Regards,
....@shok
-----------------------------... more >>
Events handling asking for comment
Posted by Zach at 5/13/2005 12:00:00 AM
Re the example I code below.
I have tried to make a very consise example
of events / eventshandling;
would you please comment?
(Don't tell me to read a book.)
Thanks,
Zach.
using System;
namespace EventsHandlingTest
{
public class TestClass
{
public class MakeEventArgs:EventA... more >>
Dump of C# app possible using ADPlus ?
Posted by Adam Benson at 5/13/2005 12:00:00 AM
Hi,
Apologies if this is the wrong newsgroup.
Is it possible to produce a dump of an app (say using ADPlus -hang -pn
app.exe) ?
I've installed all the symbols, used ADPlus on a simple .NET app to generate
a dump and then loaded the dump file into VS.NET.
And I just get gobbledegook. I can ... more >>
Passing reference to a Winform into DLL
Posted by Charlie NO[at]SPAM CBFC at 5/13/2005 12:00:00 AM
Hi:
My project has a seperate DLL for biz logic and an EXE for client app. I
would like to pass in a reference to a form in client app to DLL to capture
form element data for updating. In my DLL I have a reference to WinForms so
I can accept a form as a parameter. However, I must cast the f... more >>
Retrieving Network Card Serial #
Posted by glenn at 5/13/2005 12:00:00 AM
Can anyone point me to information that would help me to discover a
computers unique ID number for their network card?
Thanks,
glenn
... more >>
asyncronous method call
Posted by Allan Ebdrup at 5/13/2005 12:00:00 AM
I'm inside a function where I have a static cache, when the cache needs to
be updated I want to do it asyncronously, because updating the cache takes a
while. I want to use thread safety when writing and reading the cache (a
Mutex?)
Private Function Count(ByVal Guid)As Int32
Static Dim... more >>
Threads
Posted by WAkthar at 5/13/2005 12:00:00 AM
Can someone show me how to communicate between worker threads and the main
thread?
I have a client and server application that uses sockets to transmit xml
objects. Now I need to process these xml objects in the client application.
The client application uses a listen thread to listen in fo... more >>
Question about a System.Threading.Timer object and the "state" object you pass to it...
Posted by Paul Tomlinson at 5/13/2005 12:00:00 AM
Question about a System.Threading.Timer object and the "state" object you
pass to it...
Timer stateTimer = new Timer( = new TimerCallback( OnTimer ), o, 1000,
1000);
I have an array of timer objects which all fire into my OnTimer( object
state ) function very nicely. I pass in an object "o... more >>
|