Answer Questions
shehz Getting applications Paths
Does the System Namespace has something like system.path I need print out the current cs files path.. because for some reason I'm trying to load some images in a program that I'm creating.. but for some reason.. It only works when I add in the full path to it. interesting, it should. It returns a string of the path/location of where your application is running from MessageBox.Show(Application.StartupPath); (or Console.Write) ahmedilyas wrote: or Application.StartupPath Application.StartupPath did nothing for me. I tried printing it out and it didnt print anything out. The path that I am currently working on. (i.e: c:\c-sharp) no worries ;-) got me worried too! or Application.StartupPath ...Show All
BipinP panel.visiable's problem..I've to double click then it works
// in my webpage I put my controls in a panel , when page load I set panel.visable = false. only when botton_click and then panel.visable=true //my problem is panel doesn't appear when I click once. I've to double click and then panel become visiable.. what's going wrong is my problem concern with "post back " I've no idea... P.S... I write panel.visiable while datareader.read() thanks Thank you for replies. The panel visible cannot make it behave that way. So, it's not panel problems. It must be other codes' issue...Could you give the code to find what went wrong Hi, I know what you want can be elegantly implemented with multiview container and view controls ( ...Show All
J.Mathes Build up a variable name with a string
Hi, I wonder if there's a way (in c#) to build up a variable name by the concatenation of two strings...For example int intTest = 1; string strTest = "strTest"; string strTest+intTest.toString() = "this is my new var"; Thanks in advance >> Or in VFP: via macro substitutions-a very nice feature. Well.. that's debatable. I saw them a lot years ago when I was coding in Clipper (which, like FoxPro originally, was a dBase III compiler). I've never seen a good design that used them, but I've seen a lot of bad designs that did. They seem to lead to the "quick shortcut" mentality (*) that just makes mess out of code. Further, it forces the compiler to shutdown and revert back to being ...Show All
airportibo how to load datatable with xml
<tables> <row> <table_name>ticket</table_name> <record_key>68</record_key> </row> <row> <table_name>sales</table_name> <record_key>3001</record_key> </row> </tables> how can i load a datatable with above xml string you could load the xml into a dataset: DataSet theDataSet = new DataSet(); theDataSet.ReadXml( "XMLfile "); does this help you could use a StringReader to read the xml from the string into the dataset. Using your example, this works for me: string theXmlString = "<tables><row><table_name>ticket</table_name& ...Show All
thukralz simulating keystrokes
After piecing together some code I gathered from several forum posts, etc I have the code below. What I was hoping it would do is when the form loads it would fill the textbox with the letter A simulating that the A key had been pressed. It doesn't cause any errors but nothing seems to happen. My ulimate goal is to be able to simulate key presses on other applications to help automate processes (like product imports into our company CRM). What am I doing wrong using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Runtime.InteropServices; namespace VKTest { /// <summary> /// Summary description for Form1. /// </summary> public ...Show All
ArunSingh upload a file to VSS
Hi, Is there away to create a new project (folder) and upload new files to VSS database, or upload new files to an existing project. Not checkin a file. But upload a new file. Thank you when using the word check- in , it means that the file(s) are in vss database alrady and in order to checkin the file(s), user needs to checkout the file(s) before. because if you try to checkin the file(s) that are not checkout, it will not work. And I am trying to upload a new file(s) that is not located in vss database. Thanks, You have to first add that file manually to source safe and then continue with check in and check ...Show All
Aaron Marten - MSFT Infragistics problem
i am getting following run time error in asp.net applicaion i am using infragestic.web.ultrawebgird i have included dll Infragistics.WebUI.Shared still i am getting a error Compiler Error Message: CS0234: The type or namespace name 'Shared' does not exist in the class or namespace 'Infragistics.WebUI.(are you missing an assembly reference ) No its not yet solved. i hv added almost all the dlls of infragistics.. but still its showing the same error. Hi, Is your problem solved Bhanu. You need also Infragistics.Shared.v .dll refererence. At least that one, maybe one more. ...Show All
Mark Jewett - MSFT Run Windows Application From Windows Service?
Hi, I have made a windows service that has a timer checks for a certain time to remind me. Now the time is reached so i want the service to display an alert!! I have made a windows app that shows the alert but when i run it from the service it runs but not GUI displayed!!! I can see it runs from the Task Manager but i cant show the form. So is there any way to dispay i GUI alert from a windows service Thanks a lot Hello Mr TheMaj0r I have doubts on the same topic,But I am new to .NET and I don't have any idea abt .NET remoting ,Can u plz post code How to run windows application from windows service, or Plz give me step by step process How to do it ,I hope u will understand my Request,I will be waiting fo ...Show All
xird Destructor doesn’t function in release mode
when using the following code i get this Exeption (in release mode with debug mode everything works fine): System.ObjectDisposedException: (German)Auf eine geschlossene Datei kann nicht zugegriff en werden. (Englisch translation) Can’t access a closed file. bei System.IO.__Error.FileNotOpen() bei System.IO.FileStream.Flush() bei System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) bei System.IO.StreamWriter.Dispose(Boolean disposing) bei System.IO.StreamWriter.Close() bei Logdatei.Log.Finalize() James Curran wrote: RizwanSharp does a wonderful job -- then slips up at the end. His code never call Dispose() except in the destructor, which means you'll still have the same problem. You have to ...Show All
Leather RTC API on .Net
I am trying to use the RTC Client API from C# and .Net. I can get it to work in STAThread mode but only if there is one thread accessing it through the interoperability with COM. Any other threads get exceptions. The Documentation says that it supports MTAThread in 1.3 but I can not get it to work. Anyone have any luck Thanks Brad ...Show All
Sang Hoang declaring abstract method that receives different parameters
i want to declare an abstract method, just formality since i can declare them with the same name in inherit classes without declaring the abstract in parent, anyway, the problem is that according to subclass type, it must receive different parameters. in both cases they are enum values, but different types of enums for each subclass. i can not declare a 'void' parameter, i dont know if i can declare for example a casting in a declaration, like: in parent abstract something(int someparam) in subclass something ((int) enumtype someparam) is this possible First I must repeats the others' statement that your design is not of much use, but nevertheless, this should work: abstrac ...Show All
Christopher Lusardi Wrapping C++ dll
Hi there! I'm very very new to C#, but I fell in love with it after the first minutes. My problem is, that I have to use some unmanaged c++ dlls. I couldn't find a good how-to about wrapping such dlls. I managed to wrap some classes by inspecting wrappers I found on the net. My problem is that I don't know how to handle something like this: class fooA { ... }; class fooB { const fooA *m_a; const char *m_name; void *m_userData; void setName(const char *name); void setData(void *data); ... ... }; I've collected most of the problems I had and assembled them in that example class. I hope that somebody can help me how to deal with such things or give me an advice about a good "tutorial" or paper. Thanks in advance &a ...Show All
Mirricle Problem with creation of the text file
Hi, I am writing an app. that extracts data from the database and writes that data in a pipe delimited format. After the application is run and I try to open up the .txt file, notepad shows the following warning: 'The process cannot access the file because it is still in use by another process.' The only way I can open the file is by ending the aspnet_wp.exe process from the task manager. Can somebody tell me what is going on over here Thanks a lot for the response. The way I am doing it is as follows: string Path = ConfigurationSettings.AppSettings["FilePath"];//I embed the file path in the .config FileInfo t = new FileInfo(Path); StreamWriter sw =t.CreateText();//This is ...Show All
ignitionflip StringBuilder problem!
I have made a StringBuilder sb = new StringBuilder(); But, for each file that exists, a new line (or comma) will be added between each file. IE: if (File.Exists(file)) { sb.Append(fileName); } if (File.Exists(file2)) { sb.Append(fileName2); } But between each file, I need a new line. How can I do this with FOREACH/ Thanks, is it possible remove ths last comma (,) in this case the result seems to be 1, 2, 3, coule it be 1,2,3 ( after last value we don't have to add "," ) is it possible if yes, could anybody here tell me how to do thank you thanks you all very appreciated your help! :D To u ...Show All
Rich Hoffman Create and Display an Array
I know this should be very simple but I just don't know the correct syntax. How can I create an array of strings, say "ronny", bobby", "ricky","mike" and then access them in the XAML to...say populate a listBox Thanks, Dvl Yes, we are in the C# forums NOW!!! As a moderator, I moved the thread from VB to C# So sorry! But wait, are we not in the C# forums MSDN Forums Visual C# Visual C# General Re: Create and Display an Array I am confused. Again, sorry if I posted in the wrong place. Thanks for the help, BTW! Dim StringArray () As String = { "ronny" , " ...Show All
