using javascript in my C# application

1592 byte By asafaa at 2007-11-25 11:22:53
I'm a very experienced Client application programmer.i have never used webbrowsers and javascript code in my C# applciation.i need to use SDK objects of some company through the net, for example using this function:<HTML><HEAD> <!-- AtlasSDK V3 Include --> <script la...

Best method to handle many dynamic arrays

1552 byte By unigee at 2007-11-25 11:22:55
Hi,I have a design decision I need to do and wondering if anybody could give me some pointers on the direction I should follow.I have a 'main' dynamic array, this array is an ArrayList type and it grows and shrinks as my application is running.I now have to store some more data in my app i...

DLL import problem

2153 byte By Burnyie at 2007-11-25 11:23:01
Hello C# programmers,The last few days I have been struggling with 1 problem. I have not so much experience in C# and C++ so I thought to ask it here. In my C# application I have to make use of some C++ code. I import the C++ method this way:[DllImport(@"C:\Documents and Settings\user\My Documents\...

UserControls

716 byte By Suzi167 at 2007-11-25 11:23:06
I have a custom Control which inherits from UserControl. I am using thi control in a Windows Form.In the UI if I want to change the size of my custom control for example by dragging it's borders with the mouse I get the following Message:Type'System.Windows.Forms.UserControl' in Asse...

calling functions located on a server

959 byte By asafaa at 2007-11-25 11:23:51
i need to call , from my C# client application, functions that are placed in a server. This server belong to another company that i want to use their service.They have an SDK to give me.Their functions are written in javascript, This is an example from their site: http://api.atlasct.com/docs/v3/files...

Executing .exe in new thread and read its output every 100 msec

1237 byte By mfonz85 at 2007-11-25 11:23:53
Hi all, I've got a problem: I'm trying to build a GUI for the lame encoder ( http://lame.sourceforge.net/index.php)In my program, I want to start a new thread for the encoding of a mp3 file, so I want to call the executable lame.exe (located in C:\WINDOWS) and pass it some parameters.Now, t...

Client connection gets forcibly closed by Server

5043 byte By diilbert at 2007-11-25 11:23:56
Here is the run down. It is a Client/Server application where the client requests data from the server and the request is fufilled as a reply using the same connection. The "An existing connection was forcibly closed by the remote host" exception rises on the Client under strange circumstances, si...

HELP c sharp basic : Indexer

6 byte By tina888 at 2007-11-25 11:24:19
Ignore

setup kit

52 byte By coricori at 2007-11-25 11:24:29
hi there<br/>how to make a setup for my application?

C# Add web reference

243 byte By highton at 2007-11-25 11:24:44
Hi,<br/>Can anyone tell me how can I "Add web reference" in C# using code (not going to Solution Explorer - Add Web Reference")? <br/>My program is to ask user enter url and it will automatic connect with the web service.<br/>Thanks.

Coin Toss

558 byte By ryno3185 at 2007-11-25 11:24:46
Im trying to get my code to show a random coin flip. This is what i have so far: I need it to print out a head or tail, what am i missing or what do i need?public class CoinToss { public enum Face {Heads, Tails} private static Random r = new Random(); public static Face toss(){ if (r.Ne...

must declare a body?

1806 byte By peter449 at 2007-11-25 11:24:48
so i have to do this simple calculator for school,and i ahve everything done but it saids my static Double answer(double, double) must declare a body because it is not marked abstract or extern.here it is:and i don't know how to do the code things:(using System;using System.Collections.Generic;...

Uploading video or images in C#

921 byte By gravk at 2007-11-25 11:24:54
I'm trying to create a program which allows the user to select images or video files from their hard drive, lay out the images/video on the main panel of a Windows form, and then zip up and upload the media content to a web server.My question is, how would I go about actually getting the video...

connecting and receiving XML data from web service

184 byte By asafaa at 2007-11-25 11:25:05
i have an HTTP address of a web service i need to connect to.<br/>and i want to use this web service function and to receive the XML data it returns.<br/>any idea how to do that ?

VS 2005 IDE question: Listing exceptions

174 byte By DeepT at 2007-11-25 11:25:54
I know when using eclipse you can have it auto-make a try catch block for all exceptions an object can create. Is there a way for to do this with the C# editor for VS 2005?

How do you use format specifers as input?

544 byte By DeepT at 2007-11-25 11:26:02
IE: I want an edit box where a user can type in a format string and then Ill have some data which is printed using thier format specifier? The problem is escape sequences.Example:DataArray[] = {"cat", "dog"};textboxFormat is a text box.Lets say a user puts in textboxFormat: {0}\t{1}Then I do: Out...

Simple Question

220 byte By ryno3185 at 2007-11-25 11:26:22
I need to find more information or a website that can help me to figure this out:<br/>Generate an array of 10,000 random numbers from zero to four.<br/>Does anyone know of a good website that would help me out?

Lines Of Code

240 byte By Homogenn at 2007-11-25 11:26:48
In Visual Studio '05 (Professional Edition (the Microsoft Academy version, if that makes a difference)) is there any way to make VS count the total lines of code done in a project, or is it required to use a 3rd party program for that?

Sin & Cos

83 byte By dewoul at 2007-11-25 11:26:52
How can rappresent sin^-1(X) in c#? And Cos^2(X)?<br/>^= high<br/>Thank's

How do you make a form with movable / resiable components.

401 byte By DeepT at 2007-11-25 11:26:54
For example I have a form and I would like someone to be able to drag an edit box around or resize it. Or if I resize the form in general, that everything will scale up. Right now the only resizing I can do is just make the form bigger and nothing under it scales. I also tried to enable resizab...

C# and Windows

1532 byte By Noface at 2007-11-25 11:26:57
Hey,I am writing a program that will basically display alerts when xyz is contained in an XML, nothing new or major here. I am new to C#, (New? Never used it) and was wondering would this be a good language to use for what i'm trying to do.I implemented the whole thing (Almost!) in Java, until...

C# and ActiveX params from html

628 byte By raindog at 2007-11-25 11:27:01
Hi,how can i read the param values from the html and pass it to the activex object or how to read it from within the activex object. <object name="secondobj" id='TestActivex' classid='CLSID:A47C22B1-3CC3-45bc-801E-3FCC4FFD3E45' codebase='DownloadDeployer.cab#version=1,0...

Menus

215 byte By asantavicca at 2007-11-25 11:27:05
How would I go about creating some drop down menus for my program? I'd like to have just a basic "File" and "Help" drop-down menu at the top of the screen.<br/>Is this as easy to do as everything else is?

Data Implementation in C#

2038 byte By ronmoles at 2007-11-25 11:27:19
Hello All.As someone who has spent years doing procedural programming (C, asm), instead of OOP, I am struggling with how to design/implement my data. C# seems (at least to me) to want to tie the data to a form. I "think" I need something a little more global in scope.I'm trying to modify an e-m...

Calculating Percentages ??

1152 byte By ryno3185 at 2007-11-25 11:27:31
I need to calculate and report the percentages of the code below. I know a percentage will be (n / t * 100) where n is the count for the given value and t is the total length of my array, but I do not know how to implement this. Any ideas or websites i could be directed 2?? Thankspublic class Numb...

how to add to the log

211 byte By nazgul27 at 2007-11-25 11:27:33
hello,<br/>I have a main form and a listbox on the form. What should I do to make it so that I am able to add text to this listbox from any place of my program? From any class, any thread..<br/>Thanks

Converting Packet Log Data into C# Code

327 byte By iNDRLM at 2007-11-25 11:27:44
Morning all,Was wondering if anyone could point me towards some more indepth documentation of taking packet logs from a game and being able to convert them into code that would react and do the same way, as this will become my main area of interest.All help would be appreciated.RegardsiNDRLM...

Usage of Destructors

391 byte By maverick786us at 2007-11-25 11:28:00
Why is it advisable to avoid use of Destructots in C# Specially in ASP.NET. I got a class in which we initialized some blocks memory in the contructor and when the object is destroyed the only way to deallocate the same block of memory is by clearing that memory from garbage in Destructor. But gener...

Object Serialization in C#

307 byte By surendra.aluri at 2007-11-25 11:28:25
Object Serialization * How to serialize/deserialize objects to/from disk files. How to store the data in a binary file using Object Serialization. Will anybody help me regarding this. i need this urgently. Will anybody please send the example of this. thank you....

Constant Members

140 byte By maverick786us at 2007-11-25 11:28:30
Where do we initialize constant members of class in C#?? In C++ we use Data Members Initialization List. But in C# do we have such concept??

Passing a C# OnPaint DeviceContext to a C++ Dll? / Painting a part in c++

1545 byte By mindthegap at 2007-11-25 11:28:31
Hello,I have a class in which I have overriden the OnPaint function.In this function I do a lot of painting and what a part of it to be done in a c++ dll of mine.The C++ Function is declared as follows:C# Side:======[DllImport("MapPanel.dll")]public static extern void DrawSomething(IntPtr hDeviceCon...

Use property or field

685 byte By gajesh at 2007-11-25 11:29:45
Hello,I am having one private field which is encapsulated in public property.As i can modify the field using the variable itself with in the class and through property outside the class.Here the question is how should i modify the field...??1)Through the property always, within the class or outside...

Communication Between Two WCF Services

948 byte By battula32 at 2007-11-25 11:29:53
Hi,I have two WCF Services say Ser1 and Ser2. Both services are running in two different machines and both services are Windows services. I want to communicate those two services. Is it possible?.Here Clien1 is client to Ser1 and Client2 is Clinet to Ser2.Cliet2 Reqeusts/Sends data to Ser1 through S...

Calling one Constructor from another

779 byte By ireland at 2007-11-25 11:30:06
Is this correct? or how should I do this. The first constructor is called, it does some manipulation of the varialbes and then calls the other constructor overload, which in turn calls the base class's constructorpublic class MySoapException : SoapException{ public MySoapException(string messag...

GIF and pictureBox

324 byte By skuanet at 2007-11-25 11:30:20
Hi all,I have an animated Gif to display in a desktop Windows application.I am using the PictureBox control but it doesn't work.The form containing the control is not able to start.Do you know if it is correct to use the PictureBox control to display an animated GIf??Many thanks...

Stream MPEG4 through USB

260 byte By jdyoungb at 2007-11-25 11:30:40
I am working on a project that specifies streaming MPEG4 through the USB port. I have looked for hours and can not find any methods to do this. I have worked with C# for several months but am not sure if there is a way to do this.<br/>Thanks for the help.

MaskedTextBox Mask includes an A

242 byte By patrickcbrown at 2007-11-25 11:30:49
Hello<br/> Anyone know how to get my MaskedTextBox to include the letter A as part of the prompt instead of part of the Mask? I want to have a prompt that says "Angle:___" but it shows up as " ngle:___"<br/>Thank you<br/>Patrick

Creating a hidden folder

48 byte By JenniferBabes at 2007-11-25 11:30:52
Does anyone knows how to create a hidden folder?

Creating a file from a stringbuilder

1056 byte By ntfishersdk at 2007-11-25 11:30:53
Ok this is question is really not a big deal but is something that i am curious about. StreamWriter uses an underlying instance of the StringBuilder object. But in my application i am iterating through a collection of data coming from the data base with a foreach loop and creating the contents of my...

IDisposable and the Using block

6760 byte By Arjay at 2007-11-25 11:30:55
I wanted to mentioned leveraging IDisposable, the using block and destructrors in a reply to the Usage of Destructors ( http://www.dev-archive.com/forum/showthread.php?t=436578) thread, but felt it would be a bit of a highjack, so I decided to start a separate thread.This is a bit of a long post, but...

UNIX and C#

331 byte By kenrus at 2007-11-25 11:31:02
Is C# a "windows only" programming language or are there compilers available for other operating systems - especially Linux and UNIX.If other operating systems are supported, how do they handle the .NET framework requirements?Obviously, I have very little knowledge about C# and any info is greatly a...

3D Game engine

705 byte By dahwan at 2007-11-25 11:31:07
Some people in this forum, like JohnyPoet and mutantfruit, knows a lot about my lvl of programming skill. In fact (because they're pros) they know more about my programming than i do.So do you guys think i would be able to make a game engine? I am really looking forward to making my own game. I...

exposing the DAL

833 byte By sudheeratwork at 2007-11-25 11:31:09
I am designing the BLL and DAL for a web application that is being build with .net 2.0 tech. We use only one data source (SQL Server 2000) always. The ways of calling the DAL that I can think of are: 1. including the DAL namespace in BLL and instantiating the DAL objects. (early binding) 2. defining...

Help

438 byte By novasheep at 2007-11-25 11:31:10
Hello, I am trying to upload a file to a website using just C#. You see my C# program needs to be able to upload a file to a online directory. Is this possible and how would I go about doing this?If that is not possible, Is there a way using .aspx to get a list of files in a directory and then save...

[RESOLVED] Enum.Parse Not Working...

1854 byte By Kensino at 2007-11-25 11:31:18
According to MSDN I can use Enum.Parse to see if a passed string is either one of the named consts or a value for a named const in the specified enum. But this code doesn't work correctly. using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.D...

Custom Script Parser

370 byte By code? at 2007-11-25 11:31:27
Could you make your own custom script parser?Ex: <MyScript>Print("Hello");</MyScript>How would you go about doing this? Would you have to have lots of switch-case or if-else code blocks?Or turn..function Eat(){DoStuff();}into C# code that you can look at in a function list while debuggin...

UpdateCommandUI

312 byte By zvenny at 2007-11-25 11:31:33
Can anyone please explain to me the purpose of UpdateCommandUI ?I'm trying to update UI items (e.g. menu commands) as I was able to do so withUPDATE_COMMAND_UI in MFC and guess that UpdateCommandUI is a way to do it in C#.Unfortunately I cannot find a clear example that shows me how :(...

Printing in C#

349 byte By gajesh at 2007-11-25 11:31:37
Hello,I have never used the printing functionality in C#. I am having a data grid which is having 3 colums. I want to print one column out of three and some more custom data with this column. I want to print the data in tabular form with some header lines like "Name", "Date" etc.How do i print in C#...

C# 64-bit DLL?

750 byte By George2 at 2007-11-25 11:31:38
Hello everyone,I am using C# to develop DLL using Visual Studio 2005 and .Net 2.0, and I have no idea of how to make my DLL work with applications on 64-bit platform. Above all, I do not utilize any new features in my DLL of 64-bit. So, I want to check the general rules,1. For C#, is there a need to...

Assembling 32 bit value

322 byte By zvenny at 2007-11-25 11:31:46
I'm looking for a way to store a byte , sbyte and UInt16 in a 32 bit variable in a way that the hex representation looks like bytesbyteuInt16. e.g.byte byVal=10; //16#0Asbyte sbyVal=-1; //16#FFUInt16 usVal=512 //16#0200;would then result in the following 32 bit variable 16#0AFF0200 !Anyone ?...