|
You're welcome. Glad my answer is helpful.
- It's easier to make than to correct a mistake.
|
|
|
|
|
Sorry to bother u even more, i ams ure u are very busy.
but if it isn't to difficult, is there a way to send the app to my notification area? Atm it is on my taskbar. If this requires a lot of coding and is very difficult please just skip this i do not want you to spend all your time on me. Thank you very much Jun Du.
- Droz -
___ ___
/\/\ /\ | |
|
|
|
|
|
oh sorry again, just at work atm and can not try out that code string u recommended i try. That is striaght C code right?
Sorry if this is a dumb question, i am new to C coding and only been doing it for about 8 month.
- Droz -
___ ___
/\/\ /\ | |
|
|
|
|
|
No. That was C# code. IF you're writing plain C you need to be asking in the c/c++ forum. C#'s a completely seperate language.
|
|
|
|
|
Thank you, i was hoping it would be similar. thank you.
- Droz -
___ ___
/\/\ /\ | |
|
|
|
|
|
Though you are in the wrong forum, I will try. First of all, why this obsession with C? Why not a BAT file that has "/shutdown -s" typed in it, and use Windows Scheduler to run it whenevr you want?
OK, so you are the "I will write my own program" kind of addict. Why not use the WinExec() Win32 API to execute the same BAT file? Create the BAT file and keep it somewhere on the hard disk. Now in the C program (which can take parameters like timer duration etc - that is your design, you can even pass the full path & name of theBAT file if you want your program to be generic) that will simply execute the BAT file at the specified time.
Koushik Biswas
|
|
|
|
|
I am trying install my pc Reporting Service with Report Server and Report Manager. But an error occured when I install this program. I had installed SQL Server 2000 Developer Edition in my PC.
The error is:
"This edition of Report Server Database is not supported on edition of SQL Server 2000 you have chosen. Please choose another SQL Server that matches the requirements. "
What do I do? Please help....
Thank you...
This is my sign
|
|
|
|
|
I think you can check the reporting service requirement .It needs sql server 2000 with server pack3
|
|
|
|
|
Hi,
Scenario is
I have
=> App1 version 1.0 (developed with framework 1.1)
=> App1 version 2.0 (developed with framework 1.1)
now when i install version 1.0 into any machine it installs some files to GAC and to bin folders. At the same time i want to install App1 2.0, which also installs assemblies to GAC and same bin folder of 1.0 (target Installation path is same).
Will there be any problem running two versions parallally. My assumption is if two different versions have strong named assemblies with version numbers, there should be any problem, Any views pls welcome
kumar
|
|
|
|
|
Don't know for sure, but to be safe, put one in a different namespace.
|
|
|
|
|
I can't put in different namespace. Any other solution?
kumar
|
|
|
|
|
Well you can just fire them up and see what happens. Watch out for static fields. They will always be shared.
|
|
|
|
|
Mr. VB.NET wrote: Well you can just fire them up and see what happens. Watch out for static fields. They will always be shared.
Static fields are only shared between objects within the same process (maybe even limited to AppDomains - never tried this). As two applications are always started in separate processes, there will be no interference due to static fields.
|
|
|
|
|
As long as the assembly version numbers are different, there shouldnt be any problems
|
|
|
|
|
Hello,
I'm making a windows form app using c#. In one form, I am "Painting" a table in a panel. When a button on the form is clicked, I would like to repaint the panel using specified parameters. Does anybody know how to do this? Here is some of the code:
private void goBtn_Click(object sender, EventArgs e)
{
pltNum = pltList.SelectedIndex;
tblPanel_Paint(object sender, PaintEventArgs e);
}
I guess I'm not sure what parameters I should pass to the tblPanel_Paint method.
Thanks for your help!
RC
|
|
|
|
|
RC,
To force the Windows Form to redraw, you should use the Invalidate function, rather than calling the paint event handler directly. For information on that function, have a look at Control.Invalidate[^] from MSDN.
The important thing to note about the Invalidate function in that article is this sentence:
"Calling the Invalidate method does not force a synchronous paint; to force a synchronous paint, call the Update method after calling the Invalidate method. When this method is called with no parameters, the entire client area is added to the update region."
This simply means that when the Invalidate function returns, the control has not necessarily been redrawn yet. Thus it is possible that, after the user has clicked your "Go" button, the form does not redraw itself (although in normal usage, you won't really be able to tell). Nevertheless, as the MSDN documentation says, to force the redraw immediately, simply call the Update function after you call Invalidate .
Here is how your code would look:
private void goBtn_Click(object sender, EventArgs e)
{
pltNum = pltList.SelectedIndex;
this.Invalidate();
this.Update()
} Let me know if that works for you, or if you still have a difficulty, I will try to help you as best I can.
Sincerely,
Alexander Wiseman
|
|
|
|
|
Hi Alexander,
The invalidate method worked! Thanks for your help!!
RC
|
|
|
|
|
Anyone care to take up a discussion on GoF patterns? I am just getting into it now and want to learn more about it.
Found out, I've been using the facade pattern without knowing the name of it for some time now. I am finding the study of this is both simple and complex. It has a lot of depth to it and I don't find a ton of C# examples out there.
First question: How does one start to use patterns, you read about them etc. but How do you take a design requirement and start the process?
|
|
|
|
|
Mr. VB.NET wrote: It has a lot of depth to it and I don't find a ton of C# examples out there.
See http://www.dofactory.com/Patterns/Patterns.aspx[^]
Mr. VB.NET wrote: First question: How does one start to use patterns, you read about them etc. but How do you take a design requirement and start the process?
Not had much of a chance to apply patterns in anger but I found this to be an excellent book.
Design Patterns Explained
http://netobjectives.com/dpexplained/index.html[^]
I own the first edition, so the second edition will be even better. In fact the whole of their site is pretty good.
The book uses Java snippets. But it is very basic Java and a cinch for C# ers to follow. What I like about the book is that it is problem-context based. Starts with procedural code then shows how OO overcomes its problems. Then shows how design patterns improve the original OO. This is a much better approach than just listing a bunch of patterns.
Kevin
|
|
|
|
|
That is the book I just purchased last week. Good so we're on the same track.
I have seen the "dofactory" site and will continue to use it. Of course all of this has piqued my interest in UML. I was thinking if we can reduce design to uml then there must be tools which generate code. Sure enough there's tons of them out there. Seems to me if you had a good UML tool you would be setting up good designs right away.
|
|
|
|
|
Mr. VB.NET wrote: Seems to me if you had a good UML tool you would be setting up good designs right away.
If only it were that straightforward! (we'd all be out of jobs)
I find that design patterns are often used for the sake of being used. Some people see it as a quantifiable way of determining whether a design is "good" or not. This is, in my opinion, a grave mistake. In my experience, patterns are only useful if they solve a distinct problem. If they do not, they add unnecessary complexity to what could be a simple solution.
Now that I've ranted about when not to use patterns...
I typically use a pattern if I find myself trying to satisfy multiple related requirements, conflicting or not. For example, in the most recent system I designed I had the need for a general way of expressing a hierarchial relationship between various types of business objects. The hierarchies needed to be expressed in various configurations, and also needed to play nice with WinForms databinding. To satisfy all of these requirements, I chose to use the Composite pattern...and it worked out beautifully.
HTH,
Josh
-- modified at 13:29 Wednesday 14th June, 2006
|
|
|
|
|
Interesting, I started using Java about 10 years ago, after being an Operating System's programmer with a large company for 3 years prior. I quickly wanted to use object oriented programming for reuse. However, I found myself then and now, still doing top down coding, breaking it all into methods or other classes. All of this with little thought into reuse, and even using a design at all. I just start programming and the design appears.
Having also been a carpenter I know that plans are important. Being a guitar player gave me patterns to use. I just put them together differently. I'm thinking this design stuff for programming is really important. I see my own company fail repeatedly with new implementations, which take years to maintain and change to make it really workable. There's got to be a better way.
|
|
|
|
|
Mr. VB.NET wrote: That is the book I just purchased last week. Good so we're on the same track.
You'll enjoy it!
It's one of those rare techie books that you can read more-or-less cover to cover.
Kevin
|
|
|
|
|
|
I have a deployment project, with an Installer class to do my custom actions. In it's Install() override I show a form.
My problem is I cannot seem to make my form change it's localization value and be displayed in french. Here is basicly what I want to do in my dialog:
public Form1()
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-CA");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-CA");
InitializeComponent();
}
Why won't this display Form1 in french? If I call this routine from any other class but my Installer class it works fine.
Even if I run my deployment project in french, my Form1 will STILL not flip to french.
I know I need a seperate deployment project for both languages, but was hoping to use the same Installer Lib for both languages and just flip it's forms' culture settings....
Any insight on this would be helpful. Thanks!
-- modified at 11:32 Wednesday 14th June, 2006
|
|
|
|