|
I guess looking a this[^] page may help you out.
Veni, vidi, caecus | Everything summarizes to Assembly code
|
|
|
|
|
Hi,
I am using Visual Studio 2008 and report builder 3.0. I create a simple rdl report name as "EmployeeDetails.rdl". I am showing the report in ASP.NET page by using "Report Viewer" control. Now in Report viewer tool box contains print and export facility default. But i want to print same report through asp.net code.
I am able to achieve export facility programmatically, but unable to print achieve functionality.
If any one achieve print functionality then please help me or guide me as early as possible.
Thanks
Chetan Chopkar
|
|
|
|
|
|
I have a main form with a button, when pressed opens a second form.
I want to make this form close when it is out of focused.
I tried with a timer checking
private void IsFocused_Tick (object sender, EventArgs e)
{
if(!this.Focused)
{
this.DialogResult = DialogResult.Cancel;
}
}
But Nothing happens
Can anyone tell me what i am doing wrong here?
|
|
|
|
|
there is no need to use a timer. there are events raised when a form loses focus - you probably want to handle the Deactivate event and close the form in that handler.
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
Wow... That worked like a charm... Thanks alot...
M sorry but, i hadn't mentioned before, but there are two buttons on this second form, Which when clicked One opens the openfiledialog and the other folderbrowser.
The problem is when i click any of the buttons it will bring up the Dialogs and so the form gets deactivated, as a result the dialog boxes also gets closed.
Any way to work around this???
modified 1-Jan-14 6:17am.
|
|
|
|
|
Create a flag that you set right before the dialog is shown and cleared when the dialog is dismissed. Check tge value of the flag in your event handler.
|
|
|
|
|
Thanks alot... It works...
|
|
|
|
|
I think the codes should like this:
private void Form1_Deactivate(object sender, EventArgs e)
{
this.Hide();
}
|
|
|
|
|
How to create a console window along with a GUI application ?
then the system.console.writeline can output from this console window ,
like add the "editbin /SUBSYSTEM:CONSOLE $(OutDir)/$(ProjectName).exe" in the post-build event in a C++ project .
Thanks !
heartofdra
|
|
|
|
|
The "Gui Application" is WinForms ? WPF ?
“I'm an artist: it's self evident that word implies looking for something all the time without ever finding it in full. It is the opposite of saying : 'I know all about it. I've already found it.'
As far as I'm concerned, the word means: 'I am looking. I am hunting for it. I am deeply involved.'”
Vincent Van Gogh
|
|
|
|
|
any difference ?
how about the WinForms ?
heartofdra
|
|
|
|
|
How about Win Forms [^].
“I'm an artist: it's self evident that word implies looking for something all the time without ever finding it in full. It is the opposite of saying : 'I know all about it. I've already found it.'
As far as I'm concerned, the word means: 'I am looking. I am hunting for it. I am deeply involved.'”
Vincent Van Gogh
|
|
|
|
|
I got it ----- "output type "
thanks
heartofdra
|
|
|
|
|
This will create a Console application, not a WinForms. It's not a good idea because this creates a few problems for your WinForms app that you have to code around.
Put it back to what it was. In your application, you have a couple of ways of creating a console window. One is to use the Win32 functions AllocConsole and AttachConsole. You then have to get the streams from the console and attach them to .NET streams, ... It's pretty messy.
A simple method it to launch CMD.EXE as a new Process, then you've already got the stream objects to write to. You can't use Console.WriteLine, but you can use something like myCmdProcess.StandardInput.WriteLine. StandardInput is a normal StreamWriter object which has all the usual methods you would expect[^].
|
|
|
|
|
There isn't really a nice way to do this - the UI needs a separate thread to your console stuff. Which gives problems when you want to shut things down...
The easiest way is to create your app as a console app, and add a form to that - it's not "nice" but it will work:
private static MyForm myForm = new MyForm();
static void Main(string[] args)
{
Console.WriteLine("Console");
Thread t = new Thread(() => myForm.ShowDialog());
t.Start();
while (true)
{
string s = Console.ReadLine().ToUpper();
if (s == "X") break;
}
if (t.IsAlive)
{
myForm.Invoke(new MethodInvoker(delegate { myForm.Close();}));
}
}
Never underestimate the power of stupid things in large numbers
--- Serious Sam
|
|
|
|
|
I believe this[^] is what you want to do.
Edit: A better link here[^].
/ravi
|
|
|
|
|
Hello,
There are 3 Windows Service I am running now and one service stops automatically without any error (I have try and catch blocks to capture errors and log in a text file). At first I thought it is due to tuneup maintenance and antivirus program I'm running but if it is the case, shouldn't all services stop?
I put them on recovery mode to restart after fail, but it doesn't work for that particular windows service. How do I check what stops the service? And how do I set recovery options programmatically?
Hope someone can help me. Thank you!
modified 2-Jan-14 4:16am.
|
|
|
|
|
|
Yes, I did. Without any exception or error, the service stops and can see event log entry "In OnStop" there.
|
|
|
|
|
There is no way to determine what told your service to stop unless the program that did it out something in the event log saying that it is stopping your service.
|
|
|
|
|
Now I know why!
My Norton antivirus terminates my services! It says Generic Load Point detected by Virus Scanner and it terminates and removes my services! How can I prevent this? I couldn't find any setting to exclude these particular services during virus scan.
|
|
|
|
|
I don't use Norton Antivirus so I don't know. Either someone who does use it is going to have to answer (good luck waiting for that), or you contact Symantec Support and ask them.
|
|
|
|
|
That would be silly to wait. Anyway thanks! I've figured it out.
|
|
|
|
|
How exactly do you know that it "stops automatically"?
How do know it even started? How do you know it started successfully?
Did you check to see if the server restarted? And if it did restart then did the service correctly start?
|
|
|
|