all groups > c# > november 2003 > threads for friday november 7
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
Registry Permissions
Posted by Steve Harclerode at 11/7/2003 10:31:21 PM
I have a registry value that I wish to read from a web page. The web page
that I wrote using "Wscript.Shell" works great, *if* I manually set up a
permission on the registry value to allow the IUSER_MYMACHINE account to
access it.
The only problem is that this registry value is deleted sometim... more >>
Memory Leaks
Posted by SLN at 11/7/2003 8:14:50 PM
Hi,
Im currently working on a C# appn and facing a problem
with memory leaks.
In our application we have a tabcontrol and tabpage
named "Main" in it. This tabpage has a treeview control
and upon clicking on any node we create a new tabpage and
add it to the tabcontrol.
Currently in... more >>
simulate a Window action
Posted by Andrew Chen at 11/7/2003 7:05:33 PM
How do you simulate an action on a Control, such as
clicking a row header, by calling a function that is
protected inside a class (i.e. protected void
OnRowHeaderClicked(...))? ... more >>
Context menu issue
Posted by Frank Oquendo at 11/7/2003 7:04:47 PM
My DataGrid has a ContextMenu assigned to it. If I right-click the
current cell, I get the standard Windows context menu (Cut, Copy, Paste,
etc.). If I right-click anywhere else, I get my context menu.
I want my context menu at all times. Is this possible? If so, how?
--
There are 10 kinds... more >>
Dynamic class instantiation
Posted by Jim Witt at 11/7/2003 6:48:53 PM
How can a class inside a class (who is already instantiated) be
instantiated from a string whos value is the name of the class?
Thanks!
... more >>
Retrieve als delegates for an event???
Posted by Lore Leuneog at 11/7/2003 6:27:03 PM
Hi.
You can add new delegates for an event with += and you can remove delegates
from an event by using: -= but is there a way (method) to list all delegates
added to one event???
Sincerely
Greetings
Lore
... more >>
Debugging in C#
Posted by Geeta at 11/7/2003 6:20:26 PM
hi,
I am fresher in C#.I am learning this language of my own.
So as a beginner i am facing some problems with debugging.
The way we debug in Vc++ applications, we will be able to
see the win32 code and all. So the same way when i am
debugging c# programs i would like to get in to the
cla... more >>
ShockwaveFlashObject
Posted by Ron Vecchi at 11/7/2003 6:12:49 PM
I am referenceing the ShockwaveFlashObjects (com)
When the code compiles into the executeable it seems that I need to run the
executable in the same directory as the referenced files. (below)
AxInterop.ActiveXPlugin.dll
AxInterop.ShockwaveFlashObjects.dll
Interop.ActiveXPlugin.dll
Interop.Sh... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
csharp and vb got different result in math calculation WHY??????
Posted by Nicolas at 11/7/2003 6:00:46 PM
Why does for the same code I got different result
the VB code gave me what I want why not the csharp?
Thank you for your help...
CSHARP CODE
int sx, sy;
double sdegrees;
sdegrees = (90 - (5/15) * 90) * (System.Math.PI / 180);
sx = (int) System.Math.Round(95 * System.Math.Cos(sdegrees)... more >>
Stateless Objects & Multiple Threads
Posted by Steve - DND at 11/7/2003 5:36:44 PM
I've seen many threads on Google about questions regarding stateless
classes, and thread synchronization. However, either I am dense, or I have
just not found the right thread, but I'm still not clear on how it all
works. I understand that if I have a static member variable such as a
collection,... more >>
Framework Security Configuration
Posted by Matt Theule at 11/7/2003 5:32:26 PM
Where can I find information about Runtime Security Policies?
I have a winform that is hosted in a webform that needs to access the
filesystem. Using the Configuration mmc snapin, I have created a code
group that has 'full trust' for any assembly from the specified URL (a
local intranet serve... more >>
how to create a RoundRect Form?(Empty content)
Posted by jay at 11/7/2003 5:14:11 PM
FieldInfo GetValue()
Posted by Cezar at 11/7/2003 4:57:42 PM
Hi,
I'm trying to get the value of a field in a class using
Reflection.
First of all, I can't access private fields. I know MSDN says you can access
them if the code is fully trusted, but what that means?
I added at the end some code I used.
Then, if the field is static everything work... more >>
Text in Bitmap question:
Posted by Ivan Demkovitch at 11/7/2003 4:30:55 PM
Hi!
I'm outputing text to bitmap using following code:
//Create new bitmap
oPic = new Bitmap(100,150);
//Get Graphics
Graphics g = Graphics.FromImage(oPic);
//Set quality to high.
g.CompositingQuality = Compositin... more >>
Inducing wait interval.
Posted by Newbie at 11/7/2003 3:54:50 PM
Hi,
I am using sockets in my program. Somehow things work perfect while debugging
but fail when run without glitches.
How can I induce sleep periods in my code. I tried Thread.Sleep(20) but doesn't
seem to work.
Thank you.
... more >>
Datagrid Button
Posted by Zürcher See at 11/7/2003 3:14:12 PM
Someone has implemented a Datagrid Button for the Windows.Form?
... more >>
no standard output
Posted by Dirk Reske at 11/7/2003 3:12:31 PM
Hello,
when I start a console app manually I get the output into the console.
But when I start it with my application and read the standardOutput (which
is redirected),
I get nothing?
It works fine with other console apps!
Does this app doesn't work with standard output?
Is there a way to r... more >>
array and propertygrid question
Posted by Pol Bawin at 11/7/2003 3:05:00 PM
Hi All,
One :
I have a property that get/set a array of an abstract class A
By default my array is null
In the propertygrid, It is not works correctly when my array is null. (when
my array is initialized with one element it works fine)
But I can not change the initial state of the array. I... more >>
How to NOT reference the same object??
Posted by WayneD at 11/7/2003 2:58:34 PM
Hi All,
Just got started in C#...
Here's some C# code:
public MyClass
{
private MyThingy m_Thingy;
public SetThingy(MyThingy thingy)
{
m_Thingy = thingy;
}
}
I just found out that MyClass.m_Thi... more >>
Visual Studio versions
Posted by News charter at 11/7/2003 2:32:03 PM
I am confused
I found Visual Studio.NET Pro 2003 on one website for $78
http://www.gopcplus.com/pcplus/product.asp?lMainCategoryID=39&lCategoryID=42
&lProductID=90990
then another site charges $749
http://www.atomicpark.com/productDetail.aspx?prodId=18328
What is the difference between t... more >>
Compression or containing Multiple files
Posted by discussion NO[at]SPAM discussion.microsoft.com at 11/7/2003 2:16:26 PM
Hi,
Does .NET have classes or in the near future have classes to allow me to
compress N files into one or somehow contain N files in one (even without
compression)?
If .NET hasnt or wont, does the platform at all have any I can PInvoke?
Fanks
... more >>
<see> tag: how to access a constructor?
Posted by Dario at 11/7/2003 1:35:00 PM
What I have to write in the <see> tag
in order to access the constructor of a class?
E.g.: to access the constructor of a class MyClass
I try <see cref="MyClass.MyClass"/>
but it does not work.
I try also <see cref="MyClass.#ctor"/> but it fails also.
What I have to write?
... more >>
Windows Service Install HELP
Posted by Chris Calhoun at 11/7/2003 1:33:25 PM
Does anyone know how to deploy a windows service on a prodution machine?
The installutil looks to be working but I am unable to start the service
after the install.
Thanks in advance.
... more >>
Getting method metadata from within the
Posted by sujan NO[at]SPAM bigfoot.com at 11/7/2003 1:04:09 PM
Is there a generic way of getting the method metadata from within the
method itself e.g. consider a method
void knowThyself(string someParam_in )
{
//want to know the information about knowThyself here in a generic
way e.g.
allknowing.printCurrentMethodInfo(); // this would print out t... more >>
Convert byte to sbyte - no easy way?
Posted by rackley NO[at]SPAM ford.com at 11/7/2003 12:52:04 PM
I need to convert a byte to an sbyte - and it has to preserve the
original binary meaning of the 8 bits. For example - a 1111 1111,
which is interpreted as byte to be 255, should show up in the sbyte as
-1. The BitConverter class only takes 2 byte arrays or larger, and
the Convert.ToSByte simp... more >>
File copy from AS/400 IFS share by Win2k box starts multiple jobs that dont end
Posted by pmcclellen NO[at]SPAM manh.com at 11/7/2003 12:04:04 PM
We have a Win2k box accessing the IFS to 1) list files 2) copy files
and 3) delete files. When I do the same sequence from Windows
Explorer on the Win2k box, I have no problems.
However, when I do it programmatically (C# Windows Service), it seems
that multiple jobs are being spawned on the A... more >>
Re: Borland C# Builder Auto Code Formatting Question
Posted by Mike Bresnahan at 11/7/2003 11:56:56 AM
I have experienced the same problem. I've played with the "smart tab"
feature, but it appears to be broken. Have you found any solutions? Does
Visual Studio .NET have a formatting feature?
Mike
------
Hi,
I tried out #Develop and Borland C# Builder. I liked #Develop but it
was a bit ... more >>
Regular expression problem with repetition of matches
Posted by Billy_270 at 11/7/2003 11:49:54 AM
Hi!
I have a text "*.jpg;*.bmp;*.png" and I'd like to get "*.jpg", "*.bmp" and
"*.png". I've tried the pattern "^(?:(\*\..+);)*(\*\..+)$", but it doen't
work because it returns "*.jpg;*.bmp" and "*.png" (I know, it returns the
longest sequence).
Is there a pattern that would return what I want ... more >>
ArrayList.BinarySearch
Posted by Pete Z at 11/7/2003 11:34:46 AM
Does anyone know why this snippet of code continues to return x with a value
of -1?
Is there an issue with ArrayList.BinarySearch?
ArrayList myAL = new ArrayList();
myAL .Add(1);
myAL .Add(2);
myAL .Add(3);
object oX;
oX = 3;
int x = myAL .BinarySearch(oX)
According to ... more >>
problem in catching the keys pressed on combo box
Posted by Nagachandra Sekhar Grandhi at 11/7/2003 11:32:36 AM
I placed a combobox control on User control and this user control was placed
on a form and I tried to catch the keys pressed on that combo box, but I am
unable to do it. I set the property of keypreview to true.
But when I do the same for text box it is working fine.
After that I placed th... more >>
Clean up after yourself!
Posted by Eric Cadwell at 11/7/2003 11:31:08 AM
A handy piece of code...
Put this in your Dipose() methods and it will do all your clean up for.
Just need to add support for unregistering events and all our memory leaks
will be gone!
public void Disposer()
{
Type type = this.GetType();
if (type != null)
{
foreach(FieldInfo fi in type... more >>
DataGrid disappears
Posted by Dave bailey at 11/7/2003 11:05:35 AM
When I execute the following code when using a dynamicall
created LinkButton in a dynamically created dataGrid, the
DataGrid disappears and the page I am trying to get to
does not load. Can anyone see what is wrong here?
protected void Grid_ItemCommand (Object sender,
DataGridCommandEven... more >>
"string resource file" in c#?
Posted by Dan H. at 11/7/2003 10:42:32 AM
Hello,
What is the equivalent "string resource file" in c#?
And, is there a way to create a beep in C#?
Thanks,
Dan
... more >>
textBox linefeeds
Posted by andrewcw at 11/7/2003 10:40:05 AM
Simple question - I have a text box and the multiline,and
word wrap are turned on.
this.txtProcessInfo.Text="a\n\b\nc\n";
I think this would display
as
a
b
c
but I just get abc.
What should I set or do different ? Thanks... more >>
hide DataGrid Cell
Posted by Andrew Chen at 11/7/2003 10:18:51 AM
How do I hide any particular DataGrid Cell from visible,
or any DataColumn for the matter?... more >>
Simple Object Oriented Design
Posted by rick walsh at 11/7/2003 9:28:56 AM
I am trying to write an application that displays news articles on a web
page.
I have recently moved to C# and currently I am trying to learn how to use
good Object Oriented design.
I assume that I should create a class called mynews. This will hold member
information such as headline, dat... more >>
Conditional compilation
Posted by FireStarter at 11/7/2003 9:12:28 AM
Guys, in the code that follows, why does the method F() still compile, even if
DBG is undefined? Inside method G(), the code inside <#if DBG> does not compile
(notice that I can write whatever I want in there, I will not receive a
compilation error). I do get such an error in F() - because of ... more >>
Programmatically Restart Computer/Application
Posted by John Spiegel at 11/7/2003 8:56:54 AM
Hi all,
Is there a way to programmatically restart Windows (2000, specifically),
login automatically then start an application? I've been running across
some Windows Shell options (which further examples would be appreciated) but
would particularly like to find a .NET-specific example.
TIA... more >>
Hiding a ColumnHeader...
Posted by Alan Seunarayan at 11/7/2003 8:48:36 AM
Hello,
I have a number of ColumnHeaders that are 'hidden' (width
set to zero). However, it is still possible to size
them. The reason why they are hidden is to give the
illusion that they do not exist. Is there a way to stop
the user from being able to resize column headers that I
hav... more >>
Instantiation class
Posted by Peter Krikelis at 11/7/2003 8:42:27 AM
Hi,
I wrote a class in the same namespase as my whole project
and in few forms I am trying to use methods that are
implemented in that class. In one form it works perfectly
and when I am trying to call methods in other forms this
error is generated:
" An unhandled exception of
type '... more >>
How can i change a Console Size
Posted by gerald.maher NO[at]SPAM waytohere.com at 11/7/2003 8:39:41 AM
Hi
I have a Console project and want to make sure the with of the Console
is 80 characters long, if not i have to set it to 80 characters
Any suggestions ?... more >>
.cpp and .cs in the same assembly
Posted by creepiecrawlies NO[at]SPAM hotmail.com at 11/7/2003 8:20:00 AM
Are there any plans in a future release of .NET to allow Managed C++
to co-exist in the same assembly with C# code?
The reason I ask is that I keep running into the problem where
conceptually speaking classes I make belong in a single DLL /
Assembly; due to the nature of their implementation, ... more >>
Code Cleaning
Posted by Anthony leong kar keong at 11/7/2003 7:57:04 AM
Hi i would like to ensure some code cleaning methods.
#1 COM objects
Is the following the correct way ?
objMe = null;
#2 Dispose VS. null
Mydataset.dispose();
or
Mydatatset =null
#3 c# class objects
myobject Myinstance = new myobject();
....
...
Myinstance =null <--correct ?
... more >>
Datagid Col BackGround
Posted by Fabrizio at 11/7/2003 5:46:38 AM
Hi,
Is it possible to give a different background color to a
single column in a Datagrid? And arrange the text
position in the single cell ( middle center)?
Thank you in advance,
Fabrizio
... more >>
Performance
Posted by jj at 11/7/2003 5:42:19 AM
Hi
Ok I just want ot post this as I am involved in a project that si suffering
really badly in performance using the .Net C# and some coom interop.
The reason I am posting this message is that it is the second project in a
row that I have found similar problems.
I am wondering has anybody e... more >>
Help ! Why isn't this working?
Posted by Christina Androne at 11/7/2003 5:13:22 AM
I've read the docs and evrything seems fine. Then what I am missing ?
This is the code snippet:
try
{
Assembly LAssembly = Assembly.LoadFrom(args[0]);
Type[] LTypes = LAssembly.GetTypes();
foreach (Type LType in LTypes)
{
if (LType.IsClass)
{
Console.WriteLi... more >>
Threading Question
Posted by gshort NO[at]SPAM scotlandonline.co.uk at 11/7/2003 3:40:37 AM
Hello group,
I'm writing a spidering app and I'd appreciate some advice on
threading. My plan of attack is to have a main thread fetching the
html from a list of urls in a xml file, then spawning a new thread
using ThreadPool.QueueUserWorkItem(new WaitCallback(threadFunction));
to do the actu... more >>
Subscribe to os events
Posted by Jesper. at 11/7/2003 2:59:49 AM
Hi,
Is it possible to subscribe to os events. I would like to
invoke my program (.e.g. maximize it from the task pane)
when a certain key combination is pressed. Much like the
explorer can be started by the windows key + E.
Is this possible.
best regards Jesper.... more >>
Overloaded Method Resolution
Posted by Hamza GOLYERI at 11/7/2003 12:52:48 AM
Hi,
I even read the related parts of language specification
but could not find anything that explains the following:
====================
public class A {
public void Foo(object o) {
System.Console.WriteLine("Foo(object o)");
}
public void Foo(string s) {
System.Console... more >>
|