No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
50 Posted Topics
Hello, I try to catch the HTML code from a webpage after I have logged in to a page. HTML is returned but that is the orignal HTML only BEFORE I logged in. For example I try to find "Log out" and other content in the string "getDocumentHTML" returned which … | |
Hello, I use the webkitbrowser which is simular to the webbrowser. Now on a website, I want to programatically insert a string into a textBox. This I have succeeded to do like this: webKitBrowser1.Document.GetElementById("txtbox1").SetAttribute("value", "hello"); After this I will need to programatically click a button that will check that "hello" … | |
Hello, I have an application that is not mine, that has 6 textboxes with values on it. I am trying to use the windows API to retreive the values from those textBoxes. I know that they exists in a control named "Panel1". So I have come so far in the … | |
Hello, I wonder how it would be possible to get text from a datagridview in another form application? The datagridview has 5 rows and 5 columns with text in each cell. I know that this could be achieved with windows API but googling around I have not understand how to … | |
Hello, I have a question about the webBrowser control. It does work good to display webpages but it seems that the control have problem to display certain webpages. (I think it has to do with javascript on the webpage). When trying to display this webpage, it will not FULLY load … | |
Hello, I am trying to find all possible operative system/router/adapter reasons what can cause internet to stop connecting. The goal is to create code that check for all those reasons and programatically resolves those issues. I have found 2 codes that do reconnect the internet connection if not connected. Example … | |
Hi, It is possible to open a webbrowser window with the below code. I wonder how it would be possible to have the web browser docked at TOP of the desktop and have the window stretched to LEFT and RIGHT of the desktop and also how to choose a HEIGHT … | |
Hello, I wonder how we can use lock objects between 2 different applications. In the example below we can use lock objects to let only one thread to execute the code inside the lock object at a time. This works fine within one application. Now I wonder how we can … | |
Hello, I will try to ask this question very straight forward to not complicate the example. As seen the an event called currentTime is located INSIDE a public class EWrapperImpl. The functions comes from a DLL reference file that I code against. By default it seems that the currentTime(long time) … | |
Hi, I get an error when trying to compile a class that I have created: "EWrapperImpl.cs" **Error: TestCsharp.EWrapperImpl' does not implement interface member 'IBApi.EWrapper.currentTime(long)** It is documented in an example that: "you need to provide at least an empty shell of the method declared in EWrapper" but I don't know … | |
Hello, I have a very strange problem. I have created a code that I beleive is multicore/parallell threading to make a task to run faster using more cores in the computer. **My computer is a server: 32 cores (2 CPU with 16 cores each) 32 GB** Refering to my code: … | |
Hi, I wonder if the below code I have take up "2 threads" on the processor. In the Form1_Load event I call "startProcess". That process starts a backgroundworker in a separate class. The process also monitor callbacks from the backgroundworker. This is what makes me wonder if this takes up … | |
Hello, I have an instance called "Instance". From the button event I try to create 2 Instances of "Instance". I want those 2 Instances to be completely separate from eachother in terms of the variables that exists inside "Instance". So for example you can see the List variable: "instanceValues" However, … | |
Hello, I am trying to restrict to maximum type 60 words in a textbox. I have tried to put a code that check if we have more than 60 words. The code restricts to 60 words but when I loop the textboxes words and put back the string (up to … | |
Hi, I wonder if it is possible to put a "Twitter Follow Button" on a windows form application? Usually I have this code on a ASP.net webform. <a href="https://twitter.com/_TwitterName" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false"></a><script> !function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (!d.getElementById(id)) { js = d.createElement(s); js.id = … | |
Hello, I am trying to declare a 2D List Globally. I beleive I miss something out in my declaration. It seems that I can declare the list. But when I try to add 1 dimension to the list, it only accepts: "new Requests.GlobalVariables.list2()" when it should be: new Requests.GlobalVariables.list1() I … | |
Hello, I have a little problem with a timer that I have set up. I use Thread.Sleep(). What I am trying to do, is to let a code run exactly when a new minute occurs on the millisecond (0 millisecond). I have tried to set it up below and test … | |
Hello, I wonder if 2 backgroundworkers which are asynchronous can call the same function like in the code below. What I wonder is if the function is called Exactly at the same time from 2 workers. Can anything go wrong here or is this not a problem. I am not … | |
Hello, I wonder if there could be faster way to convert a string to .Double() and Int32(), then the methods below? The code below takes approx: 7000 ms //7000 ms String number1 = "21.58"; String number2 = "21"; double getNum1 = 0; int getNum2 = 0; DateTime dt = DateTime.Now; … | |
Hello, I wonder if there is any faster method to find an index of an occurence within a string? The .IndexOf method in the below test, takes approx: 1050 milliseconds. Why this is interesting is that I have code that uses .IndexOf on perheps 100 places and have loops that … | |
Hello, I have just bought a "USB Network server": http://www.conrad-uk.com/ce/en/product/992249/LOGILINK-4-port-USB-network-server I have attached a harddrive to the USB Network server and the USB Network server is connected to the router. I use 2 computers that needs to use the harddrive at the very same time. However the software that connects … | |
Hi, I wonder how it would be possible to set a "string" in another application. I know the "MainWindowTitle" as my code goes below but I dont know how to set the text in one textBox that exists there. The thing I have to start with is the below but … | |
Hi, I wonder how the SendMessage method is used. I have googled around but can´t find any straight forward method of how to just send a String to another application. I have 2 desktop applications with a Form handle named: "Application1" and "Application2". I wonder how I will pass the … | |
Hi, I have a special problem that I wonder how it could be possible to solve. I have 2 backgroundworkers that I know are, asynchronous events. I start the 2 backgroundworkers with the startButton. The workers have a loop with Thread.Sleep(1). With the setFlagButton, I set the variable like this: … | |
Hi, I wonder if this namespace is possiblet to use. However I cant find ::Messaging in System::Windows ? I do use this namespace in Silverlight to mention. Is there a assembly etc to add to be able to use this? System::Windows::Messaging | |
Hi, I have a code that checks if one specific process is running in the TaskManager with the code below. If not the function will start this process. The code I use in a Form_Load event when the application starts. (Working code is below) What I initially wonder is instead … | |
Hi, I am starting another applicaton with this code below. When starting that application it is called "javaw" in the ProcessesTab in TaskManager. I simply wonder if it is possible to give this a choosen name in taskmanager under ProcessesTab when starting an application like this with the below code. … | |
Hi, I have encountered a problem. I am checking if my application "testApp" is found in the ApplicationTab in TaskManager. The code below works 100%. But the problem is this when you just "rightclick" with the mouse on the "testApp" in the Taskbar, this code will produce the file and … | |
Hi, The below TimeZone code returns the following string: "(GMT-05:00) Eastern Time (US & Canada)" TimeZoneInfo FromZoneID = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"); What I wonder how it is possible to do is how I create the TimzeZoneInfo object by using the string directly. I have tried this but it doesn´t work. … | |
I have a mathematical problem that I am not sure how to solve. I am trying now but still cant find a solution. What I is doing is this: The example is that I have a number: "129" that I will need to round down to the nearest value. The … | |
I have two processes where the First process sometimes is writing to a file and the second process is reading this file. For the second process I wonder if it is possible to only read the file if the First process does not use the file. How would it be … | |
I have searched for a way before what the most effective way and in this case important the fastest way is to seek backwards in a file to read the very last line in a file. Like in this case I want to search from the end and backwards to … | |
If I have two dates like this, I wonder how it will be possible to count how many of these days that are: Monday,Tuesday,Wednesday,Thursday,Friday The dates are for example: 11/01/2009 11/18/2009 | |
I am looking for how it is possible to calculate the difference in minutes for a date and time. This example will cover the problem. [B]20091118 18:15 20091125 01:35[/B] I know this is possible using Date functions and TimeSpan but trying to find examples but cant find an example of … | |
I think I am missing out some logic when it comes to the backgroundworker. For this scenario. I am using a loop in the backgroundworker. Each loop I am calling an event that is writing values to a file. After writing these values, I am increasing updateValue. The problem is … | |
Hi, I wonder what the way is to remove dublettes from a List. ? I have filled a List like this: [code] List<String^>^ List1 = gcnew List<String^>(); List1->Add("123"); List1->Add("124"); List1->Add("123"); [/code] | |
I wonder if there is any function that returns the difference in minutes for examples like this: 1300-1515 (135 minutes) 2350-0100 (70 minutes) Is there any timefunction that can have the ability to return the minutedifference ? | |
I wonder for something. If it is possible to replace for example * with any kind of variable that holds either: + - * / Something like: [code] Variable = *; double Number1 = 5; double Number2 = 10; double NewNumber = 0; NewNumber = Number1 [B]Variable[/B] Number2; [/code] | |
Now I use a C++ code where I save a color like this: [code] public: System::Drawing::Color ColorSaved1; ColorSaved1 = textBox1->BackColor; [/code] I wonder how I can convert this to C# ? | |
[B][/B]I have a native code that I am trying to convert to managed code. I have a vector where I use a comparer to sort it in this code: [code] struct Sorting1 { bool operator () ( const std::string& a, const std::string& b ) { std::stringstream as( a ); std::stringstream … | |
I have a file that consists of dates like this: 12/[B]01/[/B]2008 12/[B]02[/B]/2008 12/[B]03[/B]/2008 12/[B]04[/B]/2008 12/[B]05[/B]/2008 Now if I will read this file from beginning to end, this is a solution: [code] String^ FilePath = "C:\\DateFile.txt"; String^ GetLine = ""; StreamReader^ Read = gcnew StreamReader(FilePath); while(Read->Peek() >= 0 ) { GetLine … | |
I am trying to declare dimensions like this but this example does not compile. I think the declarations might be something wrong with but cant figure it out what it can be: [code] class Dime1 : List<String> { }; class Dime2 : List<Dime1> { }; Dime2 Dim3 = new Dime2(); … | |
How is it possible to check if a String is a valid number. The number can be both an int or a double like: [code] String^ ValidInt = "5"; String^ ValidDouble = "5.01"; [/code] | |
if I have textBox with a couple of lines, how would it be possible to read line by line in a List<String> ? [code] List<String^>^ ReadEachLine = gcnew List<String^>(); [COLOR="Green"]//How to ->Add each line from TextBox1 ?[/COLOR] [/code] | |
I have a native code snippet that I am going to write in managed code instead. The native snippet code look like this: [code] std::string RClammer = "]"; std::string BigLine = "aaaaaaaa]aaaa"; int pos = 0; while(std::string::npos != (pos = BigLine.find(RClammer, pos))) { BigLine.insert(pos + 1, " "); pos = … | |
I am about to convert this 2D vector to managed code where I instead will use a List<String>. The problem is that I dont know how to do that, I would be happy to see how that could be done. [code] std::vector<std::vector<string> > vector1(1000, std::vector<string>()); [/code] | |
I am using GetFiles(string,string) to find .txt files in folders. The code that I am using look like this: [Code] folderBrowserDialog1->ShowDialog(); System::String ^ files3 = folderBrowserDialog1->SelectedPath; this->textBox1->Text = Directory.GetFiles(files3,"*.txt"); [/code] The compiler says that "Directory" is a undeclard identifier and left of .GetFiles must have class/struct/union. I am not sure … | |
Any ideas how this could be converted to a std::string(). So files8 will be converted to a std::string() [code] System::String ^ files8 = folderBrowserDialog1->SelectedPath->ToString(); [/code] | |
I am using this code inside a button. When clicking the button I browerDialog appears. I can now browe to a folder and press OK. The Directory will be inserted in the textBox1. What I now want to do is this: Inside of this Folder I have a .txt File. … | |
Hello everyone. I have attached a folderBrowserDialog1 to my Form1. To a button I will do a function. What I will do now is when I press the button, I want to open this folderBrowserDialog wich works fine. After this I will click on a folder wich contains *.txt Files … |
The End.