|
i am working with c# console application.i am using MInternetExplorer.Explorer class of SHocVw.dll.basically i am parsing html pages.i am using following events as per my requirement
BeforeNavigate2()
DocumentComplete()
i am giving the website name for parsing. My problem is that when i give the name of website.i need IP address of that wesite before parsing.which event i need to capture in order to find the IP Address and which way i could find the IP address.
Please send the code If possible.
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
There's the System.Net.Dns class that can be used to resolve the name.
Regards,
mav
|
|
|
|
|
i need to access a public folder, then copy everything from that folder to another folder, then delete everything from the public folder...
any ideas...
or help wil be appreciated..
thanks
flipmode_dsi
|
|
|
|
|
Perhaps looking into the Directory[^] and File[^] classes would help. Each has methods for enumerating, copying, and deleteing folders and files.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Check out the cool HTM file that is located in the Exchange SDK. It is called webdavsample.htm. It does all that you are asking for. Look in the SDK/SAMPLES folder.
|
|
|
|
|
Hi!,
Please help if anyone knows how to retreive the folders/files allowed through the security permissions for a particulat user in one shot!! Because checking for each and every file will take hell lot of time!!
Akshay!
|
|
|
|
|
You want to retrieve the entire list of accessible files and folders based on a users ACL, correct? There is no function that will do this. You have to walk the filesystem tree and check each one individually.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm studying sharepoint and I saw something in aspx pages that I did not underestand.There is a page that contains a radiobutton but does not contain the radiobutton options but when the page is shown the options appear,I want to know where do they come from?
the main code is :
<%@ Page Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.SubNewPage" ValidateRequest="False" %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <% SPSite spServer = SPControl.GetContextSite(Context); SPWeb spWeb = SPControl.GetContextWeb(Context); %>
<asp:radiobuttonlist id="RadioBtnEventType" cssclass="ms-authoringcontrols" runat="server">
the radiobutton code is :
asp:RadioButtonList id="RadioBtnEventType" CssClass="ms-authoringcontrols" Runat="server"
the rendered page code radiobutton section is:
All changes | Added items | Changed items | Deleted items |
-- modified at 2:23 Tuesday 11th October, 2005
|
|
|
|
|
|
i have a listview control on my form. The View property of the control is set to LargeIcon. I have three items in it. I have three buttons on my form. What I want to accomplish is that when the first button is clicked, the forst item in the listview gets selected and when the second buttob is clicked, the secon item in the listview gets selected and so on. How do i do this?
|
|
|
|
|
Write this code on each button click....change the index value as desired
<br />
ListViewItem LItem=LView.Items[0];<br />
Litem.Selected=true;<br />
hope this helps
_mubashir
|
|
|
|
|
Need a code sample.
How to recurse an Active Directory Security Group that contains other Security Groups as well as users. I need to create a full text listing of each user and all attributes available for that user. When I get the user collection now I get the Member groups. How might I recognize that one of the members is actually another Security Group?
|
|
|
|
|
Hi everyone,
I am trying to capture specific frames of video file using tungMediaPlayer.clsMoviePlayer cMoviePlayer to save the frames as images, can someone help me? Or does someone else have a better video file player that i can use to create the screen captures. I checked outA Simple C# Wrapper for the AviFile Library
By Corinna John but it doesn't even work, so can someone help me?
Thank you,
Da Intern
|
|
|
|
|
any help...i have also searched all over google, no such luck
Da Intern
|
|
|
|
|
If my program is running and I start a program such as Internet Explorer, how do I get the window handle of IE when my programs is activated and gets focus again?
I want to send keystrokes to differing programs. Currently, the only window I can get is the foreground window using the GetForeGroundWindow API when my program initially starts. If a new program starts while mine is running, in order to send keystrokes to it, I need to close my program and restart it, so I can get the new foreground window. Make sense?
Any ideas?
|
|
|
|
|
You can enumerate through the currently running processes and use the Process.MainWindowHandle[^] property to get the window handle. Something like
Process[] processes = Process.GetProcessesByName("notepad");
foreach(Process p in processes)
{
IntPtr handle = p.MainWindowHandle;
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
That doesn't help though. Within my code, I don't know which program just started or which program just had focus. It could be notepad, it could be IE, it could Vis Studio, or FireFox.
It doesn't matter what the program is, I want the window handle of the window that had focus prior to my program.
|
|
|
|
|
Unless your application is already running when the focus changes, there's no way to tell which application just had the focus. Your application will start way too late to get any notification of which window just lost the focus.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes, exactly. It will already be running.
Here's the example again. My program is running, but doesn't have focus. I start IE or MS Word and do blah blah blah in it. I click back or focus my program. What's the handle of the app that just had focus before mine?
-- modified at 9:11 Wednesday 12th October, 2005
|
|
|
|
|
There is no API call you can make to give you the last window that had the focus.
The only thing I can think of is to override the WndProc procedure in your main window and handle the WM_ACTIVATE[^] message. You'll have to track the window handle of the window that is being deactivated, then get the parent window of that window handle until you reach the top-level window handle of the application.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I couldn't seem to get that to work.
However, I did find another solution. I found a class that receives all mouse and keyboard events from the system.
I hooked up a couple events and now my program is told when someone clicks the mouse or presses a key. Then I just GetForeGroundWindow to get the active window and change the IntPtr my program is using to know what has focus.
Works great!
|
|
|
|
|
Hi,
the main question is: (see details and more detailed questions below)
"Is there any big performance difference on implementing
two services on the same service process instead of creating
two separate Windows services (each one on its own process)?"
Details:
I developed two Windows services that needed to share data.
One should be almost real-time (like a performance metrics
monitor). The other will transfer such captured data over
Web services, can be slow and should use data persistence.
Implementing separated services, I could do it with
MMF + P/Invoke, or use something elegant solution,
such as Natty Gur's (DevGlobalCache), found here at CP.
Alternatively, I could implement both services inside same
Windows service process. In such case I could leave MMF P/Invoke
(since it´s not native in C# == I´m using VS.NET 2003).
Though, I don´t know whether such alternative solution would
be feasible, due to the following doubts:
1. If a Windows service process has two or more services,
does Windows treat each one as a thread, or *only* the
entire proccess as a thread? If the second option is the
case, so both services cannot live on the same process
with no impact on performance.
2. On the other hand, if Windows doesn´t treat them as
separate threads, probably a Mutex won´t be necessary if
both as on the same process.
Any comments on this would be very appreciated.
Thanks in advance.
Eugenio
|
|
|
|
|
Check out this post by Larry Osterman about svchost.exe
http://blogs.msdn.com/larryosterman/archive/2005/09/09/463018.aspx[^]
If you can run your services in the same process they will use fewer resources.
Each service is event driven. Don't count on the start and stop events to be called from the same thread. Other then those operations your service should manage it's own thread management. Either implicitly using a timer or other event object, or creating your own thread pool.
|
|
|
|
|
Is there a way to display a image on a Button with button.FlatStyle = FlatStyle.System. Currently I have applied XP theme to the controls.
|
|
|
|
|
Have you thought about just using a PictureBox control as your button? Or are you wanting the "effect" of a "downward click" when the mouse is clicked?
|
|
|
|