all groups > c# > january 2007 > threads for thursday january 4
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
Application.Run and Windows Service (Multithreaded)
Posted by Jake K at 1/4/2007 11:31:55 PM
I have a multithreaded application that I now want to convert into a Windows
Service. Does application.run work in a windows service? Are there things
to take into consideration when creating a multithreaded windows service as
opposed to a multithreaded windows forms application?
E.G.
... more >>
Flagged, typed, enumerations?
Posted by Ian Boyd at 1/4/2007 11:22:04 PM
i want to have an enumeration that can also act as bit-flags, and have
values.
using System;
using System.Windows.Forms;
namespace MyProgram
{
class HelloEnumerations
{
[FlagsAttribute]
enum FlagColors : uint
{
Red = 0x01,
Green ... more >>
Specializing Generic Type (or Method)
Posted by abiz NO[at]SPAM onezero.org at 1/4/2007 11:07:34 PM
What is the current thinking about specializing generic C# types?
I've come across a situation where I'd like to do something like this:
struct X<T,U>
{
...
}
struct XCommonCase<T> = X<T,bool>
Even if this example used classes and not structs, inheritance wouldn't
quite be the righ... more >>
Calling win32 C++ dll from C#
Posted by FrancoisViljoen at 1/4/2007 10:14:00 PM
Hi there,
I need to make a call into an unmanaged DLL from a C# application, and I am
getting a SafeArrayTypeMismatchException which basically means that either
what I am sending to the DLL is incorrect, or what I am getting out is not
what the C# code expects.
My question is this: Ho... more >>
dice rolling problem
Posted by Jose Durazo at 1/4/2007 9:46:56 PM
Hello, I'm doing an exercise to simulate rolling a pair of dice 36,000
times, then count and display how many times the simulation rolls each
possible sum.
For some reason each time I run my simulation, one or more of my sums is
zero, which is highly unlikely. So I'm sure there's a bug in... more >>
How to convert UTF8 data to a ASCII data?
Posted by Hooyoo at 1/4/2007 8:01:20 PM
I read the content from a file encoded with UTF8 like this:
byte[] data = binaryReader.ReadBytes(file.Length);
And next step, I want to transform data to ASCII format, How can I do
this?
You know, Using Encoding.UTF8.GetString(data) can get a ASCII string,
but I need a byte[].
I hope you get... more >>
Which method is better
Posted by Andrea at 1/4/2007 7:34:09 PM
Which method is better to remove a char from a string?
A replace or a substring?
Considering that first char is at 0 position. Using reflector, replace let
lost its track in internal call, while substring show what it really does,
so I'm not able to evaluate the efficiency.
Any suggesti... more >>
Capturing External Events
Posted by andyblum NO[at]SPAM gmail.com at 1/4/2007 7:04:08 PM
How would capture an event such as a GOTFOCUS that happens in an
external applications window? Along the same lines, how can you senda
message such as click to a check box or a button in an external program?
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Documentation system
Posted by Smokey Grindle at 1/4/2007 4:09:30 PM
We are trying to find a system that would be good for a development team to
share documentation on our .net solutions throughout our company. Does
anyone know of any systems out there that are good for handleing information
such as lists of what's changed, whats being worked on, what documenta... more >>
SqlMoney for money/smallmoney
Posted by tshad at 1/4/2007 3:25:10 PM
I am trying to get some information from Sql Server 2000 in my VS 2003 C#
code.
For example:
if(dbReader["WSFilingStatus"] != DBNull.Value) wsFilingStatus =
(SqlMoney)dbReader["WSFilingStatus"];
This gives me an error that SqlMoney is not a valid type. But in some of
the docs it says... more >>
copy array to List
Posted by John Grandy at 1/4/2007 3:17:44 PM
What is the most performant way to copy an array's elements into a List ?
... more >>
help needed with asp.net pages
Posted by JohnAD at 1/4/2007 3:08:27 PM
Hello NG,
Maybe it is a wrong NG but posting here because I have got some great
replies from here.
I have inherited these web pages. One of the page has lots of stuff (mostly
calls to make that page look cool).
When I modify that page, somehow it is redirecting to default page. I have
... more >>
How to "overload" AND with &
Posted by Kim Stubberup at 1/4/2007 2:52:52 PM
I am making a script parser and I need to interpret the word AND and
"replace" it with an &, so that it can be compiled at runtime with the
C# compiler.
My script would read e.g: if( (iCounter1 < 20) AND (iCounter2 <
iCounter1) )
How can I make the compiler understand that AND means &?... more >>
How read file attributes from within C# app?
Posted by Ronald S. Cook at 1/4/2007 2:29:32 PM
I have files that contain text in the "Comments" attribute (like if you were
to right-click the file and then click properties etc).
How can I read these falues programatically from within my C# app? I'm
assuming System.IO will be needed but I'm not sure how to get at these types
of values... more >>
set autoscroll bounderies
Posted by alexia.bee NO[at]SPAM gmail.com at 1/4/2007 2:20:48 PM
Hi,
I need to ad autoscroll on my form. The problem is that i have controls
on the form which i don't
want to be scrolled.
Can i set auto scroll to be only in a specific x,y coordinates of my
form?
Meaning, I want to have 4 buttons on top of form and when autoscroll is
being fired, the to... more >>
Help, I am XML stupid
Posted by Gina_Marano at 1/4/2007 12:54:04 PM
Hey guys,
I am used to text files and such but thought I better get modern.
I want to store/read the following (example) in an xml file:
A list of DVDs each person has:
Amy
On Golden Pond
Harry Met Sally
Sleepless in Seattle
Sam
Cars
Poohs Adventure
Lisa
Speed
... more >>
ClickOnce app available online only a good thing?
Posted by Ronald S. Cook at 1/4/2007 12:50:12 PM
I have a Windows app that I will be deploying using ClickOnce. If I choose
to allow it to be used online and offline, it will create a Start menu item
and add it to add/remove programs. But, I don't really care about that.
Also, the client PC will have to be connected to the network in order... more >>
NetServerEnum for sqlExpress
Posted by j-in-uk at 1/4/2007 12:09:51 PM
I am using NetServerEnum to get a list of sqlserver databases in my c#
code. I notice it does not return sqlexpress databases. What can I use
to get a list of all sqlservers?
Thanks
... more >>
SQL Server 2005 Schema from C#
Posted by JPS at 1/4/2007 12:03:03 PM
I need to know how to connect to a SQL Server 2005 server, that
contains multiple databases.
I need to be able to read in the collection of Databases and get the
tables in each and the properties of each field in each table. I have
done this in VB6, but I cannot figure out how to do this in C#
... more >>
Commenting for document generator
Posted by Velvet at 1/4/2007 11:40:41 AM
I have been developing ASP.NET applications. In 1.1 I added a <remark> tag
for each class and inside it I added my modification history (HTML
formatted). With the built-in function that allowed me to build web docs
from my comments, this would appear in the generated documentation. This
w... more >>
Access Denied on folder after using DirectoryInfo.Delete(true)
Posted by Zeb at 1/4/2007 11:37:33 AM
Hi
I'm using DirectoryInfo.Delete so that when a product is removed, all
it's associated images (including the folder they sit in) are deleted.
This actually seems to work fine. However, the folder is not deleted,
but stays and becomes totally locked down. I can no longer open it in
Windows... more >>
Fixed Byte Array to String
Posted by O.B. at 1/4/2007 10:31:31 AM
In the example below, I'm trying to convert a fixed byte array to a
string. I get an error about needing to use "fixed" but I have no clue
where to apply it. Help?
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace Test... more >>
skmMenu and Breadcrumbs
Posted by empire5 at 1/4/2007 10:10:08 AM
It does not seem skmMenu supports a breadcrumb. I was thinking of using the
SiteMap class for the breadcrumb. Has anyone done anything like this? My
potential designs are:
1. Using menu.sitemap as the base layout and populating the skmMenu menuitem
collection programmatically.
2. Writing a co... more >>
No ASP.NET in express edition ?
Posted by Greg at 1/4/2007 9:55:33 AM
Is there no ASP.NET in C# express edition ?
... more >>
Calling C# dll from java applications
Posted by meetranjeesh NO[at]SPAM gmail.com at 1/4/2007 9:26:28 AM
Hi,
Anybody experimented calling C# components from java applications?
I'm facing problems with the same. Any clue's are most appreciated.
Thanks in advance.
Ranjeesh
... more >>
TreeView only showing root node
Posted by daz_oldham at 1/4/2007 9:06:21 AM
Hi everyone
Has anyone idea what would cause a TreeViewControl to show only the
root node if I am using a bog-standard .sitemap file?
Many thanks
Darren
... more >>
If C# is used for ecommerce..
Posted by Greg at 1/4/2007 8:55:00 AM
How can C# be used for a website ?
Would the person viewing a site need to have the .NET framework
installed ?
What other technologies would need to be used ?
Would a database server be needed for dynamic content ?
... more >>
How to make custom control act like container for other controls
Posted by rizwanahmed24 NO[at]SPAM gmail.com at 1/4/2007 8:54:01 AM
Hello
i have made a custom control. i have placed a panel on it. I want this
panel to behave just like the normal panel. The problem i was having is
that the panel on my custom control doesnt accept other controls. The
control i drag drop on it becomes the child of my custom control's
parent ... more >>
On which processor is a thread running?
Posted by Object01 at 1/4/2007 8:41:11 AM
Is there a way to determine which processor a thread is or was running
on at a specific point in time? I want to examine patterns in how the
thread scheduler assigns waiting threads to processors.
--
Jeff S.
... more >>
listbox focus
Posted by sf at 1/4/2007 8:36:25 AM
Hi,
searching this group and othher sources didn't found a match.
My problem:
Working with VS C#.Net 2003
I have a ListBox and like to retrieve the item which has the focus -
not the selected one.
In singleselection ListBox its mostly the same, thus the selection
follows the focus.
But in mu... more >>
main window deactivation
Posted by shark at 1/4/2007 8:30:41 AM
Hi
I have simple question. How to catch the event when my main application
window is being minimized or sent to background by another application (no
its own window)
Thanks
Shark
... more >>
Data Component, Data Layer
Posted by Matt at 1/4/2007 7:26:31 AM
I am developing couple intranet site. Cant decide what to use to get
the Data
I will be using Data Layer to get,update, insert, delete and report
type queries..
Most expensive table will have 1 mil records.. Just a couple of tables
will have that amount of data..
What would be affecient to u... more >>
Getting updated string from unmanaged DLL
Posted by CapCity at 1/4/2007 7:21:10 AM
We're rewritting an app using C# 2005 and it needs to read files in netCDF
format. A dll is available for this and we've had success in calling its
functions, unless it updates strings. We have tried several of the
suggestions we've found on-line: Strings, StringBuilders, IntPtr, etc., but
h... more >>
Menu Control Horizantal
Posted by Matt at 1/4/2007 7:17:48 AM
Is there a way to make menu controls behaviours like browser menu like.
(file,Edit,View etc) or any other software menu dropdown..
I could do that with inbuild (<items> <asp:menu:item> and make the
Orentation Horizantal etc)
I know i could do that providing my items and asp menuitems behind the
... more >>
problem with string.split
Posted by garyusenet NO[at]SPAM myway.com at 1/4/2007 6:57:15 AM
string[] lines = File.ReadAllLines(@"c:\text\history.txt");
foreach (string s in lines)
{
ArrayList results = new ArrayList();
string delimit = ";";
string[] currentline = s.Split(";");
MessageBox.Sh... more >>
web service
Posted by akotlyarovgroups NO[at]SPAM gmail.com at 1/4/2007 4:44:34 AM
Hello !
I want to ask You - do You know how i will develop the simple blog
service ?
Thanks
... more >>
Bulk data in windows form
Posted by satsreedhar NO[at]SPAM gmail.com at 1/4/2007 3:30:08 AM
I have a C# windos application. I want to show nearly 1 lakh invoice
numbers for multiple selection in a search screen. Can you give me a
best strategy ? Is it possible bulk data in a list box?
... more >>
how to convert a multiline textbox to a single line string?
Posted by garyusenet NO[at]SPAM myway.com at 1/4/2007 3:27:52 AM
I have a multi line text box, i'd like to store the contents of this
textbox to a text file. However when I write the value of '
textbox.text ' to the file it is written verbatim spanning many lines
if enter has been pressed.
I'd like to store the value of the textbox on one single line in th... more >>
Stopping application crashing when there is an unhandled exception
Posted by joseph_gallagher NO[at]SPAM hotmail.com at 1/4/2007 3:27:48 AM
Hi,
I've recently ported a .Net 1.1 application to .Net 2.0 and the one new
feature that is getting on my nerves is that when there is an unhandled
exception the application completely crashes, causing user to loose all
the work they have done where they could previously just click continue
a... more >>
Multline TextBox question
Posted by garyusenet NO[at]SPAM myway.com at 1/4/2007 2:13:03 AM
I have a multiline textbox.
The size of the text box should be 75 characters wide, and 5 lines in
height like this: -
<---75 characters-->
<---75 characters-->
<---75 characters-->
<---75 characters-->
<---75 characters-->
I have used maxlength to limit the characters to 375 (75 X 5).
... more >>
problem of memory management
Posted by prabhat tiwari at 1/4/2007 2:05:21 AM
what can be the good way to provide memory management in web based project.... more >>
problem of datareader
Posted by prabhat tiwari at 1/4/2007 1:43:37 AM
as sqldatareader is a class so why we can not create object of that class directly using new keyword.... more >>
|