-
- Error: ArrayList out of Range
by Knu
- 6 Replies
- Last post
by Peter Ritchie
- Hello, I'm reposting this from VC# 2005 Express forum. I have a very simple, yet very strange problem. Here's the full exception text: http://img50.imageshack.us/img50/9030/error4kv0.jpg and the corresponding code:
public class eList : ArrayList {
public void RemoveInherit(Element e) {
for (int i = Count - 1; i >= 0; i--) {
if (i >= 0 && i <
-
- regarding the application size
by mohasad
- 6 Replies
- Last post
by TilakGopi
- hi , i have been in the development of Smartphone game applications. after the creation of the setup file for my application , the size of the setup is around 500 KB . is dis creates any problem, or it is ok to run on the device . thanks sadiq
-
- removing insignificant digits
by mthurt
- 11 Replies
- Last post
by OmegaMan
- Hi, I am trying to delete insignificant digits from a string entry. I am able to delete leading zeros by using the StartTrim('0') function. However, I am having a lot of problems deleting the trailing zeroes. How would I go about this Thanks for any help.
mark
-
- What does this do??
by AlexB-007
- 2 Replies
- Last post
by Citizen on the earth
- Hi, I'm converting some C# code to VB.Net and got most of it converted but I'm a little stumped by the following. I'm confused at how/when the ~GlobalHooks() block gets executed.
Thanks
public GlobalHooks(IntPtr Handle)
{
_Handle = Handle;
_CBT = new CBTHook(_Handle);
_Shell = new ShellHook(_Handle);
_Keyboard = new KeyboardHook(_Handle);
_Mouse = new
-
- Calling back into same thread from activex exe
by Fez8
- 1 Replies
- Last post
by Peter Ritchie
- Hi,
I've got an old VB application I recently converted to c#.
My C# app calls (via com) a method in activex exe
activex exe calls back into main app via com
When the call comes back into the c# app, it is in a new thread. In VB it used to come into the same thread. I have the STAThread attribute set on the main method of the app.
Is there a way of making this happen with my
-
- program running problem
by msksurfer
- 7 Replies
- Last post
by msksurfer
- hi, i have a problem with running my program. when i trace my codes, the program is able to run according to what i planned. but when i run without tracing, the program will skip 2 lines of codes. can anyone advise on what i can do thanx.
-
- Partial Classes not integrated with the IDE and Complier
by http&#58;&#47;
- 1 Replies
- Last post
by Rick van den Bosch
- I can write any partial class like and the vs 2005 and vs 2008 does build with no errors.
it is easy to miss namespaces and staff why is not this thing clear and simple
-
- How to convert a variable to string?
by waterwalk
- 7 Replies
- Last post
by 21 Concepts
- Hello. Please look at the following code: class Test { [Description("Number")] public int num=0; } Test t = new Test(); I want to use reflection to get the Description attribute attached to "num" field. A common way is like this: MemberInfo[] objs = t.GetType().GetMember("num") and so on. This way I have to use a string "num". If later i change the fiel
-
- Accessing contents of DataSets / DataTables
by conorkelly
- 6 Replies
- Last post
by conorkelly
- Hi,
I am accessing an SQL database from an ASP/C# application. I can access the database fine. This returns a DataSet. What I'm wondering is how I access individual contents of this DataSet
Code Block
SqlConnection myConnection = new SqlConnection ( "server=(local)\\SQLEXPRESS;database=conor_DB;Integrated Security=SSPI" );
SqlDataAdapter myCommand = n
-
- Threading, Delegates and a Problem
by LarryLand
- 4 Replies
- Last post
by micvos
- I'm doing a console for a tiny server application, that's why i'm trying to access a textbox in the main form from somewhere else, and therefore from another thread. This is a fragment of the code corresponding with the console's class that uses the textbox in the main form (which is received by parameter in the constructor):
class SRM_Console
{
public System.Windows.Forms. TextBox
-
- Problem in Devenv.Exe
by Prabu.
- 3 Replies
- Last post
by Prabu.P
- How do I log Error message and Warning message alone from Devenv.exe It would be really helpful for me if anyone give a solution.
Thanks in advance.
-
- Enum in generic class
by Magos294963
- 6 Replies
- Last post
by Mattias Sjogren
- Assume the following code:
Public class A<T>
{
public enum B
{
Alpha,
Beta,
}
}
A.B MyEnum1 = A.B.Alpha; //Won¡¯t work
A<int>.B MyEnum2 = A<int>.B.Alpha; //Works, but the enum shouldn¡¯t depend on the type, right
Why is it that, when accessing the enum, I have to specify the class's type The enum should, IMO, not depend
-
- Recognize a sound
by Sithz
- 2 Replies
- Last post
by Sithz
- Hello everyone. I need some help desperately. I have made a program for a game, that takes screen shoots when a certain sound file is accessed (watching last access time). Now this have worked flawless for long time, until there was an update for this game. Now the program works only for those that have a dual core computer, there it works 100%. But for regular computers, the program will only tak
-
- what type of project for a .exe
by db042188
- 6 Replies
- Last post
by Philip Johnson
- what project type should i choose if my goal is an .exe There will be no forms, controls etc. I dont want a service. Dont really want a console to pop up if it isnt necessary.
-
- how to print pdf document with out opening from web application
by rahul dev
- 8 Replies
- Last post
by Dave S.
- Hi,
can any one tell me how to print the pdf document with out opening from the web application. I am using streamreader to read the pdf. I am getting some asci code in the print out. can anyone help out in this.
Thanks
Rahul
-
- How can i call two Asynchronous method one by one
by MrZap
- 2 Replies
- Last post
by JeffOzvold
- Hello, I am new in delegates. I want to call two method Asynchronously one by one. But my UI should be free like there is a timer on form that should be continuous display time on form in tick event.
-
- Project dependency issue
by UrK
- 3 Replies
- Last post
by TaylorMichaelL
- Hi, I have a large solution with number of projects. Some the projects depend on others (never a circular dependency though) One of those projects requires a license and thus is built on one machine only. Rest of the machines just use the resulting DLL as an external dependency. This project is somewhere in the middle of dependency tree. The problem with this is that I have to disable building not
-
- returning a value in the function using c#
by Ramesh goud
- 4 Replies
- Last post
by bmains
- hi ,
in the button click event i am calling a function...."getvalue"
in the function i have to return any vlue like
if((personid=1)&&(clientid=1))
{
here i ahve to return 1 in a s varable
}
elseif(personid=0)$$(clientid=0)
{
here i have ti return o in s
}
and i have to get this s value in button click event...means in the f
-
- Adding Hashtable setting to project settings doesn't work
by cygnusx
- 10 Replies
- Last post
by Chunsheng Tang - MSFT
- When i add setting with type Hashtable in project settings(Project - Properties - Settings) i cannot add anything to the Hashtable.I mean i can't add keys to the Hashtable from the small button in the "value" column,the buttons in the opened window are not active.Therefore obviosly i cannot add keys to the hashtable in the code designer because the Hashtable doesn't have a value...Is the
-
- Another Newbie Lost at C!
by Saeljfkklhen
- 6 Replies
- Last post
by Zamial
- Well, C# really... Guess I'm just as good at puns as I am at C#
programming, heh.Even though I have been able to create a few
workarounds for my issues, I'd rather learn how to solve them the
correct way (such as creating a new form rather than surrounding a few
text boxes with images to fake the look of a new form)...I apologize
for the length of this post, I've tried to narrow it down to wh
-
- Threads --> How to restart a thread ??
by PlaTyPuS8
- 4 Replies
- Last post
by PlaTyPuS8
- Hi ! In my application, I call a thread that launch a synchronization process (that can take X times...depends on user datas) when the user click on a button. The problem is that the user can only synchronize (launching the thread) 1 time..... it's not very practical ... I have the following code :
Code Snippet
private Thread _t;
private void initializeThread() { if (_t == null)
-
- Generic generics ... can Generic methods be constrained to accept generic types?
by Bernd Wechner
- 5 Replies
- Last post
by Tom Meschter MSFT
- I can't find an answer to this anywhere and all my code hacks fail to compile. The shoprt story is like this.
I can write a generic method that looks loosely like (off the top of my head):
private T First<T>(T a, T b) { return a; }
(sure this is a meaningless example but hey, I'm exploriung a point not an application).
Now let's say I want to constrain the type T, this is fine (
-
- waiting for an event
by renealejandrov
- 5 Replies
- Last post
by Friendly Dog
- Hi I don't know if this is the apropiate forum to write, but I think someone might know about this.
I am developing a library that invoques some methods of other library, he other library is a com object and the method tha I Invoque is called Login.
Thre thing is that this Login method executes asynchronously and fire some event to say that it has finished the login process.
In the ev
-
- initialise and test for null
by Colin Grealy
- 6 Replies
- Last post
by Colin Grealy
- A common paradigm in C# (at least from what I've seen) is to initialise a reference from a method or cast and then test for null
Code Block
SomeClass obj = FindSomeClass(searchParam);
if (obj != null)
{
obj.DoSomethingUseful(); }
In C++, (my old language) I'd do
Code Block
// initialise and test for null
if (SomeClass obj = FindSomeClass(sear
-
- Check if a remoting service is up and running
by Gaucci
- 1 Replies
- Last post
by Burak SARICA
- Hi,
I need to implement some kind of watchdog which checks if a remote service is running (and,if it's not, supposing the server went down, starting it on another machine) but I'm still trying to figure the proper way of doing it.
I was thinking about using .NET Remoting, but I'm not sure it's the right way.
Does anyone have any suggestion
Thanks in advance for your kind help !