|
Hello,
I developed an application in C# .net. It also uses SQL server as database backend. I created an installer of this application which puts all the dlls,cofig file and related files to C:\MyApp folder. At some point of time the SQL connection breaks and apllication got crashed.
The problem starts after this event. Now though the connection is perfect then also the application threw the same sql exception. Some how it knows that this application was crased previously beacause of SQL error.
To confirm this i copied all the files from installable folder and pasted in another place, generated the same error by modifying the connection string(so it ll not find the required connection) from config file and tried to run it. It fails(perfect).
Now i correct the connection string and restart the application, it works.
So my trouble is that why the application from installer folder keep refers to the previous error and don't let it run.
|
|
|
|
|
hi all,
How to display 5 or more images in a PictureBox in quick succession say within 2 seconds?
Thanks and regards,
praveen
|
|
|
|
|
By setting a timer, and changing the image every time ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for reply.
Can you give code snippet or some hint how to do this?
thanks again..
|
|
|
|
|
Timer timer = new Timer();
timer.Interval = 2000/numberOfImages;
timer.Tick += delegate {
++imageToShow;
if (imageToShow > imageCount) imageToShow = 0;
pictureBox.Image = images[imageToShow];
};
timer.Start();
This assumes those other variables contain the necessary data, of course.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Hi, I need to show a Modal Form Centered in its Parent Form. Here is what I've tried
(Here I'm just trying to Put the Form at some Specific Location. If I can do that then I can center it as well. But still the Form is being positioned by the System's chosen Location)
base.ShowDialog(this.parentForm);
base.Location = new Point(100, 100);
base.ShowDialog(this.parentForm);
base.ShowDialog(this.parentForm);
base.DesktopBounds = new Rectangle(10, 10, this.Width, this.Height);
base.ShowDialog(this.parentForm);
base.DesktopLocation = new Point(10, 10);
Please Advice
Thanks...
|
|
|
|
|
Hello,
You have to set the "StartPosition" property of the Form:
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
P.S.: Why are you calling the methods with "base."? Have you overriden the properties and methods?
All the best,
Martin
|
|
|
|
|
Thanks Martin#. It Works Perfectly.
I used base keyword just so that I my IDE can complete the Property/Method names for me. No Special Reason other than that.
Anyways I tried searching for you on the Forum But I can't. You have been very helpful to me on a lot of ocassions. Thanks...
|
|
|
|
|
Glad I could help!
You are allways wellcome!
All the best,
Martin
|
|
|
|
|
You seem to be very comfortable with C# and you Certainly are very helpfull too. Do you have any Blog or Personal Website where you can be contacted besides codeproject. As I mentioned earlier I couldn't find you as an author here and I'm Sure you have much more to share...
|
|
|
|
|
Sorry no! I keep privacy for my family!
Apart from that I'm a big fan of the CP comunity, and the idea which stands behind that!
All the best,
Martin
|
|
|
|
|
Awright Then. See You soon Martin.
Thanks...
|
|
|
|
|
Is there from_unixtime() function in c#.net. If not, please guide me. its very urgent.
In mysql from_unixtime() function is used to change int time to datetime format.
like from_unixtime('1190452194')=Sep 22 2007 HH MM
|
|
|
|
|
So far as I know, C# language has no specified function.
But you can create a similar function your self.
---------------------------------
Believe what you saw!
|
|
|
|
|
what is the format of this type of time(integer)?
|
|
|
|
|
This should do the trick:
DateTime time = (new DateTime(1970, 1, 1)).AddSeconds(unixTime);
|
|
|
|
|
Thank you so much...it works....!
|
|
|
|
|
I want to add aplication on toolbar of IE. I need do?
|
|
|
|
|
You'd be writing an add in for IE. there's tons of help on how to do that, including articles here on cP
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi All,
I just got hired at a company that wants me to take code in PC-COBOL (I think that's what it's called although I am not 100% sure) that is from a mainframe they still have sitting around and port it to C#. Thing is, I've been spending all my time up til now in grad school for Astrophysics working with Perl and Linux and using Windows just to check my email.
I have a solid C++/Win32 programming background all the way up to Visual Studio 6.0 however I am rather raw and I have no clue about where to start in how to even set up my own laptop to program in .NET. Do I install IIS? I know I should put Visual Studio.NET on it, yet what next?
I guess I am starting from square one in a sense. And don't even mention COBOL. The only thing I know about COBOL is stories my parents told me about when they worked at Control Data in the '70's. Yet I am going to be working with this stuff five days a week now! And then porting it over to C# to boot.
Are there any recommendations for books, conferences, or trainings that would support me? Thanks in advance.
Sincerely Yours,
Brian Hart
Department of Physics and Astronomy
University of California, Irvine
|
|
|
|
|
HI, Brian,
Since reading this, I want to help you with my great effort.
I'm a .net developer in China, and I have two years experience of C# programming. The early I touched with C#, i found it very hard for me to get through, but things got better while I doing my work, which I mean that you should study C# till with some projects. That's a good way.
And if you want further infos about learning C#, I'm very appreciate for your reply. The mail is Dunbar.Cui at Gmail.com.
---------------------------------
Believe what you saw!
|
|
|
|
|
Why on earth did they hire you then ? I'm guessing the job sucks so bad that only you applied ?
Brian Hart wrote: Do I install IIS?
No, not unless you want to do web sites, that is what IIS is for.
C# as a language is syntactically very similar to C++, but it's a very different language ( garbage collected, for a start ). I'd recommend buying this[^], although it's out of date, it's a good place to start. Mainly all you need to know is that .NET 2.0 has generics, which means strongly typed containers. The other stuff, you can live without essentially.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hey, guys, maybe you have little misunderstanding of Client/Server.
So fars as I know, you just need to install Visual Studio 2005 with Windows Vista enhancement hotfix. And that's all for your winform applications.
And if you want to do the web developing, the IIS 7.0 is also needed on the Windows Vista.
Our working based on Windows Server 2003, Visual Studio 2005 and SQL Server 2005.
PS, I have one question: have you had any experience of C# programming ? ( I know you have other langugage programming exp)
---------------------------------
Believe what you saw!
|
|
|
|
|
Dunbar C wrote: And if you want to do the web developing, the IIS 7.0 is also needed on the Windows Vista.
Even that is not strictly true, there's a web server built in to VS2005.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|