all groups > c# > march 2005
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
Fast way for extracting tokens from a string.
Posted by Jensen bredal at 3/31/2005 9:36:56 PM
Hello,
I have a string formated in the following way:
s = 1;32;100;32;09;.........;09;76;
I need to extract the numbers separated by the seicolon.
The list can contain several thousands of items and the code is
time critical.
How can i best extract them in C#.
Many Thanks in advance... more >>
Windows Form and Windows Form User Control - Where Is The Method That Would corresspond To A Web Form Pre_Render Method
Posted by Richard at 3/31/2005 8:33:56 PM
Hello
MyMainWebPage.aspx contains MyUserControl.ascx
MyUserControl.ascx has a DataTable Property MyDataTable
MyUserControl.ascx has a DataGrid which whose datasource is MyDataTable (or
technically it's private accessor but that I don't think is an issue here)
MyMainWebPa... more >>
ask if a class inherits from another
Posted by Rodolfo at 3/31/2005 7:08:59 PM
I need to do something like this
public class a : b{
....
}
....
a objecta = new a();
if (objecta "inheritsfrom" b)
do something;
There's a reserved word to do that?
TIA
... more >>
DatetTimePicker
Posted by web1110 at 3/31/2005 7:04:57 PM
Hi y'all,
When displaying a DateTimePicker control, opening the control provides a
calendar from which to select a date. How do I specify a time?
Thanx,
Bill
... more >>
urgent !!!! problem updating data set
Posted by NicK chlam via DotNetMonster.com at 3/31/2005 6:59:47 PM
i haveing a problem updating my data set i get an error saying
An unhandled exception of type 'System.ArgumentNullException'
occurred in system.data.dll
Additional information: Value cannot be null.
//***********************************************************
//Student Name: Nicholas Chl... more >>
Empty message queue
Posted by Daniel Rimmelzwaan at 3/31/2005 6:16:16 PM
Does anyone know how I can determine if a message queue has any messages in
it?
... more >>
Obfuscation / code protection in .NET 2.0
Posted by Paul Aspinall at 3/31/2005 6:15:02 PM
Hi
Does anyone know if there are to be any improvements in Obfuscation / code
protection in .NET 2.0??
Will there be a better 'bundled' obfuscator??
I don't want to buy an obfuscator now, only to find I didn't need it, when
2.0 is released... for whatever reason.
Thanks
Paul
... more >>
adding local varialbes - String?
Posted by Patrick Olurotimi Ige at 3/31/2005 5:45:42 PM
I have a DataTable:-
private void CreateForm(DataTable dt, string headerText)
{
}
string formTitle = tbxFormTitle.Text;
string formNotes = tbxFormnotes.Text;
DataTable dtForm = GetDataTable(formSql);
And i'm calling 2 local variable
dtForm,formTitle
Like so
CreateForm(dtForm,formTit... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Click - open in IEbrowser
Posted by RajS at 3/31/2005 5:07:39 PM
Hi All,
In clicked event on a grid column(value is a url link), I am trying to open
an IE browser.
Can any one direct me to an example?
Thanks,
-RajS
... more >>
how to load strings from resource?
Posted by Phil Da Lick! at 3/31/2005 4:38:08 PM
Hi,
How do I load string out of the resources included with the assembly? Or
even better from another assembly? I'm trying to internationalize my app.
As I see it theres two ways - have a global language assembly that is
dynamically loaded on startup and supply multiple language versions o... more >>
I opened an image and want to change its size, then display it in a ImageBox.
Posted by cyshao at 3/31/2005 4:09:20 PM
I opened an image and want to change its size, then display it in a
ImageBox.
How can I do that ?
Thanks
Charles Shao
... more >>
using /unsafe
Posted by Z at 3/31/2005 4:07:02 PM
Hello,
In my C# program I have a function that uses pointers. Is there a way to
tell the compiler to compile only this function with the unsafe switch and
compile the remaining project as safe code?
I enclosed the body of the function in unsafe block like this:
public static void Foo()
{... more >>
Interop - EnumPrintProcessors
Posted by Keith M at 3/31/2005 4:01:48 PM
Could some kind soul illustrate how I can call the EnumPrintProcessors Win32
API from c# code?
BOOL EnumPrintProcessors(
LPTSTR pName, // print server name
LPTSTR pEnvironment, // environment name
DWORD Level, // information level
LPBYTE pPrintP... more >>
FindWindow, RegisterWindowMessage, SendMessage
Posted by Tony at 3/31/2005 2:41:06 PM
I need to send a message to a window in another application. The name of the
window is known at design time and set in the constant App2_MONITOR_CAPTION.
The message is defined as X_GenerateEvent.
The following VB6 code works. I assume this is possible in C#. How do you do
it?
Private ... more >>
Info reg System Process
Posted by Manoj Nair at 3/31/2005 2:35:06 PM
Hi,
In our application our processing starts as the soon as the user logs in .
Here we need to retrieve info reg the system.
But the way windows boots up the system processes take up some time to load
all info .For ex immediately after the desktop appears if we open up the
properties of 'My Com... more >>
Data not going into Excel from Form button - Do I need a thread
Posted by JM at 3/31/2005 2:19:01 PM
Hi
I have created a Windows Form that takes input. When the Run button is
pressed the form is disabled and the code checks some files and inputs the
data into an Excel worksheet (that is hidden so that I cannot watch as it
gets filled up). When it is done it saves the Excel file.
I fin... more >>
how can I convert (char)02 into UTF8 string
Posted by Daniel Rimmelzwaan at 3/31/2005 2:14:26 PM
Does anyone know how to convert a (char)02 into a UTF8 string that I can put
into an XML element? I've tried all examples that I could find in Visual
Studio help or in google, but I can't get it to work. The one that gives me
the answer will just make my day :).
Thanks,
Daniel.
... more >>
How to access all the pixels of a bitmap with C#?
Posted by Ma Xiaoguang at 3/31/2005 2:00:56 PM
Dear ladies and gentlemen:
How to access all the pixels of a bitmap with C#? I am working with
Delphi before. In Delphi, you can use TBitmap.Scanline property to access
all the pixels of a bitmap object. How to do this with C#? Any hints? Thank
you very much.
Best regards.
Xi... more >>
User Privileges
Posted by Feldman Alex at 3/31/2005 1:59:41 PM
Hi all,
I need to know the user privileges (does user have administrator privileges)
..
Which c# api's should i use?
Thanks a lot
... more >>
Installing VB6 after VS.NET 2003 installation
Posted by Frank Rizzo at 3/31/2005 1:37:04 PM
Hello,
I have vs.net 2003 installed on my primary dev machine, but now I have
to do some work on a vb6 project. Is it safe to install Vb6 on top of
vs.net 2003?
Thanks
Robert... more >>
override virtual, covariant return type
Posted by David Sobey at 3/31/2005 1:27:58 PM
Hi everyone
I'm having huge difficulties overriding or hiding a base function with a
function
that returns a covariant type. I'd be grateful if someone could show me some
code where this is done:
- A class BaseClass is declared with a function me() that takes no arguments
and returns itself... more >>
Event identification
Posted by web1110 at 3/31/2005 1:24:52 PM
Hi y'all,
I posted this as an add on to another post so I thought I'd repost it here.
How do I identify an event programmatically?
Is it necessary to do a
if(e.message=="<Event description>" ) ...
to identify the particular event?
Thanx,
Bill
... more >>
Simple IDE Question ! - How will I clear the "Marks" ?
Posted by msnews.microsoft.com at 3/31/2005 1:09:30 PM
Hello All,
In the "Find Dialog" (Ctrl-F) of the IDE there is an option called "Mark
All".
When I click "Mark All", this marks the occurences of my search text.
How will I clear this mark?
Thanks for your time.
Regards
Anand Ganesh
... more >>
@ sign?
Posted by Ben R. at 3/31/2005 1:03:02 PM
I saw the following line of sourcecode:
string input = @"the quick brown fox jumped over the lazy dog";
What is the purpose of the '@' above? I tried running with and without and
get seemingly same results. Anyone know?... more >>
How to end a Socket.BeginAccept call
Posted by Joachim at 3/31/2005 12:55:01 PM
When closing down my server I get the following exception
An unhandled exception of type 'System.InvalidOperationException' occurred
in system.dll
Additional information: AcceptCallback
I beleive that it is the asynchronous BeginAccept call which causes the
problem. How can I avoid th... more >>
override virtual, covariant return type
Posted by Cor Ligthert at 3/31/2005 12:19:56 PM
Time correction for OE and other newsreaders
For who is interested. It seems that David likes answers in future he seems
to be a notorious newsgroup topposter (don't confuse this with mail
topposting)
Cor
... more >>
COM interop help
Posted by edmitchell at 3/31/2005 11:52:27 AM
I'm getting an error when I pass "User" in "report.HasBeenAccesedBy(ref
User,ref UserN);" I have created the iL to see if there is something
incorrect.
..method public hidebysig newslot abstract virtual
instance bool HasBeenAccesedBy([in][out] class LDD.User&
marshal( interface) ... more >>
Threads Question
Posted by Bruce C. Miller at 3/31/2005 11:41:43 AM
This might be an easy one (just starting to learn C# here), but I'm
overlooking it for some reason...
namespace test2
{
public class Form1 : System.Windows.Forms.Form
{
public Graphics g;
private Thread t1;
// some other code
private void Form_Paint(object sender,
... more >>
System.ComponentModel.Win32Exception: The operation was canceled by the user System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPrint
Posted by shan_chennai at 3/31/2005 11:37:34 AM
I have a print component that opens up a printpreviewdialog and paints
all the controls.
Now when i click the Print, after setting Microsoft Office Document
Image Writer as default printer, the Save As dialog for saving the mdi
file is opened. When i click on save, there is no problem. But whe... more >>
Hiding inherited classes
Posted by Dan at 3/31/2005 11:27:14 AM
I have a need to make a set of classes that all share the same public
methods, some implementation and some data. So, I made an abstract
base (BaseClass) with an interface (IBaseClass) and a handful of
inherited classes. The static method calls the ctor of the appropriate
inherited class and r... more >>
Create a ContextMenu
Posted by Fritz Switzer at 3/31/2005 11:07:09 AM
I have a two part question.
I would like to provide a run-time feature that would duplicate the
design-time capability to create a Context Menu. This would be where the
user could create their own ContextMenus. I would like to save this Menu
structure as either XML or a text file using C#... more >>
Generics and base constraint ?
Posted by Bernhard Huemer at 3/31/2005 11:00:49 AM
using System;
using System.Collections.Generic;
public class CovariantList<T> : List<T>
{
// ...
// of course this constraint won't work ..
public CovariantList<U> Convert<U>() where U: base T {
CovariantList<U> list =
new CovariantListList<U>(... more >>
Dotfuscator and reflect methods
Posted by Alan Mok at 3/31/2005 10:47:04 AM
Hi All,
I am a newbie to dotfuscator. I am trying to dotfuscate my application.
Everything seems ok except that when I try to run a method that has the
following command
poMsgObj.GetType()).GetMethod(psAfterMsg).Invoke(poMsgObj,new string []
{asSelectedValue};
I got an error sayin... more >>
How to get some specific parts of the result from Dos window?
Posted by Eunice at 3/31/2005 10:35:02 AM
After running a Dos analysis program, the result composes of randomly several
lines.
I want to catch just some specific parts of the result, not all, in the Dos
window. And then display the specific parts in a message box.
If it is possible, how can I code for this?
For example, I want to ... more >>
How to set DateTimePicker only edit time ?
Posted by cyshao at 3/31/2005 10:18:37 AM
How to set DateTimePicker only edit time ?
There is a DateTimePicker whoes Format = Time.
I find it only displys as time edit, but in fact, this control still control
Full DateTime when you click the button.
I mean if I enter 08:12:00, I want to get 08:12:00 only, not 1998-12-01
08:12:00.... more >>
Control initialisation
Posted by Barguast at 3/31/2005 10:07:02 AM
I'm not sure what to make of this problem, but hopefully it's fixable. I have
created a 'Table' control which is basically just a grid of text boxes.
However, whenever the control is initialised it is done so in the wrong order:
this.table1.Columns = 3;
this.table1.DefaultColumnWidth = 96;
... more >>
Retrieving data from Excel cells
Posted by Chris Bellini at 3/31/2005 9:51:09 AM
Greetings! I'm developing a C# application that needs to read some data
from a selected XLS file. I've used VB in the past to automate Excel
but this is the first time I've used C#. Back in VB, I was able to
retrieve a cell's contents via something like this:
Set objExcellApp = CreateObj... more >>
illegal cross thread operation by PostMessage
Posted by Wilfried Mestdagh at 3/31/2005 9:41:06 AM
Hi,
Using P/Invoke I use PostMessage to send a message from one thread to
another. I'm pretty sure this has already worked in dotnet. but I've
upgraded version 2 few day ago.
Now I have an illegal cross thread operation if posting a message. Is this a
bug introduced in latest version o... more >>
Dynamic Invoke from Unmanaged DLL (CompactFramework, WjnCE.NET 5, vs 2003, C#)
Posted by Marco [Stinger] at 3/31/2005 9:40:13 AM
Hi
Sorry if this has been asked before but I'm VERY new to the
compact framework.
Here's my problem
I'm writing a program for a WinCE.NET 5 device using Visual Studio 2003
and C#.
This program needs to call a few DLL writen in EmbeddedC++.
I already know that the dll's work since I've teste... more >>
Web - Accessing Current Sessions?
Posted by David P. Donahue at 3/31/2005 9:22:26 AM
Is there a way to iterate through some kind of collection and access
session variables in current active sessions on the website?
For example, I'd like to add a feature to an administrative section of a
website that will show the admin a given session variable ("username"
for example) for e... more >>
DataTable
Posted by Josema at 3/31/2005 8:31:02 AM
Hi,
I have a datatable filled, and i would like to delete one column completely,
but when i use the method Remove(DataColumn column)
i get this error:
Collection was modified; enumeration operation may not execute
Why im getting this error?, i know that im modifing the collection, but... more >>
time static variable value is retained
Posted by Helpseeker at 3/31/2005 7:51:12 AM
Hi all,
I have written a small code in which i declare a static int variable and
increment its value by one each time i click on a button. actually i use the
int variable value in a particular URL so that i can browse to diff URL each
time i click the button. Hope you understand the scenar... more >>
Threading in C#.Net Web application
Posted by yatharth NO[at]SPAM gmail.com at 3/31/2005 5:22:27 AM
Hi,
I m new to threading and i have successfully runed threading but i
could display value on my web page ,but its working in code behind
when i see it through debugger,plzzzzzzz help me here is the code
below:
i just wana display the simple array value stored in my array variable
in my ... more >>
sizeof(bool) quick question
Posted by Brian Keating at 3/31/2005 4:53:02 AM
Hi there,
i want to know size of managed bool (know it is 1byte according to language
spec)
but how do i do it in code?
Marshal.Sizeof... isn't an option cause it returns 4 bytes, i.e. unmanaged
Boolean
what is correct syntax?
Thanks in advance
Brian
... more >>
RELATING C#.Net with XML
Posted by ATLANTA PATNAIK via DotNetMonster.com at 3/31/2005 4:23:11 AM
Hi,
I have some data from a user,say:Name-X,Age-10.
Can i write a function in C#.Net that would insert this data(taken from the
user at runtime ) into a XML file within a particular node.I want to store
it as:
<student Name="Atlu" Age="10">contents</student>
Thanks & regards,
Miss Patnaik.... more >>
Memory limit?
Posted by KalleD at 3/31/2005 3:31:07 AM
Hi, I need to use a lot of memory in an aplication. But I get
OutOfMemoryException whenever I try to allocate more than around 1.2GB.
Ex:
byte [] c=new byte[1300000000];
My computer (win xp) have 4GB of RAM memory and it looks like 3GB is free
(Performance Monitor->Available MB).
Is ther... more >>
Publish exception to Email in Exception Handling Exception Block
Posted by emy at 3/31/2005 3:29:02 AM
Hello and hi everyone..
How can i publish my exception message to email in Exception Handling
Application Block??
... more >>
Add row at top in UltraGrid
Posted by Din Butt via .NET 247 at 3/31/2005 3:24:53 AM
I want to add a new row in ultra grid at index 0 mean at top of grid.
--------------------------------
From: Din Butt
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>jw4ZWxikrEWTSE1Hda7GLg==</Id>... more >>
OT: ILMerge
Posted by rawCoder at 3/31/2005 3:08:33 AM
Hi All,
Just needed to know what you guys think about ILMerge.
Is it mature enough?
Does it pose any performance loss?
Is it gonna be part of VS.NET in future?
When should I and when should I not use it ?
Any idea is welcome.
rawCoder
http://research.microsoft.com/~mbarnett/ilmerge.asp... more >>
Httpwebresponse.cookies returning inconsistant values.
Posted by Ravi at 3/31/2005 2:57:02 AM
Hi ,
i am trying to pass the same session Id to all the webrequest, but
sometimes the response.cookies returns zero and sometimes one. is this to do
something with cookies expire. In this sample code the line
Console.WriteLine("cookies1 count : " + firstResponse.Count.ToString()); and
... more >>
|