all groups > c# > april 2004 > threads for tuesday april 27
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
MDI question with little answers
Posted by Scatropolis at 4/27/2004 11:49:05 PM
Hi I don't even know if this is possible, but I'm trying to open external
programs as children in my MDI form. The basic purpose is so I could open
notepad, calculator, and other apps in one program that I could minimize and
would manage all the programs as children.
Is this possible in wi... more >>
Running an Exe process then hidding?
Posted by news.microsoft.com at 4/27/2004 10:38:26 PM
I need to find a way to run an external exe (using the process class I
assume) and hide. When the process is closed I want my application to
reappear.
For example, press a button on form1, run notepad and hide form1. Close
notepad and form1 reappears.
Any ideas?
Thanks.
... more >>
Good OOP practice?
Posted by altergothen at 4/27/2004 8:00:55 PM
I'm currently doing a course in C# programming fundamentals.
Please will you check and comment on the following assignment:
Assignment: Create a simple calculator prgram that illistrates good OOP
practice.
I have written the following console program that I hope answers this
question (and ... more >>
Passing .NET references through COM objects
Posted by David Vestal at 4/27/2004 7:59:37 PM
Suppose a COM object creates a .NET object (call it 'A') through a Com-
Callable Wrapper.
Can the COM object then pass a .NET reference to 'A' to a different .NET
object (call it 'B')? The goal is for 'B' to be able to use 'A' like any
other .NET object.
This is a much simpler way to a... more >>
convert string to ref System.Array
Posted by Janus Knudsen at 4/27/2004 7:54:13 PM
Hello
Im getting an error when I try to convert like this:
string[] arrDSN;
objDSN.GetDataSourceList(arrDSN)
And the error: Argument '1': cannot convert from 'string[]' to 'ref
System.Array'
Kind regards
... more >>
How to customize PrintPreviewDialog using C#
Posted by sachin at 4/27/2004 6:46:02 PM
How to customize PrintPreviewDialog, such that, addition of a new button, change the functionality of existing button should be possible programatically. Sample code will help a lot. Moreover, what happens before the document gets displayed in PrintPreviewDialog, i.e. whether entire document gets co... more >>
Link DLL in C# !!!
Posted by Eric Chow at 4/27/2004 6:40:51 PM
Hello,
If I compiled a DLL in C# (csc /t:library mylib.cs);
How can I use some Class that loacates in the mylib.dll in another C#
program ????
Eric
--
==========================
If you know what you are doing,
it is not called RESEARCH!
==========================
... more >>
NotifyIcon not showing for a windows service ?
Posted by Seymen Ertas at 4/27/2004 6:17:37 PM
Hey anyone seen this before ?
I followed examples from microsoft and added a notifyicon to my windows
service project and i can't get the icon to show up. Here is a checklist of
what i have tried so far:
1) Tried to make the icon 16x16
2) Made sure the icon was embedded into the exe.
3) Ma... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Dynamically add linkbuttons and wire them to same event??
Posted by Linda at 4/27/2004 5:35:10 PM
Hi,=20
How do I dynamically add linkbuttons and wire them to same event? I am =
able to add linkbuttons but they do not fire the event. Does anybody =
have a working sample?
Many thanks,
Linda... more >>
Old Class Library Objects Keep Showing Up!
Posted by Steven C at 4/27/2004 5:18:49 PM
Hello:
I have a C# app that I'm trying to build. I have three projects in
the solution, the first of which stores the base object definitions
(base form, base textbox, base commandbutton, etc), the second project
holds an intermediate class level (subclassed from the base class
stuff), and a... more >>
# of occurences of string in another string
Posted by Jason Gleason at 4/27/2004 4:47:45 PM
What's the most efficient way to get the number of occurences of a certain
string in another string..for instance i'm using the following code right
now...
private int CharacterCounter(String text,String Character)
{
int count = 0;
for (int i = 0; i < text.Length; i++)
{
if(text.... more >>
Fonts
Posted by Bill English at 4/27/2004 4:41:03 PM
I have three buttons in the toolbar; Bold, Italic, and Underline. When Bold and Italic are pressed, I want the selection font to be Bold and Italic. I chose this code, but it doesn't work
My Code
if(buttonbold.Pushed == true & buttonitalic.Pushed == true & buttonunderline.Pushed == false
{new... more >>
Odd problem with Visual Studio
Posted by Ken Allen at 4/27/2004 4:33:52 PM
I have been developing a suite of assemblies over the past couple of weeks,
and this afternoon somethign started misbehaving.
If I do not run the IDE and compiler the code from the command line, the
compilation seems to work properly almost all of the time. More on this
later.
If I launch o... more >>
how to access to a control
Posted by Altex at 4/27/2004 4:30:41 PM
Hi, I've got the name of a control (mycontrol3) in string format
string cotrolname = "mycontrol3";
how can I access to the control
instead of doing this
mycontrol3.Height = 100;
I'd like to do some thing like this (but in the right way)
cotrolname.Height = 100;
thanks
alex
... more >>
ASP.NET application and FindWindow() Windows API function
Posted by Olex Malko at 4/27/2004 4:19:38 PM
How to manage FindWindow() function working properly in ASP.NET application?
In Windows Forms application it works fine. But in ASP.NET it returns NULL
:( Probalby this is because of different context. Something like IIS is ran
under other account or some services cannot interact with desktop.
... more >>
Exception Logging in C#
Posted by Kevin Jackson at 4/27/2004 4:10:54 PM
Let's say we log exceptions to the windows application event log using the
Exception Management Application Block. Is there a pattern that can be used
so the exception is logged only once and not everytime up through the call
chain? Is there anything a caller can key off of to check to see if... more >>
How do I change connection strings with csharp??
Posted by acool at 4/27/2004 4:05:55 PM
I have been doing this with VB.Net for quite a while and NO problems. I
tried doing the same thingwith csharp and my Visual DataAdapter bomb when I
go back to the page. My code is as follows:
string strCRMUpdate = ini.ReadString("CRMCredentials", "CRMUpdate", "");
string strDefaultDB =... more >>
C# Application Question
Posted by Ed_P. at 4/27/2004 3:56:03 PM
Hello
I am currently building a small application that uses an Access Database as the backend to store it's data. Currently I have only one EXE that starts the application, what I wanted to know is that there are any resources or info that any one can provide that can help me to maybe break up th... more >>
Threads asynchronous, web service synchronous?
Posted by Marty McDonald at 4/27/2004 3:48:59 PM
I create and start several threads, each thread executes the same method -
within the method, a web service is invoked. I find that the more threads I
use, the longer it takes for all of the threads to finish. The threads are
asynchronous, correct? And I thought each would be able to use it's o... more >>
Object to binary[] from COM in .NET using C#
Posted by A. Gharbeia at 4/27/2004 3:42:33 PM
Greetings:
It turned out that using COM objects from .NET C# isn't straight forward at
all.
Now, I have successfully used reflection to instantiate the object, and
invoked the methods and properties through Type.InvokeMember, but...
One property whose value I retrieve through :
TImagingObj... more >>
A job for reflection? Or is there a better way?
Posted by Gary Morris at 4/27/2004 3:34:04 PM
Hello all,
This is my situation. I'm reading an XML file with a variable number of
nodes.
So far, all of the code has been reasonably easy, but now I'm up against a
wall trying to figure out the best way to proceed.
Upon reading in a valid node, I'm wanting to add a tabpage to a tab control... more >>
Transforming between datasets.
Posted by SPG at 4/27/2004 2:35:42 PM
Hi,
I have a dataset containing one table with plenty of rows (>5000).
I need to convert these to fit into another set of rows in the quickest
possible way.
I know what fields I will be getting in, and what fields need to be
converted to make the output dataset, but am tryingto find the qui... more >>
yielding cpu
Posted by george at 4/27/2004 2:26:08 PM
I am writing a process that is a tight loop that consumes alot of cpu. Back in my VB days I could use "DoEvents" to periodically yield control to the OS incase there were any pending events. This would keep the app from being able to effectively take over the system. What is the equivilant in C#?... more >>
Special Folders
Posted by Bill English at 4/27/2004 2:26:05 PM
I want the initial directory of my save file dialog to be the My Documents folder. I know that that can vary, so is there a class that contains these special folder? What I would like is
OpenFileDialog.InitialDirectory = Class.MyDocuments... more >>
Delgate help.
Posted by bredal Jensen at 4/27/2004 1:54:23 PM
Hello gurus,
I need to dynamically create event handlers for my dynamically created radio
buttons in
an aspx.cs page.
The event should be fired when a user select the radio button.
I set the "autoposback" property to true for the buttons that need
to fire events when they are selecte... more >>
wierd OOP problem (a bit complicated)
Posted by cody at 4/27/2004 1:38:31 PM
I have a OOP problem with the well known pattern where objects containing an
object which represents a list of subobjects. Now my problem is that the
ctor of a subobject indirectly calls the property in Foo which returns the
BarList, since to this time the ctor of BarList did not returned yet, th... more >>
Threads & Garbage Collection
Posted by Martin Maat at 4/27/2004 1:15:24 PM
I am puzzled.
I have this object that uses a thread. The thread is encapsulated by the
object, the object has Start and Stop methods to enable the client to start
or stop the thread.
I found that the object will not be garbage collected while the thread is
running. Fair enough, the document... more >>
Leaking ToolTips
Posted by dei-work NO[at]SPAM eieioh.net at 4/27/2004 1:09:23 PM
I'm working on a C# Windows Forms application that is leaking memory.
I've been using the SciTech NetMem Profiler 2 (A really great tool,
BTW) to track down leaks. I've found one related to ToolTips that I've
been unable to fix.
We have a base form, from which we add and remove panels. When
c... more >>
Store byte array into SQL Server
Posted by opamail1-1000 NO[at]SPAM yahoo.com at 4/27/2004 12:54:08 PM
Hi,
This question has been asked b4 on these newsgroups. I can't find a
clear example.
I have a byte array called signature. I'd like to store this byte
array in a SQL server varbinary column and then read it back again. I
have the following code snippet:
Assumptions: sqlCon is a vali... more >>
Array question
Posted by skrishnan NO[at]SPAM snet.net at 4/27/2004 12:41:29 PM
The array in the debugger shows that it has
[0]----value "xxxx" type string
I want to get to the string.
When I do
Array.GetValue(i).ToString(); I get the value
However when I do
String str;
str = Array.GetValue(i)
It tells me type object cannot be converted to string
... more >>
directX 9.0 sdk...
Posted by Bad_Kid at 4/27/2004 12:27:26 PM
just installed, computer restarted, and now in c# when I write
using System;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
using Microsoft.DirectX;
....
The type or namespace name 'DirectX' does not exist in the class or
namespace 'Microsoft' (are you missi... more >>
C#, Drawing Place
Posted by Mathieu Chavoutier at 4/27/2004 12:06:19 PM
Hi.
I would like to have a blank place with points every X pixels, where it
would be possible to draw/place components. A little bit like the GUI of VS.
I have to be able to draw a circle or wire between components.
Do you know anything that could be used for it?
Thanks.
... more >>
How to compile?
Posted by Fayyaz at 4/27/2004 12:06:03 PM
He
I have netframework installed on my system. I created a folder "test" on my C:\ drive. I have a file named "Hello.cs" saved in that directory "C:\test" . Please let me know how to compile this Hello.cs file. I am new to C#.
Thanks
Fayyaz ... more >>
Decimal - Double?
Posted by Bill English at 4/27/2004 11:51:01 AM
I'm new to C#, and I want to use a trackbar for the forms opacity
This is my code
decimal trans = trackBar1.Value / 5000
this.Opacity = trans
When I try to build it, I get this error
Cannot implicitly convert type 'decimal' to 'double
I tried making trans a double, but then the control doe... more >>
Any way to check a url
Posted by Henry Jia at 4/27/2004 11:46:53 AM
Hi,
Does there has any easy way to check if a specified url is a valid one =
(both the format should be valid but also the specified path / file is =
available)?
Thanks in advance!
Henry... more >>
What is your favourite web site and search engine?
Posted by Arda Han at 4/27/2004 11:24:02 AM
Hi friends,
I am new on C#. I want learn usefull C# sources on the web. What is your
favourite web pages? And how can I search newsgroup posts on the web?
... more >>
Looping thru Arrays
Posted by skrishnan NO[at]SPAM snet.net at 4/27/2004 11:08:25 AM
I have Type System.Object and the value is {System.Array}
I see [0].......[100] in the watch window.
How do I traverse such a data structure.
thanks for any help.... more >>
"Could not establish trust relationship with remote server" error
Posted by Olex Malko at 4/27/2004 10:54:00 AM
I have a library that reads web page and returns it like a string.
I use "WebRequest" class to get text of page from "https://..." URI. I set
credentials and proxy.
Everything works fine and page can be downloaded when I use my library in
console application.
But... When I use my library in... more >>
How to clone forms and navigate PREV-NEXT-OKAY-CANCEL
Posted by Patrick Coghlan at 4/27/2004 10:40:49 AM
I want to create about 4 forms with the same dimensions and background
colours, similar to the forms one has to traverse when installing
various software packages.
I'm using Visual Studio and C++ (changing to C# soon) and can create
separate forms, but I really just want to clone the first ... more >>
Collection vs Dictionary
Posted by Pavils Jurjans at 4/27/2004 10:27:34 AM
Hello,
There's some confusion about the purpose and difference between these handy
classes...
First, both of them are holding number of key - value pairs, right? Then, I
see that there may be some difference in terms of data types allowed for
keys and values, perhaps?
I read the followin... more >>
Funclets??
Posted by Abhishek Srivastava at 4/27/2004 10:17:54 AM
Hello All,
While reading a C# textbook, I came across this term called "Funclet" I
am just wondering what exactly is a funclet.
Thanks for your help in advance.
regards,
Abhishek.... more >>
Rebuild or build?
Posted by Reza Alirezaei at 4/27/2004 10:08:46 AM
what's tyhe difference between rebuilding a project and building a project
in visual studio .Net 2003?
... more >>
Setting a child form on top of another that has been activated
Posted by Jose Egea at 4/27/2004 9:51:51 AM
Hello:
I have two child forms fChild1 and fChild2, and I want to set and reactivate
fChild2 over fChild1 when fChild1 is activated. I have tried with this code
in frmChild1, but it doesn't work, and now I dont't have any idea about how
to do it.
Can anybody help me, please?
Thanks in advance
... more >>
windir
Posted by Ariel Gimenez at 4/27/2004 9:44:57 AM
Hi,
i need to know in my code where is the windows folder in c# any ideas?
Thanks in advance
... more >>
Random
Posted by Ariel Gimenez at 4/27/2004 9:41:52 AM
Hi i need to generate a random string , can anybody give me an example of
how to do it in c#
thanks!
... more >>
how to do a multiple inheritance - like
Posted by gaetan NO[at]SPAM xeberon.net at 4/27/2004 9:33:21 AM
hi
i have 2 classes A1 and A2 implementing a problem with 2 different
ways
i also have 2 other classes X1 and X2 implementing an other problem
i need classes that provide A1+X1 methods, A1+X2, A2+X1 and A2+X2:
interface A
class A1 implements A
class A2 implements A
interface X
cl... more >>
Inherited control problem Compact Framework
Posted by rawsteel NO[at]SPAM abv.bg at 4/27/2004 9:03:50 AM
Hi.
I have a problem inheriting PictureBox for Compact Framework.
I use my class that inherits PictureBox and then when I use my class
as control,
set all needed properties like Image, Size, Location the picture did
not appears when I run the application. I get white screen.
When I debug , I s... more >>
UML design tool
Posted by Mark at 4/27/2004 9:03:22 AM
Hi, can someone please tell me what is the industry standard tool for
developing C# class diagrams?
Also, what are peoples favourite UML design tool?
Thanks in advance
Mark
... more >>
Need quick help...
Posted by Jacek Jurkowski at 4/27/2004 8:59:39 AM
I have to add a property to an object that is already
allive. The problem is that I'm creating MainMenu
from a definition file ... enyway , there is a need to add
each menu item some extra informations. I used to
do that using Tag property of an objects but ManuItem
doesn't have anything like t... more >>
size problem with ole object data type (blob) and ado.net
Posted by quertonp NO[at]SPAM hotmail.com at 4/27/2004 8:17:03 AM
Hi there,
I've a strange problem with ado.net and an Access db. I need to create
a little C# app that take the content of "ole object" field and then
save it into a file.
The problem is that when I do the following
Byte[] byteBLOBData = new Byte[0];
byteBLOBData = (Byte[])(ds.Tables["tb... more >>
Cannot apply indexing with [] to an expression of type 'object'
Posted by bassembwa NO[at]SPAM hotmail.com at 4/27/2004 8:14:53 AM
Hi to all...
Thanks for the help...
I want to get the value of the column of dataset into array, but I get this bug.
"Cannot apply indexing with [] to an expression of type 'object'" when biuld.
The code I used to populate the array is:
ColumnNo = from 0 TO count of columns.
AllCol... more >>
C# forms - this.dispose? want to close automatically when done.
Posted by mravichandran NO[at]SPAM Hotmail.com at 4/27/2004 8:05:30 AM
Dear Readers,
I have successfully created a C# program that will load records from a
view, do some processing, write them back. I want to do this in an
unattended mode.
I want to close the program once the processing of the 500-odd records
are done.
private void frmGeoCode_Load(object s... more >>
More Multithread and UI Forms Update
Posted by John Bowman at 4/27/2004 7:17:59 AM
Hi,
I've read "Cybertof"'s thread (04/19/04) & the article he provided in a link
about accessing UI elements from a thread that did not create them. What the
authors are saying makes plenty of sense. However, using the control's
Invoke method handles calling it's methods, but what about access... more >>
copying to a multidimensional array?
Posted by markjmsmith NO[at]SPAM yahoo.com at 4/27/2004 7:08:51 AM
I'm trying to copy data from a 1D array to a 2D array.
The obvious thing doesn't work:
int[,] twoDee = new int[2,2];
int[] oneDee = new int[2] { 1, 2 };
Array.Copy(oneDee, 2, twoDee, 2, 2);
This causes a RankException. But the MSDN documentation says:
When copying between multid... more >>
How to remove delegate from Invocation List? (remote eventing)
Posted by deja NO[at]SPAM homerlex.mailshell.com at 4/27/2004 6:56:57 AM
I have an app that allows for cross process eventing. I have a server
that instantiates a shared object that external processes can remotely
get a refernce to and register for events.
The problem I have is when one of the clients die uncleanly without
unregistering for the event. The remote ... more >>
Turn On Intellisense in Command Window
Posted by jeffbellus NO[at]SPAM yahoo.com at 4/27/2004 6:36:47 AM
How do I turn on Intellisense in the Command Window? It works in the
code editor, and it also work's for a co-worker in the Command window
for him. One strange thing, is that when I set a break point and go
to the command window, I always have the > (command prompt) as the
first character, whe... more >>
Join Tables without DataRelation
Posted by Steve Bishop at 4/27/2004 6:00:20 AM
I am use to working with only single tables with my command object. Now
I have 2 tables that need a 1 to 1 relationship. Is it possible to inner
join 2 tables in my SQL statement before thowing the data into the
DataSet?? I'm trying to avoid the DataRelation object.
Also, all the examples I ha... more >>
object obj = false ? 0.3 : 1;
Posted by bob_jeffcoat NO[at]SPAM hotmail.com at 4/27/2004 4:27:18 AM
Hello,
in this line:
object obj = false ? 0.3 : 1;
why does obj end up being a boxed double {1.0}
Seems strange to me... more >>
Configuration / Collection problem
Posted by jamborab NO[at]SPAM hotmail.com at 4/27/2004 4:16:39 AM
Hi everyone
I`m having a problem extracting some values from an app.config file.
I`m storing a collection of name value pairs in the config file, and
retreiving them using a custom handler that implements
IConfigurationSectionHandler. It works fine, except my data is such
that I need to be ab... more >>
Howto show a list of all DSN's?
Posted by Janus at 4/27/2004 3:56:03 AM
Hell
This must be a simple question, I've a application where users is able to access different datasources. As things are at the moment, the users must supply the ini-file with a connectionstring (not very fancy at all
So how do I present the users to a dropdownlist where they can select the ap... more >>
Help to convert C++ 6.0 code to C#
Posted by lpo NO[at]SPAM azurtechnology.com at 4/27/2004 3:14:56 AM
Hi,
What the solution to convert this code, please ?
Thank's a lot for response
LPO
SAFEARRAYBOUND sabIn[1];
SAFEARRAY *psaInParms= NULL;
sabIn[0].cElements= 4;
sabIn[0].lLbound= 0;
psaInParms= ::SafeArrayCreate(VT_VARIANT, 1, sabIn);
SAFEARRAYBOUND sabOut[1];
SAFEARRAY *ps... more >>
Oledb Transaction issue
Posted by Martin Hazell at 4/27/2004 3:06:03 AM
I am attempting to get the maximum value from a specific table (select max(id) from transactions) and it seems to work... that is until you do the following
- select the maximu
- insert a new record (meaning the id is increased
- select the maximum again
When done through an oledb transaction... more >>
C# objects?
Posted by Eddie Pazz at 4/27/2004 2:32:55 AM
While reading that everything in C# is an object, why is it that I can do:
string temp = "";
instead of
string temp = new string("");
Is this just a shortcut the compiler provides?
... more >>
class question
Posted by Eddie Pazz at 4/27/2004 2:31:20 AM
What's the preferred method, or does it matter?
class Foo
{
private MyType msg = new MyType();
Foo() {}
}
or
class Foo
{
private MyType msg;
Foo() { mytype = new MyType(); }
... more >>
How to call one ctor in another overloaded ctor?
Posted by Laser Lu at 4/27/2004 2:16:04 AM
Suppose that we have a class with two overloaded ctors defined. And in one ctor, I have written a greate deal of code. So I'd like to reuse those code in another ctor avoiding rewrite them
My question is that, whether it is possible to invoke one ctor in another ctor? How to do it? Any example woul... more >>
Check if variable is defined
Posted by Wessel Troost at 4/27/2004 1:23:33 AM
Hi Group,
How can you check if a variable is defined in C#?
For example, "string s;" would declare an undefined variable. But how can
I check in an "if" statement wether it's defined or not?
Regards,
Wessel... more >>
Graphics and Flash
Posted by No One at 4/27/2004 1:18:00 AM
I need to load either a graphic or a Flash app in my C# window app. Is
there a good way to tell what a file is other than by the file
extension?
... more >>
Implementing PropertyChanged Event Ideas
Posted by John Baro at 4/27/2004 1:15:16 AM
I need to implement an event to notify when a property has changed.
Method 1.
If I use a generic PropertyChanged event from System.ComponentModel then it
will be raised for every property if 1 or more properties changed events are
consumed. (more overhead, less coding)
i.e
PropertyChanged(ob... more >>
|