|
Hello
Does anyone know how I can access a field from a CrossTab object from code?
I can get the CrossTab object with 'myRPTdoc.ReportDefinition.ReportObjects["CrossTab1"]' but what do I do next?
Thanks
|
|
|
|
|
Hi ,
This is ravindra,currently working on Windows Service.
I implemented the following two methods to call notepad.exe from windows
service,but its not working.So,please anybody help to complete my task.
Method1:
=======
STARTUPINFO si = new STARTUPINFO();
PROCESS_INFORMATION pi = new
PROCESS_INFORMATION();
CreateProcess("C:\\WINDOWS\\SYSTEM32\\notepad.exe", null,
IntPtr.Zero, IntPtr.Zero, false, 0, IntPtr.Zero, null,
ref si, out pi);
EventLog.WriteEntry("After notepad");
}
[DllImport("kernel32.dll")]
static extern bool CreateProcess(string lpApplicationName, string
lpCommandLine,
IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool
bInheritHandles, uint
dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, ref
STARTUPINFO
lpStartupInfo, out PROCESS_INFORMATION lpProcessInformation);
}
}
Method2:
========
EventLog.WriteEntry("In the notepad");
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "notepad.exe";
psi.UseShellExecute = false;
psi.Domain = "sys43.";
psi.UserName = "Acer OEM User";
SecureString secure = new SecureString();
string password = "nopassword";
foreach (char c in password)
{ secure.AppendChar(c); }
psi.Password = secure;
Process process = new Process();
process.StartInfo = psi;
process.Start();
|
|
|
|
|
System.Diagnostics.Process.Start("notepad");
its me sid
|
|
|
|
|
|
Hi ,
This is ravindra,currently working on Windows Service.
I implemented the following two methods to call notepad.exe from windows
service,but its not working.So,please anybody help to complete my task.
Method1:
=======
STARTUPINFO si = new STARTUPINFO();
PROCESS_INFORMATION pi = new
PROCESS_INFORMATION();
CreateProcess("C:\\WINDOWS\\SYSTEM32\\notepad.exe", null,
IntPtr.Zero, IntPtr.Zero, false, 0, IntPtr.Zero, null,
ref si, out pi);
EventLog.WriteEntry("After notepad");
}
[DllImport("kernel32.dll")]
static extern bool CreateProcess(string lpApplicationName, string
lpCommandLine,
IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool
bInheritHandles, uint
dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, ref
STARTUPINFO
lpStartupInfo, out PROCESS_INFORMATION lpProcessInformation);
}
}
Method2:
========
EventLog.WriteEntry("In the notepad");
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "notepad.exe";
psi.UseShellExecute = false;
psi.Domain = "sys43.";
psi.UserName = "Acer OEM User";
SecureString secure = new SecureString();
string password = "nopassword";
foreach (char c in password)
{ secure.AppendChar(c); }
psi.Password = secure;
Process process = new Process();
process.StartInfo = psi;
process.Start();
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Process p = new Process();
p.StartInfo.FileName = "notepad.exe";
p.Start();
}
}
}
SkyWalker
|
|
|
|
|
This is how you would open Notepad from a win forms application however this won't work from a windows service. A service does not have a "display" to show the notepad application.
I have had a look around and had a play but I cant get this to work. Sorry.
Hopefully someone else might have some better ideas. Also be sure to consider the account the service is running under, some accounts will restrict such activities.
|
|
|
|
|
it was no win form outhere
It was a console example.
... and starting a process has nothing to do with any display ...
SkyWalker
|
|
|
|
|
Mircea Puiu wrote: . and starting a process has nothing to do with any display ...
It does if its from a windows service which is not marked as "Interactive". Without a display to start a windowed process like notepad, it will not show up if started from the service.
|
|
|
|
|
of course
SkyWalker
|
|
|
|
|
Windows services generally are not required to show other applications. You can check the box to mark the service as "Interactive" which will allow it limited use of the logged-in users screen.
Without testing, I would think that marking it interactive and using the standard Process.Start code that is ubiquitous would result in the behaviour you are expecting.
|
|
|
|
|
It does - this was the step I was missing when I attempted it.
|
|
|
|
|
You do not normally start an interactive process from a Windows Service. Probably, it is an option in your case when debugging something (then you must enable the service to interact with the desktop, as already said by someone here).
The reason is that each service runs in an invisible secured desktop environment, therefore no user interface is shown to users.
SkyWalker
|
|
|
|
|
I want to set "eof", "error", "break" and "event" chars for serial port communication, but did not find any setters or properties in the System.IO.SerialPort class. I also searched the web but havent found an answer yet.
Hopefully anyone knows how to do this!
Best regards
|
|
|
|
|
Some of it can be found in the available documentation:
- SerialPort.ReadLine() reads text up to the next occurence of SerialPort.NewLine
(warning: SerialPort.NewLine will also be emitted when calling SerialPort.WriteLine).
- The PinChanged event is raised when a SerialPort object enters the BreakState.
I have never heard of an "event" char.
I am unaware of any explicit support of the ASCII EOF character.
|
|
|
|
|
i have written a program to convert the XML file into the DATAGRID view using C#.
Now i need a help regarding..
when we change the values in DataGrid it shloud reflect the XML also..
Usyra
modified on Tuesday, January 08, 2008 7:09:55 AM
|
|
|
|
|
You should ask about something you do not understand or do not know how to use.
Nobody will do your homework
SkyWalker
|
|
|
|
|
I have a video blender application which uses 3vix MP4 codecs and DirectShow. In the project I need a P/Invoke call like private static extern int GetRunningObjectTable(int r, out IRunningObjectTable pprot); . This is in ole32.dll. Now I am converting this project to MONO, and I analyzed this with MOMA. But it is showing P/Invoke can't be added to MONO. Anybody knows any workaround for this issue ? I have tried installing ANTS PInvoke.NET and checked for any managed code exist.But it given me no results. Any help would be appreciated.
|
|
|
|
|
I have read somewhere that you can make P/Invoke work on MONO using wine[^] but I haven't tried it myself.
|
|
|
|
|
Giorgi Dalakishvili wrote: I have read somewhere that you can make P/Invoke work on MONO using wine[^] but I haven't tried it myself.
Thanks. I have checked WINE documentation and looks like they don't have implementation for DirectShow. Let me try it out. Thanks again
|
|
|
|
|
hi all. i saw keyboard logger in vc++ .
can do this in C#.
i want to log mouse click and time of visit each web site in c# can anyone help me?
sepel
|
|
|
|
|
In fact, if you write an app that has a web browser control, it will get events for any web browser on the PC, so you could log it that way.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
so tanks sir.
really my control can handle mouse click and keyboard of all open pages in browser?
not need to use any hook to windows event?
can you introduce me some simple example.
sepel
|
|
|
|
|
Hi firends,im working with webform of C#.I would like to send mail with or without smtpserver.please kindly send me the code with explanation.Thank you in advance.
Hi,Im Razana
|
|
|
|
|
Hey Razana. YOu need to specify what version of C# you're using. But, you'd do better to type it directly into google. There are tons of examples on this on the web. Of course, without a server, you can't send mail, it's not possible.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|