1140 byte By
peter449 at 2007-11-25 11:07:11
so i have to make a windows application that displays 2 texts over and over again using a button in the interface, and i think i need a loop, but not sure how this is done for text./codeusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;u...
767 byte By
KB1IBH at 2007-11-25 11:07:25
ive got a program set up so that when i run it, it will run a batch script... whenever i run the program, it seems as though the script runs fine, but anything that i put into the script doesnt get executed... ive tried having it run an exe, when i ran it through windows, it worked, but didnt throug...
mshtml.IHTMLDocument2 HTMLDocument = (mshtml.IHTMLDocument2)axWebBrowser1.Document;mshtml.IHTMLElementCollection links = HTMLDocument.links;foreach (mshtml.HTMLAnchorElementClass el in links){}Im trying to get the links from a webbrowser controlhelp with this is greatly appreciated!...
354 byte By
Visslan at 2007-11-25 11:07:41
I have an application that has two iFrames C and W. Now I want to use enum to enable controls depending on what iFrame is running. I have been told to use enum. This is how far I have come. How do I go forward?public class Application{ public enum ClientType { C , W }; public Application() { }}...
EDIT: solved: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2218770&SiteID=1&mode=1I looked over operator overloading examples but i still can't see how can i overload >= for instance to work with ctrlInst1.Location >= ctrlInst2.Location. Anyone has some thoughts?So far derived fr...
1221 byte By
JACKWEBS at 2007-11-25 11:07:45
The following code picks up pasted files and runs relevant events.However, when I copy a file from one location to the folder being watched, it doesn't do anything. ANy ideas? private void SetupWatcher() { // Create a new FileSystemWatcher and set its properties. //watcher.Path = @"C:\tes...
I have created a COM server in which a collection of vectors need to be exposed to C# sharp client . Each vector contains a array of structures and this vector need to be embedded inside a container, say another vector or list. Code: typedef struct { std::string name; std::stri...
Hello folksAs I just started to discover C# Express this is probably a very basic problem :blush: :I started up a new windows application project. I would like to use the SourceGrid Control ( http://www.devage.com/Wiki/ViewArticle.aspx?name=sourcegrid&version=0) within my application. So I added the...
I am having to find the time since the last reboot of a machine. I am able to find the time of the last reboot using the code below. However I have seen code where they have simply querried the OS and gotten the time since last reboot. That seems a lot simpler. Can anyone point me to an example o...
I have datagridview and I need to set the cell text to either Y or N. It is databinded to a business object.grid[columnIndex, rowIndex].readonly = false;grid[columnIndex, rowIndex].value = "Y";grid[columnIndex, rowIndex].readonly = true;When the cell value is equal to "N" and it passes the code, the...
339 byte By
nodo at 2007-11-25 11:08:32
How do I make a profesional or 3d menu strip? I am using Visual Studio 2005. I look around and try to set in property but could not find it. If I look at IE, there is at least a bevel divide line in between menu strip and menu button. Do they have this in tool box? I am attaching my project alo...
1122 byte By
pre_wreck at 2007-11-25 11:08:41
I have here a piece of code that swap two numbers. whether its a string or and integer.I would like to ask if theres an equivalent code for c#? If yes, then how can I do that?Thank you // This method will swap any two items.// as specified by the type parameter <T>.static void Swap<T>(re...
Hi, i'm learn C# and currently using the Visual C# 2005 Express Edition and i have question regarding the behavior for floating point number calculation. I have the following variables:public float totalPurchase;public float totalCash;public float totalReturn;public float totalVoid;public float...
600 byte By
rgalopo at 2007-11-25 11:09:06
Hi All!Im developing a multithreading C# application in which one I invoke several web service methods in the same machine. Those web services have been developed with java / Apache web server, and I cant change them. My problem occurs sometimes in Windows XP, when I invoke a web service method the...
699 byte By
sagym at 2007-11-25 11:09:15
Hello all,I'm trying to write a program which will be able to read a list box in an external program using WinAPI.I'm using sendMessage function:public static extern IntPtr SendMessage(HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam);and want to send the LB_GETTEXT message to the wi...
2933 byte By
dahwan at 2007-11-25 11:09:16
This code is suposed to be my advanced calculator :)But an unidentified error strikes in this areaprivate string Calculate(string calc) { string Result = ""; try { string[] PlusParts; string[] MinusParts; string[] MultiParts; string[] DivParts; string[] Buff...
3954 byte By
JACKWEBS at 2007-11-25 11:09:21
I have the following code, which is supposed to run a DTS package:namespace ... etc. public class Service1 : System.ServiceProcess.ServiceBase { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; FileSystemWatcher...
1556 byte By
JACKWEBS at 2007-11-25 11:09:23
AT the top I have:namespace DTSServiceforCCApp{ public class Service1 : System.ServiceProcess.ServiceBase { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; FileSystemWatcher watcher = new FileSystemWatcher();...
251 byte By
Lurken at 2007-11-25 11:09:34
I can't see the benefit of using finally over omitting the clause altogether.<br/>I mean, the code below try{} is executed no matter what.<br/>Of course there is a reason for it, I just dont know what. Would be great if anyone could explain.
Hi,I made this little tool that opens a database and allows the user to edit it. After this he might generate some output, depending on some options set. I would like to run this program automatically, for example from the command line. What would be the best approach here? Obviously I don'...
posted removed - just can't find way to delete.
620 byte By
JACKWEBS at 2007-11-25 11:09:48
I have a Windows service that scans a particular folder and whenever a file is created, it fires off a DTS process on the SQL server. This works fine when I create a file on the server directly.However, if I open up WIndows explorer on a remote machine with xx.xx.xx.xx\foldername and then copy it on...
710 byte By
DeepT at 2007-11-25 11:10:12
I have this project where a user can select a bunch of objects to use and some of them need custom information. I figured I could use a tab control, and then have each object (if it needs it) add a tab page IF the user decides to use it.The only way I know how to design a tab page is to make a for...
I'm just wondering, and this is more of a design issue than anything, but what is generally good design and etiquette when using try-catch-finally blocks? I mean, you can do it a lot of ways, from encapsulating two lines of code in a try block and catching any error, or putting 30 lines of code...
111 byte By
winprock at 2007-11-25 11:11:00
Please see the attach file, is it a Tree View? ListView?or else? Maybe I have to make it myself. Right? Thanks.
1290 byte By
migee at 2007-11-25 11:11:16
I feel like I should know this really easily but I cant figure out how to do it.Basically I have an entity, lets say:public class MyEntity{ public string somevar = "whatever";}and one that builds onto the functionality of it.public class MyExtendedEntity : MyEntity{ public string somevar2 =...
Hello Everyone Does anyone know the trick to get the distance between the top of the Button.Text and the Button.Top? I am dynamically creating some buttons and want to ensure that they appear properly, the text is not known until run time so I have to dynamically set the Width and Height of the b...
hello, maybe you guys can help:i am trying to retrieve the registry main hive names and put them into an arraylist. it does not work. funny thing i managed to retrieve the subkeys and populate the arraylist, but i dont know how to retrieve the main hive names themselves.here's the codeMicrosoft...
83 byte By
dahwan at 2007-11-25 11:11:41
What the heck do i do when the stupid Debugger only tells me "error in application"
357 byte By
atkin at 2007-11-25 11:11:42
Hi I am trying to write unit test for my library that has class decorated with SecurityAction.LinkDemand and the public key WHen i run the unit test i get an error that there is no appropriate constructor. Removing this attribute is fine, but wont work against the code i need to test. Using c# 1.1...
Hi everyone :)I'm manually porting some C++ code to C# and am trying to convert some array properties.What I'd like (although this semantically incorrect) is something like this:private double[] m_oWallLoad = new double[10];public double[] oWallLoad [int index]{ get{ return ConvertToMe...
1144 byte By
DeepT at 2007-11-25 11:11:49
I have a form with a tab control that is dynamically filled out. It is filled out when you select some objects from a listbox on the same form. When you select an item that has some special input needs, a tab is added and you can edit whatever data you need. If the object is unselected it is re...
Hello Friends,<br/>HOw to search a text in DataGridView Control and highlight the row.?<br/>Thnx in Advance
112 byte By
ok21 at 2007-11-25 11:12:31
I will be very glad if anybody can send me source code of Portable Draughts<br/>Notification (PDN) support in C#
Hi:<br/>I need to obtain the fully list of users and groups in a Server, like you see on Users & Groups, in computer management of control<br/>pannel. And the user in the particular group.<br/>Any help or idea is greatly appreciated<br/>Thanks in advance<br/>Surya
1131 byte By
asafaa at 2007-11-25 11:12:46
Hello everyone,i made a simple application that uses the SerialPort component.i set the Serial port to :Baud rate = 115200databits = 8DtrEnable= trueHandshake = noneParity = nonePortname = COM3 ( the right one )RTSEnable = trueStopBits = onewhen i connect the modem to COM3 and through the HyperTermi...
I am working on a windows application in VS2005 C#. The problem is that I will read a directory for files. I have a foreach so I can loop al the files in the directory. Know I wil do the same but for the subdirectories also. So I think there must be a second foreach and place the subdir in the metho...
1235 byte By
bacchus99 at 2007-11-25 11:12:59
I'm alittle new to C# but not to OOP. My main background is C++. 2 questions regarding exe/dll interactivity in C#(both the EXE and DLL are written in C# 2.0.NET framework VS2005).1. The EXE will contain the GUI for the users. I need to DLL to be able to notified the EXE when to enable/disa...
Hi allI have a datagrid ('dgIons') with 2 columns.Column #1 is a textbox. Column 2 is a checkbox.I don't want the user to be able to check a checkbox unless there isa value in the textbox on the same row.I tried the following but it doesn't work: private void click_cellContent(...
1246 byte By
w0lfshad3 at 2007-11-25 11:13:21
I am trying to get the nearest control to my mouse pointer in my app but somehow i can't manage to access the right thing. Project: http://files.filefront.com/MyMoO3rar/;8725371;/fileinfo.htmlEDIT: figured out this far that it returns the index from panel1 Controls so i should divide the index...
2179 byte By
justravis at 2007-11-25 11:13:30
Thanks for your time!.Net 2.0Having problems on second iteration of for loop.Output looks like this:arrImgIT[0*2] = 0 = 3 = arrImgI[4+0] = 4 = 3arrImgIT[0+1] = 1 = 0 = arrImgI[0] = 0arrImgIT[1*2] = 2 = SHOULD BE 2arrImgIT[1*2] = 2 = 1 = arrImgI[4+1] = 5 = 2arrImgIT[1+1] = 2 = 1 = arrImgI[1] = 1arrI...
4185 byte By
Kensino at 2007-11-25 11:13:32
I am trying to make a Windows service. It's the first time I've needed to use one. The program will be run on a server and listen to port communication with unlimited clients. The entire program is working, and all network classes work as well but I want to move the code from the server.ex...
194 byte By
winprock at 2007-11-25 11:13:34
When I compile a project in vs2005, it will put the referenced dlls to the same folder with .exe file, but I want to put those dlls in a child folder like "dlls/" , how to do that . Thank you .
351 byte By
asafaa at 2007-11-25 11:13:42
Hi,i know how Split a string with one character :DataString.Split("\r");but how do i split a string with two characters ?DataString.Split("\r\n"); // Errori tried char[] {'\r','\n'}, but it splits the string to parts of \r and \n , but not together ( \r\n);what do i do ?...
650 byte By
visharad at 2007-11-25 11:13:51
There is a picture box in a form. Some drawing objects are drawn on the picture box (e.g. lines, rectangles etc.). I can draw line using DrawLine method. But, suppose on clicking on a particular button, I need to erase a line. I know the coordinates of the line, which should be erased.How do I erase...
Hello Everyone Hey, does anyone know how the System Clock is automatically started? I want to replace it, I know how to kill the existing one and put one of my own there, I would rather use the same mechanism that is currently starting the existing one if I can to start mine in the future. Thank...
Hello,I'm a junior programmer and I'm still trying to learn. My question is this..I need to create a new method called GetAll which I did...using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Text;using System.Data.SqlClient;namespace ExerciseUI...
1151 byte By
w0lfshad3 at 2007-11-25 11:14:12
EDIT2: Found the bug, it's related to the key up logic.Question is though if i use KeyPreview why don't i get the KeyDown event in main form when ckicking over my text box?I'm making controls(StarProduction controls) appear and dissapear on my starMap1.panel1 by pressing space while m...
okay i have a project that im doing and i'm generating sentences, i'm wondering why the same sentence is being generated over and over again.Can someone else compile this and see what i mean. I have a for loop that adds a randomly generated sentence object to a sentence list of 299 sentenc...
222 byte By
visharad at 2007-11-25 11:14:48
The second argument of a mouse event handler is an instance of MouseEventArgs. Its members X and Y give the coordinates of the mouse cursor.<br/>I want to know if these coordinates are screen coordinates or something else?