Answer Questions
jiggs Interacting with an external application (process)
Hello! I'm trying, with VS.Net 2003 and C#, to call an external command line application and retrieve the output several times during its execution (that can be long), so I can track the process and give the user an estimated time to complete. What I did: I created a process and a timer with 500ms tick. I start both at the same time and every tick I read the process' output. The problem: everytime I try to read the output using "StandardOutput.ReadToEnd()", the application freezes and only resumes when the external application is done. Using the search on this forum I found out that I had to use "Application.DoEvents()", so the application could resume the message queue, but it didn't work. So far, that's what I'm doing ...Show All
FourBlades simple console question
I have a simple console project that I want to pass 2 arguments into. Here is a simple example of the code that I have. static void Main(string[] args); { string somevar = args[0]; string somevar2 = args[1]; doSomething (somevar, somevar2); } I want to run the program like this. C:\testapp.exe "C:\documents and settings\administrator\application data\testapp\" "C:\documents and settings\administrator\application data\testapp\toBeUploaded.zip" I tried it with and without the quotation marks but it appears that the program is only getting C:\documents for the first string and "and" for the second string. How do I get arount this yes it seems that the command is too long and I am ...Show All
hostile17 Windows Service Won't Start Automatically
I created a Windows Service application in C#. It is installed as service that runs in the LocalSystem account. The start type is set to automatic. When I reboot my machine and bring up the services manager, it shows that the service is "Starting..." After a while, when I refresh the services manager the service reverts from "Starting..." to blank. I have the option to start the service manually. When I do, it suceeds and changes to "Started". Any idea why my service won't start automatically Could it be that the startup times out if it takes too long to automatically start a service I tried having my computer reboot if my service fails to start (through the properties, recovery settings) ...Show All
globemast How to populate a treeview recursively?
I have a category table: CategoryId CategoryName ParentCategoryId I will return this data to the code-behind in a dataset or datareader. The tree will probably never be more than 3 or 4 levels deep. Can you show me a code-behind method to use this data to recursively populate a treeview This is a Sample Code for achieving this. If any queries mail me at :sudhi3000@gmail.com /// <summary> /// Loading Categories to the Tree view when Form Loads : /// </summary> /// <Author> Sudheesh .V </Author> ///<eMail>sudhi3000@gmail.com</eMail> private void LoadCategoryToTreeView() { tvwCategories.Nodes.Clear(); node= new TreeNo ...Show All
Tiptup300 textbox text to string and back to textbox?
Im pretty new to C# and I am guessing there is an easy answer to this. I am entering a number in a textbox doing a calculation and and then putting that into another textbox. However I am getting the "cannot explicitly convert type string to float" error Is there an easy way to autoconvert the text to a string Better yet how do I force the textbox to only accept strings I tried applying a mask, but could not get it to work. Here is my psuedocode: float discountrate = textBox1.Text; // perform some type of calculation with discountrate textBox8.Text = discountrate; Thanks in advance Text property is of type string, so you cannot assign data isn't, so it will always a string. User can only type ...Show All
Gabriel Mu&#241;oz Luna Navigation Bar not showing Types, Navigation Bar is enabled
Hello, My navigation bar is not showing available types for C# files. I do have Navigation Bar checked for C#, and still nothing. Any clues Hello All. JoeProgrammer: Alright, this an ASP.NET Web app Well, then I'm afraid the short answer is : Yep, you're right. ASP.NET has its own forums, here . See this thread on those forums for more info. From what I gather, it is simply a question of different language implementation teams at MS. HTH. Thank you Mark Hello All JoeProgrammer: You're welcome. Hello All. JoeProgrammer: So, what you're saying is that when you open a class file (*.cs), the Navigation Bar is shown, but that ...Show All
gb711825 Register
Hi. I want to make a registration programme that takes windows key, not the serial no. Beacause I want to know if the programme is moved to oneother pc. How can read the windows key with c# Also I want to write and read from the windows register. How I will do it How can I know that my programme runs in the same pc as it was On reading and writing to the register, the following help topic might be a good place to start, if you are looking for code samples. The C# code listings on the following page should give you some clues. http://msdn2.microsoft.com/en-us/library/microsoft.win32.registry.aspx ...Show All
Nigel Sykes on creating MDI forms
I created a MDI parent form but when I placed 2 MDI child form under the parent form and ran the application, the vertical and horizontal scrollbar appeared How to make those scrollbars disappear from my MDI parent form thanks in advance :) In the click event handler of the button in the first child form (i.e. f1) use the code something like below. frmChild2 f2 = new frmChild2(); f2.MdiParent = this.MdiParent; f2.Show(); (Assuming frmChild2 is the second child form) Jus that i have assigned the MdiParent property of the current form (say f1) to the target form that is intended to appear! If this is not the requirement that you need, plz feel free to get back... Cheers, Venkat ...Show All
JawKnee how do i call/define a new dll from my application
i created a dll (assembly) that includes utilities that i want to call from within my application my dll is named my.utility.dll do i specify it like all other assembly / references (i.e.) using system.web.etc; using system; using my.utility; or what do I do where do i place the my.utility.dll file thanks Rob You should add reference to my.utility.dll to your project before you can declare "using my.utility", if you're using visual studio express / 2005, you can add reference by right-click at your project [in solution explorer window] -> Add Reference -> Browse your dll hope this helps ...Show All
Fahad349 Which software for my application?
I want to learn how to develop Infrared (IR **radio transmission) products for racing, such as is found on items such as oval track, non-contact timing systems. What would be the best software for me to learn for these applications TIA Can you give me any pointers on what to read, what sites to access, etc. to learn more I used VB6 to develop communication with hardware RF radios through a serial port. The VB.NET and C# both support serial ports (with the SerialPort control in the toolbox) to access hardware. If you connect your app to the hardware this way, it could send any messages you want. You could also use .NET compact framework to deploy it on a smartphon ...Show All
StevenR2 events for array of buttons.
dear all I have an array of buttons pbuttons (nearly 40 of them). I want to have click events for these buttons can someone tell me how to do that for a array of buttons thanks in advance, prasad.. you are a gem. that worked just perfect I just forgot the casting of sender as button. I am learning slowly for sure...:) you could make 1 event handler and do it that way. Example: Button[] myButtons = new Button[10]; for(int counter = 0; counter < myButtons.Length; counter++) { myButtons[counter] = new Button(); myButtons[counter].Name = "btn" + counter.ToString(); myButtons[counter] += new EventHandler(MyBut ...Show All
Bulldog.NET Get GPS Unit's Baud Rate
Hello, currently I have an app that has a built-in bluetooth device discovery system to simplify the process for our users, I am using the 32feet.net assembly for this. My question is this: can I use a network stream object from an authenticated bluetooth connection to receive NMEA data or do I need to pair using the 32feet.net assembly and then open a serial port connection with a COM and Baud Rate If the latter is the case, is there a way to find the baud rate of a paired bluetooth device Thanks Hi, Please go through the following link. Hope it helps. http://msdn.microsoft.com/library/default.asp url=/library/en-us/wceddk5/html/wce50conBluetoothStackArchitecure.asp thank you, bhanu. ...Show All
Heilke make default webbrowser, and publish problem
hey i just made a simple webbrowser (using IE activeX) an i want to use it as default Webbrowser, how can that be done. i read something on a post that it can be done with the registry key, i read something on this link but, i didn;t understand many (visual basic ) this is the link... http://support.microsoft.com/default.aspx scid=kb;en-us;299853 isn't there anything easyer or made in C#. btw i have another question, at my borwser i used some pictures on buttons but when i publish project it;s not working (only when i deselect pictures form buttons) how can i make the publisher to take the pics (they are imported local resources should i use project resource file Resources.resx and import them there) And for t ...Show All
ershad Fade background like WinXP
I would like to simulate WinXP shutdown's background fade to grayscale. How can I achieve this on my app's quit when I ask user "are you sure you would like to quit" else return to full color. Thanks for any ideas Hi, Did you manage to simulate it Bhanu. No Bhanu, I did not get it. But I hear that colormatrix/saturation is the way to go. If you play with form transparency you will get simular behaviour but not same. how 'bout trying and capturing entire screen to bitmap, drawing to fullscreen and then showing your form / message box above it ...Show All
Mike McGrath New Developer
Hi there, Not sure if this is the correct place to ask this but anyways. I'm trying to get involved in the developer community and gather some general experience coding (original plan was to help on open source projects), I know Java, some C++ and currently learning C#. Main focus would be C# for now. Finding it hard to locate a decent starting point so could I get some ideas or links to get me going Hey thanks for the link it looks good, however I was hoping for more advice on how to get involved in projects and less on actual learning resources. Its just looking for a place to put my skills to practice is what i'm after. Hi, Welcowe Its always nice to parcitip ...Show All
