all groups > c# > january 2005 > threads for thursday january 6
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
compact framework
Posted by jjs at 1/6/2005 11:15:01 PM
I have a compact framework project with a thread and a blocking function in
the thread.
How can I abort this thread? Thread.Abort() is not possible in compact
framework
Thanks
Jack
... more >>
How to access form controls from a UserControl Button
Posted by athlonman at 1/6/2005 9:43:59 PM
Hi all!!
II'm trying to set the Text of a TextBox in "Form1" when I click a
Button in a UserControl. My code is:
[Form1.cs]:
public class Form1 : System.Windows.Forms.Form
{
public System.Windows.Forms.TextBox textBox1;
private WindowsApplication1.UserControl1 userControl11;
{...}
}
... more >>
Control.Leave vs Control.LostFocus
Posted by vooose at 1/6/2005 9:34:00 PM
Does anyone know the difference between these two?
The doc for LostFocus says
'Occurs when the control loses focus.'
whereas for Leave it says
'Occurs when the input focus leaves the control'
The doc also states that for controls losing focus you should use Leave,
so I do. Another reaso... more >>
file paths and verbatim literals problem
Posted by CroDude at 1/6/2005 9:04:59 PM
Hi!
I have and issue with passing quoted path to a extern application via
Process.Start.
When I pass argument as:
@" -o c:\test.tif c:\_script.txt c:\test.jpg "
everything works fine but I have to pass paths in quotes ... it must look
like this:
-o "c:\test.tif " "c:\_script.txt" "c:\te... more >>
Using binary operators to compare byte[]s
Posted by NathanV at 1/6/2005 5:57:08 PM
I'm trying to compare two byte[]'s. I think I have to use binary operators.
How can I tell if two bytes have the same value?
Also, I have a function that is returning a byte[] value. Is there a way to
see if the return value isnt null.
Thanks!
... more >>
Automatic updating.
Posted by Trygve Lorentzen at 1/6/2005 5:37:50 PM
Hi,
I'm developing an app with automatic version checking and updating. It must
also track what version is installed for each customer in our customer
database. I have made a small client to fetch updated file(s) from the net
and copy over the old files. I figured this must be done since the p... more >>
Thanks all.... game now all seems fixed...
Posted by brianbasquille NO[at]SPAM gmail.com at 1/6/2005 5:17:31 PM
[EDIT: Sorry for posting this initially as a new thread but i'm
posting via Google (terribly buggy!) as my account for reading
NewsGroups doesn't support this particular C-Sharp newsgroup]
Just to let you all know, got the issues with the puck straddling the
the hit-line's (jerking).
The er... more >>
Starting a process with multiple arguments
Posted by CroDude at 1/6/2005 5:09:20 PM
Hi all!
Please help me with this, I'm stuck here.
I have a command line .exe file which needs a few arguments passed to do
it's job.
In help there's a example like this:
Process.Start("notepad.exe", "something.txt");
This is ok, but what if I must supply .exe with multiple arguments.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Code Performance Question
Posted by MattC at 1/6/2005 3:42:13 PM
Hi,
I have a collection class derived from ArrayList, it stores colletions of
objects from my objet model. I Didn't want to have to create a specialised
collection for each object type so I created the following static method.
public static MyCollection CreateGenericCollection(DataTable r... more >>
Executing SQL Server Stored Procedures using ODBC.NET
Posted by Stuart Ferguson at 1/6/2005 3:31:06 PM
I am currently writing code to execute SQL Server 2000 Stored procedured
using the ODBC.NET SQL Server Driver.
The particular stored procedure I am using has multiple paramaters which
I have created in my code (OdbcParamater objects), these are then being
added to the Command objects paramater... more >>
Proper class design
Posted by Peter at 1/6/2005 3:26:02 PM
Hi,
I have a question about good class design ....
In my class I have some properties related to large amount
of data.
What is the best strategy, to include a reference to those
data (and making the object dependent on the client) or
copy the data into the object (independent object) ?
... more >>
WndProc messages
Posted by UmmagummA at 1/6/2005 2:57:34 PM
Some time ago there was post with list of all windows messages for WndProc
procedure, but I was stupid enough to lose them :(
So if somebody could send this list (with codes) I will be veery happy.
Happy New Year to all!
... more >>
how to pass User and Pwrd with Sockets?
Posted by Ron at 1/6/2005 2:51:35 PM
Greetings,
below is a sample app for connecting to a mainframe server
using Sockets for the purpose of using FTP service to
interact with it from a PC. I got as far as creating the
connection. But how do I pass a username and password?
How can I change directories?
----------------... more >>
WMI - get single attribute
Posted by GC at 1/6/2005 2:38:53 PM
Hi,
All the examples of getting WMI information shows using a foreach loop to
loop though multiple entries, like to more than one IP address, etc. If I
just want to get the value for single value attributes, like "Manufacturer"
in SELECT * FROM Win32_ComputerSystem, how would I get that valu... more >>
DateTime manipulation
Posted by Patrick B at 1/6/2005 2:28:21 PM
Say I have three DateTime variables:
DateTime A;
DateTime B;
DateTime C;
How can I assign to C just the date part of A and just the time part of B?
Something like this...
C = A.Date + B.TimeOfDay;
Except that isn't it.... more >>
edit richtextbox with word
Posted by Ludovic SOEUR at 1/6/2005 2:28:21 PM
Suppose I have a .Net C# Winforms App with a RichTextBox control and I want
to provide an option for the user
to open the Rtf in Word, edit it in Word and get the edited value back to my
C# app dynamically (not with an external file).
Where should I start? Is there a document explaining this?... more >>
C#, ASP.NET and Flash
Posted by Chuck Bowling at 1/6/2005 2:28:00 PM
This may be a completely stupid question so bare with me...
I know some C# but I'm completely ignorant when it comes to ASP.NET. Can
someone tell me if it's possible to emulate the capabilities of Macromedia's
Flash MX using C# on an ASP.NET page?
My first guess is that it would at minimum... more >>
How can I use C# to get the object like stdPicture in vb6?
Posted by bin liu via DotNetMonster.com at 1/6/2005 1:53:22 PM
I want to create a object of stdPicture in C#, so that I can render it to other object's prosperity.
the VB6 code maybe as follow:
Dim pic as Picture;
pic = LoadPictureFile(strPath);
then, how can I use C# to express the same idea? I want to know what is "Picture" means in C#, and how ... more >>
AxWebBrowser without form
Posted by Mantorok at 1/6/2005 1:42:04 PM
Hi
Is there anyway to get a WebBrowser to work without placing it on a form.
I want to be able to instantiate a browser, complete some of the fields and
submit, but whenever I try to navigate I get:
An unhandled exception of type 'InvalidActiveXStateException' occurred in
axinterop.shdocv... more >>
web app page_unload
Posted by James Hawthorne at 1/6/2005 1:10:14 PM
Hi, I have created a asp.net web application and I hooked up page_unload so
I can clean up some things when i close it down.
The problem is, page_unload gets called when I first load the page, not when
I close it.
I know this because I put a breakpoint within the method, and it stops when
i ... more >>
Debugging hanging C# program
Posted by zfeld at 1/6/2005 12:22:55 PM
I have a multi-threaded C# program that hangs for 5-10 seconds
intermittently. Are there any built in tools in Visual Studio .NET to
somehow instrument my code to see where my performance problems are. It is
rough debugging it using breakpoints due to the multi-threading.
... more >>
Write a value in the serial port
Posted by Alberto at 1/6/2005 12:21:13 PM
Could you tell me how to write a integer value in the serial port?
Thank you
... more >>
Finding icons to illustrate winform buttons
Posted by Steph. at 1/6/2005 12:12:16 PM
Hi,
Does anybody know where I could find Icons for the 'standard' =
buttons used in winform ? Im' looking icons to illustrate button in my =
winform C# software like : print, preview, save, new file, align, =
fonts,..... =20
Thanks, any help appreciated,=20
Steph.... more >>
TimeSpan Question
Posted by james at 1/6/2005 11:57:35 AM
Is it possible given two TimeSpans to obtain the intersection of the two?
For example lets say I have span1 that spans Monday though Firday of this
week and span2 that spans all of Tuesday, then the intersection would be a
span of Tuesday. If they do not intersect at all then an empty span is... more >>
how to pass args to console app?
Posted by Ron at 1/6/2005 11:51:10 AM
Hello,
how do you pass args to a console app?
class TestApp
{
static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
TestApp testApp = new TestApp();
testApp.Start(args);
}
public void Start(string[] args)
{
...
)
}
Thanks,
Ron... more >>
Including other files in final build
Posted by Claire at 1/6/2005 11:43:01 AM
Hi, sorry I'm not sure if Im posting this to the correct group.
I need to include a couple of external applications to be copied to my
bin/debug folders at the same time as my solution is built. I'm not sure
if/how I can do this in vs .net 2003. These are older win 32 3rd party
applications... more >>
strange error!!!
Posted by ivang at 1/6/2005 11:38:43 AM
Hello, All!
When I call some web service method i get following error:
System.IO.FileNotFoundException: File or assembly name gvy6umsk.dll, or one
of its dependencies, was not found.
File name: "gvy6umsk.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Bo... more >>
Array of StringBuilder
Posted by Peter at 1/6/2005 11:37:20 AM
Hi,
A newbie question ..
I want to use an array of length 4 while each array element
is a string of 40 chars.
I typed ..
StringBuilder title = new StringBuilder(40)[4];
Now I suppose that title[0] is a string of 40 chars; same
for title[1], title[2], title[3].
VS .NET complains wit... more >>
C# syntax question...
Posted by craig at 1/6/2005 11:29:45 AM
I am using an ArrayList named "nodeRanks" of the following structs:
private struct NodeRank
{
public TreeNode Node;
public Int32 Rank;
}
I sort the nodeRanks ArrayList based upon the rank values, and then I would
like to replace the rank values with the ArrayList index values. H... more >>
how to get byte array from string?
Posted by MrNobody at 1/6/2005 11:23:02 AM
is there a quick way to convert string into byte array or do I have to
iterate through and convert each character into a byte?... more >>
ComboBox double click?
Posted by perspolis at 1/6/2005 11:17:59 AM
I hande a DoubleClick for a combobox.but that event dosen't fire..
I included a source with this message to see it what's wrong with this combo
box???
begin 666 test.zip
M4$L#! H``````(F()3(````````````````%````=&5S="]02P,$"@``````
MBH@E,@````````````````D```!T97-T+V)I;B]02P,$"@``````BH@E,@... more >>
C# - C Interop
Posted by Germic at 1/6/2005 11:15:21 AM
Hi,
I need to pass a reference to a string between a C and C# library.
I declare the string in C# function as ref String xyz and the corresponding
C code would refer to it as BSTR *xyzz. However i get an error as i feel the
string is not marshalled properly.
What is the correct way to do ... more >>
Table style??
Posted by perspolis at 1/6/2005 11:14:18 AM
hi
I have a fatagrid with 3 tableStyle
How can i make second TableStyle active to be showed in datagrid???
because alwayes the first tableStyle is showed in datagrid..
... more >>
How to Determine records updated/changed
Posted by Esteban404 at 1/6/2005 10:49:04 AM
I have a MS SQL2000 database from which I pull records for unattended kiosk
display. How can I test the active records to determine if they've changed or
have been added since the last time a dataset was created? I started building
a hash table to store the record id and last edit timestamp, b... more >>
References, Copy Local. Third party controls.
Posted by Claire at 1/6/2005 10:48:01 AM
In our application we've used several 3rd party windows form controls that
were installed into their own individual directories.
We have to avoid using the GAC, all our dlls should be found together in the
main application directory.
I'm just reading through the many projects and reference... more >>
Optimizing custom collection for access?
Posted by Mel at 1/6/2005 10:42:44 AM
I have a large collection of custom objects, each representing a period in
time with each having a start datetime and an end datetime. I frequently
need to query this collection to return a subset of the objects that fall
completely or partially between two specified dates. The way I'm doing t... more >>
small projects
Posted by Ilann at 1/6/2005 10:41:52 AM
Hi,
I'm looking for projetcs to develop to get ready to pass the mcad,
Thanks
Ilann
... more >>
Error trying to open web page using System.Diagnostics.Process.Start
Posted by wadefleming NO[at]SPAM yahoo.com at 1/6/2005 10:17:12 AM
I have the follwong code:
private void ButtonOpen_Click(object sender, System.EventArgs e)
{
System.Diagnostics.Process.Start("http://www.google.com");
}
which results in the following exception:
'An attempt was made to reference a token that does not exist '
What am I doing wrong? I'm ... more >>
Could not write the output file
Posted by Mihaly at 1/6/2005 9:47:08 AM
I have a solution with 4 C# projects (P1, P2, P3, P4). The P2 and P3
projects have a reference to P1 project and the P3 project has a reference to
P2 project too.
P1 and P2 are class libraries and their output path is bin\Debug. P3 is
class library and his output path is to local web, ... more >>
XPath query with namespace scope
Posted by Ricardo Quintanilla at 1/6/2005 9:37:03 AM
i got a xml file which is using a namespace declaration with no prefix, as
you can see here
----
<?xml version="1.0" encoding="utf-8"?>
<configuration
xmlns="http://www.microsoft.com/schema/EnterpriseInstrumentation/v1/EnterpriseInstrumentation.xsd">
<instrumentedApp name="SimpleInstrument... more >>
Refresh update, select, and insert command parameter lengths in a dataadapter...
Posted by Hyper X at 1/6/2005 9:28:59 AM
Hey guys,
I have this column 'ShipmentEmail'. Its 80 characters... So, all the
ins, upd, and sel commands have this parameter with length 80 chars.
The user says 'Bump the length of this field up dammit...', so I go and
change it to 255 in the DB. That goes fine without any incidents.
... more >>
character encoding
Posted by MrNobody at 1/6/2005 9:19:06 AM
is there any way in C# to determine a file's character encoding? I am trying
to modify a file but the original program is not liking it, and I think it's
due to character encoding. Reason why is I tried just copying the file
through my program (not modifying a single thing) and the program sti... more >>
Multiple conditions for DataView Filter
Posted by Joe at 1/6/2005 9:17:02 AM
Is it possible to create a DataVew from a DataSet using a filter to matvch on
both first and last name?
dv = new DataView(ds.Tables["MediaData"],"LastName=Jones,FirstName=
Fred","",DataViewRowState.CurrentRows);
I've extracted this info using a DataView:
dv = new DataView(ds.Tables["Media... more >>
I paid $109
Posted by andy at 1/6/2005 9:11:02 AM
why SharpDevelop has a free c# IDE has classLibrary project to choose from
and visual c# 2002 dont have one. ?
how do i make a dll in visual c# 2002 ?
... more >>
can an exchange email be triggered?
Posted by Jason Shohet at 1/6/2005 8:59:50 AM
I'm in a code-behind page of an aspx. And when the user hits a button, I
want our Exchange 2000 server to send a test email to someone in our
organization. Anyone have any code splices on how to do this? Or places to
look. (Also, we're not using Netbios). Might be more of an asp.net q, bu... more >>
best practices for code bits - performance
Posted by Picho at 1/6/2005 8:07:14 AM
Hi guys,
does any of you know of a resource that binds up all the little things we
should favour in terms of performance in c#?
for example...
building a string,
itterating (foreach vs. for)
etc
thanx,
Picho
... more >>
web services vs. remoting
Posted by Picho at 1/6/2005 7:59:48 AM
Hi group,
this issue has been brought up a few times now.
I am starting to design a client-server application.
I do not see any x-platform activity in the future of my application.
I understand from various people, articles and posts that remoting is highly
discouraged at this point and ... more >>
Delegate Invocation List contains COPIES of objects, NOT reference
Posted by N8 at 1/6/2005 7:47:06 AM
I am trying to get an exception to occur and consequently found that when
adding a target method to a delegates invocation list, a copy of that object
is added instead of a reference to the object.
Here's what I'm trying to do... I am iterating through the invocation list
invoking each dele... more >>
Casting a base class to a derived class
Posted by Mark McDonald at 1/6/2005 7:37:04 AM
This question kind of follows on from Mike Spass’ posting 10/11/2004; I don’t
understand why you can’t declare an implicit operator to convert a base class
to a derived class.
The text books say “neither the source nor the target types of a conversion
can be a base type of the other... more >>
obsolete TcpListener
Posted by Rob White at 1/6/2005 6:31:07 AM
OK, so I have a TcpListener that is waiting for sockets, this piece of code:
IPAddress localAddress = Dns.GetHostByName(Dns.GetHostName()).AddressList[0];
IPEndPoint localEP = new IPEndPoint(localAddress, 9000);
TcpListener tcpListen = new TcpListener(localEP);
tcpListen.Start();
Socket skt =... more >>
Binding a switch to an Enum at compile time?
Posted by Adam Blair at 1/6/2005 5:55:02 AM
Is it possible to bind a switch statement to an Enum such that a compile-time
error is raised if not all values within the Enum are handled in the switch
statement? I realise you can use default: to catch unhandled cases, but of
course this is only at run-time.
Example:
public enum MyEnum
... more >>
How to Merge 2 JPEG files into one file.
Posted by Imtiaz at 1/6/2005 4:35:02 AM
Hi,
I have two JPEG Images. Now I wanted to merge them into one image. I am
trying to use Image.SaveAdd to do this. But it is throwing an exception
"Invalid parameter used."
Following is the code:
Image mapImage = Image.FromFile (filename);
Image legendImage = Image.FromFile (filename2... more >>
XmlDocument - Write problems & How to Add Indentation!
Posted by Chua Wen Ching at 1/6/2005 3:03:05 AM
Hi there,
I have 2 questions to ask.
1) I have this code...
XmlDocument doc = new XmlDocument();
doc.Load(myXmlPath);
int maxValue = 0;
int newValue = 0;
XmlNodeList nodeList = doc.SelectNodes("//Product");
foreach (XmlNode node in nodeList)
maxValue = XmlConvert.ToInt32(nod... more >>
DataRowCollection.Find Method
Posted by Marc Pelletier at 1/6/2005 2:47:28 AM
Hello,
I am trying to use the find method to locate a particular record in a
table. The code is :
object[]findTheseVals = new object[2];
findTheseVals[0] = station_ID; // an integer
findTheseVals[1] = dt; // a datetime
DataRow foundRow = dsStationDays.Tables["StationDays"].Rows.Fi... more >>
databinding problem
Posted by Ondrej at 1/6/2005 2:09:01 AM
perhaps someone could help a newbie with his big problem.
i have an arraylist with objects (class i made with two properties).
and i'd like to bind it to a datagrid. there are 3 buttons on the
form which should works as add, edit and delete. the problem i have
is everytime i use these buttons,... more >>
What is the SQL syntax using in Excel?
Posted by yaya via DotNetMonster.com at 1/6/2005 12:10:04 AM
Hi, I'm using OldDB to connect excel in my Windows application with some SQL statement like
=====================================================
string strCom = " SELECT * FROM [Sheet1$] ";
=====================================================
If I wana use the UPDATE command to set a particul... more >>
|