|
I'm sorry but I don't understand how to use the EM_GETSEL or the EM_GETSELTEXT. Can you point me in the right direction?
Here is my code so far:
private string gst(IntPtr hwnd)
{
IntPtr retValue;
StringBuilder strb = new StringBuilder(4096);
retValue = SendMessage(hwnd, EM_GETSELTEXT, (IntPtr)0, out strb);
return strb.ToString();
}
|
|
|
|
|
This may be an old topic but I'm having trouble finding any decent information on how to send SNMP traps using C#. Any help/links would be appreciated.
|
|
|
|
|
http://www.google.com/search?q=%22SNMP+traps%22+C%23[^]
Several of those results even point back to CodeProject. Click "Search comments" to search this forum (which isn't currently indexed by web crawlers).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
I know this is a long time after the original thread, but i'm still a little lost on the subject......basically what i'm trying to do is make a computer act as an agent and generate traps, that's all.
Is it possible to do this using the winsnmp functions .ie. SnmpCreatePdu,SnmpSendMsg, etc?
Thanks
|
|
|
|
|
This is really an ASP question, but since I'm using C#, I'll post it here. I'm having trouble accessing remote files (or directories) out of my application. I simply want to check if a file exists on the other machine, which is shared on the same network. No dice, always comes up false. I have set up the IUSR_ComputerName and IWAM_ComputerName accounts on the remote computer to match my IIS account. Still returns only false. I've mapped a drive to the network location, and then put that mapped drive into a virtual directory. In the IIS Administrator I can see the files I'm trying to reach through this virtual directory...but the application only returns false.
Here's the code from my application:
<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
if (System.IO.Directory.Exists("Drive"))<br />
Response.Write(Server.MapPath("Drive") + " Exists<br>");<br />
else<br />
Response.Write(Server.MapPath("Drive") + " does not exist<br>");<br />
}
Thanks for the help on this. If anybody knows another method of accomplishing this same task, I'm all ears. All I can report is that we don't want to run IIS on the remote machine, and we don't particularly want to spawn an application to take care of the file maintenance...we'd like for the code to handle it.
|
|
|
|
|
What is Drive ? in if (System.IO.Directory.Exists("Drive"))
Please substitute "Drive" as "x:\\" should work..( where x is mapdrive letter)
or
if (System.IO.Directory.Exists("\\\\MachineName\\ShareName\\FolderName")) should do
Sandeep Naik
|
|
|
|
|
Drive is the name of my virtual directory, which maps to what you call x:
|
|
|
|
|
As Sandeep correctly mentioned, you're looking for the wrong directory.
You need to wrap "Drive" in a call to Server.MapPath() as well when calling System.IO.Directory.Exists(), otherwise you're actually searching for a Direcory named "Drive" instead of the mapped one.
Regards,
mav
|
|
|
|
|
Hi,
I am a writing a program in which a user can open a file in some application by creating a new instance of that application. But what I want to do is see if that application is already open (the user opened it not through my program, but by double clicking the application icon) in which case use the already open application to display the file instead of creating a new instance.
How can I do it.
Thanks
|
|
|
|
|
One way to do this
if ( System.Diagnostics.Process.GetProcessesByName("processname").Length == 0 )
MessageBox.Show("Process not running");
else
MessageBox.Show("Process is running");
Sandeep Naik
|
|
|
|
|
Mr. Sandeep,
I guess you got the question wrong. Once I find that a application is already open, Is there a way that i can open a file in that, instead of creating a new instance of the application and then opening a file.
Thanks
|
|
|
|
|
There is, and a simple search for single instance application[^] would return several results, including Single Instance Application in VB.NET[^], which should be easy enough to translate (it's mostly calls to the BCL).
You can also communicate with the first instance through .NET Remoting - the preferred method - or native RPC, named pipes, DDE, or many other ways (but those are all native, which requires extra code in order to call necessary APIs).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
I'm assuming it's the .NET Framework V2.0 beta - am I right?
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
|
Hello All
My question is this that how to embed a flash movies on a form? I'm using Macromedia Flash Obejet (A COM(+) control. I 'm the path of Movie in Movie property but it's not showing can any body helo me what to doo how to set properties plzzzzz. I'll be very thankful.
Cheers Bye
Rizwan Ahmed
|
|
|
|
|
Have you tried using acimp utility in the frameworks BIN folder on the activeX component, it should produce .net assemblies for you to use with your app.
|
|
|
|
|
There's samples on this website. I'm pretty sure. Do a search.
/\ |_ E X E GG
|
|
|
|
|
If you've dragged the control from your toolbox (after customizing and adding it to your toolbox) to the form, or if you've used aximp.exe (not acimp.exe like the other poster said), then you reference both the AxInterop.*.dll and Interop.*.dll (or whatever you called them if you used aximp.exe and specified the /out switch). These are the ActiveX control (derived from System.Windows.Forms.AxHost ) and the RCW (Runtime Callable Wrapper, a wrapper around the COM server generated from the typelib) respectively.
After you've done that, read the documentation for the ActiveX control on Macromedia's web site (or just take a stab and guess). The classes, interfaces, enumerations, methods, properties, etc. are all the same as they would be from a COM client like Visual Basic or some scripting language, because the RCW is marshaling calls to the COM (automation) objects themselves that scripting clients use.
There have also been articles on this site written about similar topics (perhaps even embeddeding the Flash player). I suggest using the search bar underneath the CodeProject logo at the top of the page to search for existing articles.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Hi All,
I need help. I want to extract the ISO file to the local harddrive. Is there an sample code or some sample written in VC++ 6.0 or C#, which I can take a look. Please help.
Thank You
Regards,
ntuyen01
|
|
|
|
|
Get IsoBuster: www.isobuster.com[^] (go to site and click on download on left.) The free (non-Pro) version does everything I've needed.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
can anyone give me instructions to build a basic web broser,what's necessery and needed to archive this?
...NLD...
|
|
|
|
|
|
Dear CPians,
I am trying to convert a Bitmap object to a byte array so I can save it into an Image fiels in SQL Server 2000.
Any examples?
Thank you!
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
private byte[] BmpToBytes(Bitmap bmp)
{
using(MemoryStream ms = new MemoryStream())
{
bmp.Save(ms, ImageFormat.Bmp);
return ms.ToArray();
}
}
Grim (aka Toby) MCDBA, MCSD, MCP+SB
SELECT * FROM user WHERE clue IS NOT NULL
GO
(0 row(s) affected)
|
|
|
|
|
Thank you for your reply!
This seems to be axactly what I need!;P;P
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|