all groups > c# > august 2004 > threads for thursday august 12
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
WebServices from WindowsForms ?
Posted by Toma MArinov at 8/12/2004 11:07:16 PM
Hello !
First excuse me for my not very well English !
My question is : Can I use WebServices from WindowsForms
Application ? Application will run in LAN and WebServices
will be on the local server...
If I can do this - can you tell me some guide-lines ?
Thank you !
... more >>
How to check if "undefined value" ??
Posted by msull NO[at]SPAM nortel.com at 8/12/2004 8:16:14 PM
When I trace through a csharp program I came to a situation where a certain values
has an "undefined value" as shown in the debugger DbgClr.
I want to check this but the following statements did not recognize this "non"-value
if (type.Particle != Undefined.Value) { ....
or
if (type.Part... more >>
Sorting a dropdown list
Posted by Morten at 8/12/2004 8:02:29 PM
Hi!
I've created a webform with a dropdown to which I've added some static
items. I'm adding some extra items in my code. I'd like to sort the items
after I've finished adding my new items. Can someone provide an example of
how to do this?
Thanks in advance for your help.
Morten
... more >>
[Newbie] What are ASP.NET and ADO.NET ?
Posted by Flix at 8/12/2004 7:21:14 PM
I've been making programs in c# from a few month, but I still don't fully
understand what are ASP.NET and ADO.NET.
I know that they run on the framework, that ASP.NET is necessary to build
Web Applications and ADO.NET deals with databases, but I would like to know
something more about them.
... more >>
Access Network Share
Posted by HK guy at 8/12/2004 6:55:02 PM
If I don't want to map the drive, can I access the network share by a given
login and password.
Thank you.... more >>
When to use ToString() and when not to
Posted by Michael at 8/12/2004 6:20:28 PM
Hi,
If I have code like
int i = 10;
string s = "Number is " + i.ToString();
FxCop wants me to put an IFormatProvider to ToString().
If I have:
int i = 10;
string s = "Number is " + i;
What is going on there? ToString() must be called implicitly, right? So what
IFormatProvider is bei... more >>
sub class construtor, super class not holding value
Posted by Martin at 8/12/2004 5:52:08 PM
Hi,
I've got a base/super class with just a default constructor. I want another
constructor, but I can't modify the base class, so I created a sub class
with a constructor like so:
public class MySub:MyBase
{
public MySub(string val):base()
{
base.public1="String";
... more >>
what is the difference between FCL and BCL?
Posted by Ivan G. at 8/12/2004 5:42:28 PM
what is the difference between FCL and BCL?
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
A general question about SQL statement
Posted by Michael at 8/12/2004 5:10:13 PM
Hi all,
I would like to get people's opinion about executing SQL statements in C#
(or any other .NET language really). I used to create my SQL statement by
building a string and replacing single quote with two single quotes.
Sometimes, I used SqlParameter. Maybe, I'm a bit lazy when I build th... more >>
Books or Periodicals for latest in .Net?
Posted by Akhil at 8/12/2004 4:57:06 PM
Hi,
What books or periodicals to follow to keep abreast with latest in .Net.
Apologies for throwing a non-tech stuff.
Cheers,
Akhil
... more >>
Multi-threaded app and Thread Safety.
Posted by Robert May at 8/12/2004 3:54:14 PM
I have a windows service that spawns multiple threads running a thing that
does a bunch of processing. Here's the code that spawns the threads:
m_totalThreads=Convert.ToInt32(Settings.GetSetting("ProcessorThreads"));
m_executingThreads=new Thread[m_totalThreads];
for (int i=0;i < m_totalT... more >>
free database server for desktop application with ado.net driver
Posted by Luminal at 8/12/2004 3:49:07 PM
greetings
I need to develop an aplication that needs a database. The application
is small and the use of SQL Server is not a choice. Can anyone give me
hists about *free* database engines with ado.net support?
TIA
Lum... more >>
Problem accessing assembly from Windows Service
Posted by Jim Cooper at 8/12/2004 3:40:48 PM
I've written a Windows service which uses some code I want to share with
a WinForms app. The code works fine if it is included in the service
project. If I move the code into a new project in the solution, then the
service fails as soon as the method that uses the new assembly is
entered. The ... more >>
help with a multithreaded design
Posted by ScottAR at 8/12/2004 3:35:01 PM
I'm writing simulator to help with testing out problems with deadlocking on a
database.
I have a function which I call from a delegate BeginInvoke call, and
depending on the simulation I might have from three to 20 threads running.
here's the function...
void DoTest()
{
for(int jj=0... more >>
Can DotNet Framework 1.1 and 2.0 Beta 1 coexist at the same time on the same system?
Posted by george.dainis NO[at]SPAM bluecorner.com at 8/12/2004 3:19:27 PM
Is it possible to install DotNet Framework 1.1 and the newest 2.0 beta 1 together on the same system?
Depending on which Framework I would like to use for the next command line compilation I would
prepend the valid environment directory (e.g. C:\WINNT\Microsoft.NET\Framework\v1.1.4322;)
to the ... more >>
Newbie: Can a C++ project be an assembly DLL?
Posted by Cindy Lee at 8/12/2004 3:06:02 PM
I basically have 3 .cpp files and 3 .h files, in a visual studio project.
Is there anyway to compile this into an assembly?
Or do I have to write a wrapper in C#?
Or do I convert to code to C#?
the files are not that large and have functions like:
void CBlowFish::Decrypt(SBlock& block)
wha... more >>
UTF8 encoding, calculating space that string will take up in a file
Posted by Claire at 8/12/2004 2:49:08 PM
Is there an easy way to calculate the number of bytes that a UTF8 encoded
string will occupy within a file in advance of writing?
I am writing records to a complex file. These records contain variable
length strings and I need to be able to work out in advance whether to
overwrite the old rec... more >>
Changing file properties
Posted by Gilgamesh at 8/12/2004 2:29:17 PM
Using C#, I need to change the summary and description of a file. These are
the properties that are visible in Windows explorer when the user right
clicks on the file an choose properties tab. How can this be done in C#?
--
Thanks,
Gilgamesh
... more >>
WebBrowser Control - Setting the UserAgent???
Posted by Tyrone Bloombaumbergenthal at 8/12/2004 2:20:46 PM
I am writing a win form application in C#, I want to be able to retrieve web
pages using different useragent strings and render the results in a web
browser to see how my app responds to different browsers. I can retrieve
the page and render the results fine. The problem I am having is changing... more >>
Tricky problem with event handling
Posted by Tim Gallivan at 8/12/2004 2:20:12 PM
Hi group,
I'm having a strange problem with event handling. My project has a form with
a textbox that creates 25 instances of class A when a button is clicked.
Class A raises the event without error, I have proved this by having it use
a streamwriter to create and write to a simple text file a... more >>
What means this error: CS0246: The type or namespace name 'xxxx' could not be found
Posted by deangelo2 NO[at]SPAM nortel.com at 8/12/2004 2:12:54 PM
When I try to compile a source code which should normally run I got this error message
error CS0246: The type or namespace name 'XmlSchemaSet' could not be found (are you missing a
using directive or an assembly reference
Platform SDK 1.1 is successfuly installed (under Win2000... more >>
Windows Service crashing upon starting
Posted by Razzie at 8/12/2004 2:10:16 PM
Hey all,
I wrote a Windows Service. When I test it on my developement machine (winXP)
it works fine. It starts ok, never crashes, etc.
When I install the service on another machine (win2000) it *sometimes*
crashes upon starting. The progressbar you get when you manually start the
server wi... more >>
Calling Excel Macros
Posted by TommyBoy at 8/12/2004 2:00:25 PM
i'm trying to call an excel macro from C#, but i have never done it
before, and advice? can you pass an argument to a macro.. if so how?
Thanks in advance... more >>
Internal constructor "visible" outside of assembly. Compiler bug?
Posted by Martin Oddman at 8/12/2004 1:41:42 PM
Hi,
I have a compiling problem. Please take a look at the code below.
I have an application that is built upon three tiers: one data tier
(Foo.DataManager), one business tier (Foo.Kernel) and one web
presentation tier (Foo.WebFiles). The data tier shall only be
accessible thru the business ti... more >>
Sorting?
Posted by Akhil at 8/12/2004 1:37:26 PM
Does .Net use quick sort or bubble sort for Sorting???
Cheers,
Akhil
... more >>
Has anyone typed up an index for the O'Reilly book "C# and VB.NET Conversion?"
Posted by Dgates at 8/12/2004 1:20:52 PM
Has anyone typed up an index for the O'Reilly book "C# and VB.NET
Conversion?"
I'm just learning C#, and often using this little book to see which
VB.NET terms translate directly to some term in C#. However, it's a
real hassle that the book has no index, just a table of contents.
For exa... more >>
Open a site in Internet Explorer
Posted by David at 8/12/2004 12:33:08 PM
Hello.
Can anybody tell me do I open any web page from my code in Internet
Explorer?
Or how can I just run any program from my code?
... more >>
power point style textbox
Posted by VJ at 8/12/2004 12:18:29 PM
How do I create power point style text box
Thanks
Vijay
... more >>
What do you believe? C# plugins in a c++ program
Posted by Max Gattringer at 8/12/2004 12:16:25 PM
What do you believe? Is it possible to program a c# plugin(dll) and use it
with a c++ (native) program, without having the sourcecode
... more >>
something about Unicode
Posted by Jet Leung at 8/12/2004 12:11:13 PM
Hi all,
If I read a file by StreamReader and Encoding is Unicode, than all the
contant read from the file will be change into Unicode string . And how can
I make this Unicode string return the real text of that file?
... more >>
Creating a browser in a Windows application
Posted by Ann Marinas at 8/12/2004 11:36:38 AM
Hi, all!
Is there a control that can view html pages in a windows application?
Thanks!
--A
... more >>
windows service problem
Posted by Ivan G. at 8/12/2004 11:34:25 AM
I'm trying to install windows service with created for it user account with
debugging previledges. But following error occurs:
An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: No mapping between account names and
secur
ity IDs was done.
User account is ... more >>
DataTable!!!
Posted by Vai2000 at 8/12/2004 11:14:33 AM
Hi All, Is there a way by which I can autopad contents of a DataTable. For
e.g I have created a data table with data columns of fixed length. When I
insert data into these columns I automatically want to pad them (left/right)
with 'X' if they are less than the max length.
Do I have to do with ma... more >>
Get data directly from DataGrid
Posted by _A at 8/12/2004 10:57:35 AM
I'd like to retrieve items directly from a DataGrid rather than from the
source (data table). The goal is to retrieve a field in the Datagrid's
current sort order.
Is there an easy way to do this?
... more >>
Hashtable question
Posted by MFRASER at 8/12/2004 10:55:12 AM
I am trying to create a collection object that contains an internal
hashtable to help in retrieving data, but what I have relized is that I am
adding the object multiple times is there a way to add a key that points to
the reference of the object or do I not understand the hashtable?
Here is ... more >>
EM_STREAMOUT
Posted by mork at 8/12/2004 10:39:38 AM
I'm having a tought time wrapping ym head around implementing EM_STRAMOUT
It requires a callback function which is repeadely called and passed a
buffer which is a portion of the richedit's complete contents.
However, the message itself is supposed to send a structure (which
contains the ca... more >>
ReadXML - Threading - Static Classes - Progress Indicators
Posted by James Morton at 8/12/2004 10:04:38 AM
I have a Static DataSet in a class file that I am using globally between a
few forms. The main form populates the dataset through a menu option which
invokes ReadXML in the class file to populate the DataSet. The ReadXML is a
rather lengthy operation with >5mb xml files (I am reading in the schem... more >>
foreach issue
Posted by Jay at 8/12/2004 9:29:33 AM
When doing a foreach statement like the following why is the variable
read-only?
foreach (e in theArray)
What if I have an array of objects and I need to create a new instance of
the object. If the e is read-only then I have to use a for statement to
accomplish this.
... more >>
Transactions???
Posted by Akhil at 8/12/2004 9:21:50 AM
What is the philosophy of putting transaction code in the middle tier vs DB
stored proc?
... more >>
What datatype to use for Currency?
Posted by Akhil at 8/12/2004 9:21:28 AM
For currency, which datatype do we need to use?
... more >>
How to reseed a primary key??
Posted by Akhil at 8/12/2004 9:18:34 AM
Hi,
How would you do this in C#.
How would you regenerate (reseed??) a primary key in a table?
and
What is the difference between primary key and unique key?
Regards,
Akhil
... more >>
Can Crystal Reports be scheduled or dynamicaly generated from .NET?
Posted by nipper1999 NO[at]SPAM aol.com at 8/12/2004 9:15:23 AM
I know there is some Crystal Reports functionality in .NET but I was
wondering if it was possible to actually schedule Crystal Reports
dynamically using csharp code and/or generate reports dynamically by
pulling parameters from the database. I am not that familiar with
Crystal but we have 3 repo... more >>
Hashtable: setting a value?
Posted by BCM at 8/12/2004 8:46:39 AM
How do you reset a value for an existing key in a hashtable? I need to
create a collection and compare the values with another collection: when
certain parameters are met then I need to reset the value of certain
elelments in the first collection.
I would have thought that the Hashtable.Ite... more >>
Binding a custom class to a DataGrid
Posted by grayinnes NO[at]SPAM hotmail.com at 8/12/2004 8:31:10 AM
Hi Everybody, its about my 4th day on C# and all seems to be going
smoothly however I've started to get into Datagrids and in particular
binding data sources to them. In the documentation it says I can bind
all the usual Datasets etc but it also says I can bind the following:
Any component tha... more >>
RegEx.Replace match optional
Posted by kids_pro at 8/12/2004 8:23:57 AM
Hi there,
Could someone help me out from this situation?
I want to write a pattern to search and replace.
string pat = "e([\u1780-\u17A2]\u17D2[\u1780-\u17A2])a";
string result = Regex.Replace(instr, pat, "$1\u17CE");
What I want is to make this part \u17D2[\u1780-\u17A2] as optional.
I ... more >>
Progress on Windows Form
Posted by Folke at 8/12/2004 8:23:16 AM
I'm doing a lengthy operation and would like to
update a textbox while working, but the tb gets updated
AFTER the operation is finished!
code:
foreach (PDEHeaderItem pi in _pdeHandler._pa)
{
txtInfile.Text += "X";
txtInfile.Invalidate();
txtInfile.Update();
...
... more >>
C# enum members at runtime
Posted by Ken Allen at 8/12/2004 8:13:27 AM
I have a need to convert the names of the members of an enumeration into an
array of strings at runtime.
I have determined a method using reflection.
Type theType = typeof(MyEnumName);
MemberInfo[] theMembers = theType.getMembers();
foreach (MemberInfo entry in ... more >>
Hex to string
Posted by Senna at 8/12/2004 5:37:03 AM
Hi,
Have a symmetric encryption method that returns a base64 string. I then get
the hex representation of that string with the code below
public static string Base64ToHex(string input)
{
StringBuilder sb = new StringBuilder();
byte[] inputBytes = Encoding.UTF8.GetBytes(input);
... more >>
Menu control
Posted by James Kilner at 8/12/2004 2:49:01 AM
Does the default menu control have any styles/properties which can be set to
make menus look like the new style menus (as can be seen in the .Net MSDN
library)?
Failing that, is there a different menu control which does look like these
new style menus?... more >>
Regarding Marshaling Data Structure and IntPtr!
Posted by Chua Wen Ching at 8/12/2004 2:27:02 AM
I saw this article here:
http://www.arstdesign.com/articles/interopmarshaling.html
But i had some problems doing this.
Codes:
/* C Structure
typdef struct {
int avalue;
int bvalue;
unsigned char cvalue[10];
} TestA;
*/
// C# Structure
[StructLayout(LayoutKind.Sequ... more >>
Re: windows service problem
Posted by Shell at 8/12/2004 2:13:51 AM
Please verify that:
1) You are specifying user name in full: DOMAIN\username.
2) You are part of the 'Administrators' or 'Power Users' group.
3) The password you are supplying is correct.
I have seen this error come up only when the password I provide is
incorrect.
Hope that helps.
... more >>
Re: Multi-Threaded Splash Screen not displaying first update.
Posted by Shell at 8/12/2004 2:08:51 AM
Stuart,
I have tried your code and figured out exactly what's going wrong. It's
a very subtle threading issue.
You see, in your form startup code, you make a call to
statusInformationScreen.Show();
This method starts a thread which executes the following code:
private static void ShowT... more >>
when to use StringBuilder
Posted by Mike P at 8/12/2004 1:52:16 AM
I read somewhere that if you are concatenating more than 2 or 3 strings
you should use StringBuilder as it will use up less resources. Does
this apply when you are building up a string (for example an SQL query
or some XML)?
This is an example of some of my current code :
strReturnedXML = ... more >>
GDI question
Posted by test NO[at]SPAM example.com at 8/12/2004 1:36:26 AM
Suppose I have a program in C# that has the ability to save images of say a
room.
Suppose I have a series of these images taken over a period of maybe an
hour.
How do I detect (apart from using my eyes) which one of these images is
different - ie; someone has walked into the room?
Is the... more >>
Datatables in Datasets no accessible
Posted by Ben at 8/12/2004 1:32:16 AM
Hi,
This is a problem that I've been having for a while now. Basically, I've
created a XML Schema in the designer, created a dataset based on this
schema, and now when i try to access some of the tables within the
dataset, it doesn't enumerate any of the properties, and they aren't
access... more >>
Remoting
Posted by Patty O'Dors at 8/12/2004 1:27:01 AM
Hi
I posted a similar question like this to a reply to another thread but it
wasn't really relevant to that thread and I don't think anybody read it so
I'm posting a new one.
I'm trying to think of a use for remoting in the workplace, but can't. I
want to look cool by "running commands ove... more >>
|