|
helu.... does any body know how to obtain local lan ip address of a machine... thans in advance...
|
|
|
|
|
Possibly asking Google [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
i am having a windows sreivce reading and writing to a database(msaccess). is it possible to read from the database from a windows application at the same time when the windows service is accessing or writing to the database... thans....
|
|
|
|
|
sorry.... i tested the application my self and it can be done... thans
|
|
|
|
|
Im trying to build a simple bho object that handles a custom IE button click event.
Ive created the needed interfaces(IOleCommandTarget,IServiceProvider,IOBJECTWITHSITE )
i have the following SetSite function implementation:
public int SetSite(object site)
{
SHDocVw.IWebBrowser2 m_pIWebBrowser2 = site as SHDocVw.IWebBrowser2;
IServiceProvider ISP = site as IServiceProvider;
if (m_pIWebBrowser2 != null)
{
Marshal.ReleaseComObject(m_pIWebBrowser2);
m_pIWebBrowser2 = null;
}
if (Explorer != null)
{
Marshal.ReleaseComObject(Explorer);
Explorer = null;
}
if (ISP != null)
{
Guid IID_IUnknown = new
Guid("{00000000-0000-0000-C000-000000000046}");
Guid IID_IWebBrowserApp = new
Guid("{0002DF05-0000-0000-C000-00000000046}");
object pOut;
try
{
ISP.QueryService(ref IID_IWebBrowserApp, ref IID_IUnknown, out
pOut);
Explorer = (WebBrowserClass)Marshal.CreateWrapperOfType(pOut as
IWebBrowser2, typeof(WebBrowserClass));
}
catch (Exception e)
{
System.Windows.Forms.MessageBox.Show(e.Message, "Talkative Browser");
}
}
when im debugging i can see that the function is called twice, once when the browser is opend and two when i click my button.
i provided an IServiceProvider interface to look for the browser handle when i click my button(it seems it is sending ISHELLBROWSER pointer to my SetSite).
Everything is working fine except the Exec function implemented by the IOLECOMMANDTARGET interface is not being called.
here is my IOLECOMMANDTARGET code:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct OLECMDTEXT
{
public uint cmdtextf;
public uint cwActual;
public uint cwBuf;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)]
public char rgwz;
}
[StructLayout(LayoutKind.Sequential)]
public struct OLECMD
{
public uint cmdID;
public uint cmdf;
}
[ComImport,
Guid("b722bccb-4e68-101b-a2bc-00aa00404770"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IOleCommandTarget
{
void QueryStatus(ref Guid pguidCmdGroup, UInt32 cCmds,
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] OLECMD[] prgCmds, ref
OLECMDTEXT CmdText);
void Exec(ref Guid pguidCmdGroup, uint nCmdId, uint nCmdExecOpt, ref object
pvaIn, ref object pvaOut);
}
can anybody point me a direction for solving the problem?
|
|
|
|
|
Anytime I open or save a .css file using RichTextBox.LoadFile() or .SaveFile() methods Frontpage opens the file. So I write the contents to disk using the following. Even so, Frontpage still tries to open the file!
try
{
using (StreamWriter writer = File.CreateText(path))
{
foreach (string line in rich.Lines)
writer.WriteLine(line);
}
}
catch (IOException e)
{
}
Mark
|
|
|
|
|
|
If you have the web site open in Frontpage it will watch for file changes. It doesn't matter how you write the file, you can't change it without changing it...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Frontpage is not running, and I am simply editing a .css document (text) in a RichTextBox. I doesn't make any sense that Frontpage opens after the file is saved in the RichTextBox control!
Mark
|
|
|
|
|
No, that doesn't make sense. Applications doesn't start by themselves, so it seems that you start the css file somehow, causing Frontpage to open...
Do you do anything more when loading or saving the file? I suppose that you create the css file for some reason, so what do you do with it?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
After the text file was saved a webbrowser control attempted to navigate to the local document path. Since it's css Frontpage opened the file by default. This error was not readily apparent at first.
>>>>>>>>
Mark
|
|
|
|
|
hello ,
i am using a combobox which is bound to a dataset with a bindingsource
i have set the displayMember to one of the dataset columns ,
what i want to do is add some additional text to the elements displayed text in the combobox ,
for example to the first element i would like to add '1'
and to the 2nd element '2' ....
any idea how i might do that ?
thank you very much in advance!
Net
|
|
|
|
|
hi friend...
i got one solution dt...
dn't set displymember and datasouceid property...
just fill adapter and dataset...
code:.
Adapter.Fill(datset.xyztable);
for(int i=0;i<datset.xyztable.rows.count;i++)>
{
combobox1.Items.Add(i+"-"+datset.xyztable.Rows[i]["columnname"].Tostring());
}
|
|
|
|
|
Hi there.
I am newbie so please bear with me..
I found a universal remote control application for PDA on this site itself.
The link to the application in C# is below
http://www.codeproject.com/KB/miscctrl/UniversalRemoteControlPDA.aspx[^]
I tried posting comments on the application page but since no one replied for over a month i tried putting my questions here.
1: Is this a "real" universal remote control for all ir devices or just for Phillips ir devices?.
2: How do i run this application? I downloaded the source code and "deployed the solution" using pocket pc 2003 emulator on visual studio 2005 but could not find the application on the emulator....
Please help...
Thanks in advance
|
|
|
|
|
Hi,
I have weird problem with SmtpClient class. When I send email using gmail SMTP-server and port 587 it works fine in my own computer but if I install my program to other computer no emails received when I run my program.
Same issue in every other computer. I tried to turn off firewall but still it doesn't work. It doesn't matter what method I use (SendAsync or Send).
Best regards,
Janne Kekki
|
|
|
|
|
Tengo el mismo problema, estoy probando con enviar con puerto 25 y clienteSmtp.EnableSsl = false;
Yo verifico antes que tenga conexion de internet.
|
|
|
|
|
Hi every body
i want to write a program to control one of my windows drives, for example i want to know when and by who (windows user), it is clicked.
i think that, there should be a windows service to control it, but i do not know the way to install a service and the registry key(s) which i should work with.
thanks
|
|
|
|
|
Hi friends
there is nobody to know this? i really want to understand the answer
|
|
|
|
|
amiralimadadi wrote: control one of my windows drives
I do not understand "windows drives"...
amiralimadadi wrote: when and by who (windows user), it is clicked.
U mean to trace the mouse actions?
I Love KongFu~
|
|
|
|
|
yes, i mean the hard drives.
|
|
|
|
|
there is no one who know this!!??
|
|
|
|
|
hi friends...
am stored graphic objects(such as line,rectanle etc...)in arraylist..so now i want to paste the graphic object to screen...please help me..
|
|
|
|
|
Please check this article:
<a href="http://www.codeproject.com/KB/cs/copycustomclasstoclipbrd.aspx">http://www.codeproject.com/KB/cs/copycustomclasstoclipbrd.aspx</a>[<a href="http://www.codeproject.com/KB/cs/copycustomclasstoclipbrd.aspx" target="_blank" title="New Window">^</a>]
Natza Mitzi
|
|
|
|
|