|
How to insert images from one window to different windows .for more info u can see the smilyes of outllok .
This is Jitendra
|
|
|
|
|
This can be done with a RichTextBox. There's a good article explaining this in more detail somewhere on this site, I suggest you do a search.
---------------------------
He who knows that enough is enough will always have enough.
-Lao Tsu
|
|
|
|
|
hi all =)
i'm looking on a way to retrieve the date time stamps that are stored in the cache index.dat of IE in order to know the time spend on each url.
if someone can help me
thx a lot
|
|
|
|
|
The cookie cache's index.dat file is weakly encrypted, this straight from the mouth of Microsoft. I'm betting the web cache's index.dat is too. They do that for a reason, so I won't suggest trying to reverse engineer it.
There is an "easier" way, though. Okay, it may not be easier if index.dat isn't encrypted, but it's 100% legal and more durable since Microsoft could change the format of index.dat at any time. Developers aren't supposed to be in it (and I honestly do recommend against this), so Microsoft has the right to change it whenever they want (for performance, size, whatever).
You'll have to declare the IUrlHistoryStg and IEnumSTATURL interfaces (with the proper GuidAttribute s), and define the STATURL structure. Then create a class that implements IUrlHistoryStg and is attributed with the GuidAttribute with the CLSID CLSID_CUrlHistoryStg , which is {3C374A40-BAE4-11CF-BF7D-00AA006946EE}. Also be sure to use the ComImportAttribute or else the CLR will create an instance of your object that uses empty definitions instead of the actual COM instance.
Create an instance of your IUrlHistoryStg implementation class, enum the URLs and get the STATURL struct for each, which gives you the various dates (although IE doesn't track how much time was spent on each site, so I'm not sure what you're talking about there). This will give you the last access time.
Of course, since all the URL history items are actually just .url shortcuts on the file system, you could always use simple IO to enumerate the files and check their last modification date. That should also work.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
If i have a xml document like this:
<?xml version="1.0" standalone="yes"?>
<sessions version="1.0">
<session name="Development">
<parameters>
<rootdirectory>n:\realsoftware</rootdirectory>
<validoslist>win32</validoslist>
<propathwin32>.,[rootdirectory]\usr\%username%,[rootdirectory]\fastforward\pvs100,[rootdirectory]\src,[rootdirectory],[rootdirectory]\start</propathwin32>
</parameters>
</session>
</sessions>
Now i want the text in propathwin32 in a textBox but i can't do it
I tried it like this:
XmlDocument xml = new XmlDocument();
xml.Load(@"c:\listbox.xml");
string test = xml.GetElementsByTagName("propathwin32").ToString();
and i tried it with InnerXml.
can anyone help me?
Thx in advance
|
|
|
|
|
Load the document and use the appropriate XPath expression:
XmlDocument doc = new XmlDocument();
doc.Load(path);
XmlNode node = doc.DocumentRoot.SelectSingleNode(
"/sessions/session/parameters/propathwin32");
if (node != null)
{
} Also, if you use a namespace to qualify your elements (or even attributes, but that's no typical), make sure you qualify them in code, too, by creating an XmlNamespaceManager using XmlDocument.NameTable as the argument to the constructor. Add your namespace and whatever prefix you want (the prefixes don't have to match - only the namespaces). To note, default namespaces (prefixes that equal "") don't work for some weird reason so you'll have to specify an actual prefix.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
you are using the wrong property.
use InnerText rather than InnerXml
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
how to use it in c# and functions inside it?????
|
|
|
|
|
You should ask in the appropriate forum. i.e. The one associated with the article:
http://www.codeproject.com/useritems/GINA_SPY.asp[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
Sorry, I spoke too soon. I originally googled for GINA.DLL and a CodeProject article was the first one hit.
I then googled for site:msdn.microsoft.com GINA and found this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/winlogon_and_gina.asp[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
To consume it, you'll need to declare its native functions in C# using P/Invoke. See the DllImportAttribute documentation in the .NET Framework SDK for details, as well as the MarshalAsAttribute .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
many thanks guys
|
|
|
|
|
I used this code and compiled it in VS2002 and it works fine.
#region Key events
protected override void OnKeyDown(KeyEventArgs kea)
{
switch (kea.KeyData)
{
case Keys.Enter:
...
..
break;
case Keys.Escape:
this.Close();
break;
}
}
#endregion
I then compiled it in VS2003 and it woudn't enter the method when I make
a key event like Esc or any other.
Anyone knows why?
Thanks
Thomas
|
|
|
|
|
The method is OnKeyDown . C# (and IL itself) is case-sensitive. It wouldn't have compiled, though, so I'm sure that is just lazy typing.
What class are you directly deriving from?
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
It's a late replay, but I've been sick...
No the typing where pasted in here(pritty strange)
It's deriving from System.Windows.Forms.Form
I belive it has to be something with VS2003 since it works fine with VS2002.
Thanks
Thomas
|
|
|
|
|
Hello!
I do my programm using Window Forms with C#. I create User Control element which draw some graphics inside and has some interaction with mouse. I place my control in Panel. But size of my Control is higher then Panel size, so, I set AutoScroll of Panel as true. But I find some problem - when I first time scroll down panel and click on my control, panel automaticaly scroll up. On second click (and etc.) panel scroll bar is not jumping to the top. How I can cancel this jump after first click? I need than panel stay on selected position after any click. Can anyone help me?
Additional: I found that it happening due to MyControl.Select() action... In this case scroll is jumping up to the top. How I can overcome this problem?
|
|
|
|
|
The problem has to do with focus. If you just click on your control, focus is given to the control with the first tab stop (TabStop set to 0). If you actually select a control in your UserControl , then it should scroll so that control is in view.
Also, a UserControl and all derivatives are scrollable themselves, so you don't need to put them in a Panel in order to auto-scroll. This might also help the problem of jumping to the top (which, like I said, is a focus thing and is by design) since the UserControl in control of scrolling now, not its parent Panel container.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
!urgent question!!
Now I have to call an Oracle Stored Procedure, which has a set of output parameters. Some parameters type are 'TABLE OF INTEGER'.
If I have to use OleDb, what kind of OleDbType I should use for the
corresponding parameter in Parameters of the OleDbCommand?
I tried IUnknown, LongVarBinary and PropVariant. They don't work.
Or is there any alternative?
Thanks in advance!
|
|
|
|
|
Output parameters of a table type are not supported by the System.Data.OleDb , though you could fanagle them somehow and parse the data yourself. I've seen an example of this a long time back, but it isn't a very efficient operation anyway.
Since you're using Oracle, why not use the Oracle.NET provider which is designed specifically for Oracle (just like SQL Server has had System.Data.SqlClient since .NET 1.0). The Oracle.NET provider is shipped with .NET 1.1 and is available for download somewhere on http://msdn.microsoft.com[^] for .NET 1.0 (they call it a beta, but that's only because they planned on releasing it for 1.1).
In System.Data.OracleClientOracleType I don't see any enum member for a table of data, but there is always RAW, which you can use a byte[] array with and parse out the INTs yourself.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I just installed OracleClient for .NET 1.0. Unlucky, I found those works in the help:
The PL/SQL TABLE data type is not supported by the Data Provider for Oracle. However, REF CURSORs are more efficient. If you must use a TABLE data type, use the OLE DB .Net Data Provider with MSDAORA.
It seems I should come back to use OLEDB. But was really stucked.
|
|
|
|
|
Unlucky indeeded! At least the help gave you a place to start by telling you what OLE DB provider to use.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
One more thing. Perhaps I didn't make things clear.
The problem is NOT if I can parse the data or not. I can't get the data at all.
I got this error message when I try to execute the stroed procedure:
"ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GET_BREAKDOWN'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored"
Thanks for attention!
|
|
|
|
|
That information would've been helpful in the first post.
That documentation you mentioned in the sibling post above didn't specify what OleDbType to use, did it? If you could find an OLE DB tool (there was a good one that came with VB6, but I can't remember what it was called) that gave your the actual DBTYPE_* types of parameters it gets back, you could match those up using information in the OleDbType enumeration documentation. It's apparently possible since it was mentioned in those docs you could, so matching it up to an OleDbType seems to be the only hurdle, unless of course the functionality you need is buried in the C++ OLE DB interfaces and isn't encapsulated in .NET's OLE DB classes. Here's to hope!
I took a look at the OLE DB SDK and found something you probably won't like, though: there is a DBTYPE_ARRAY defined in OLE DB that you can combine with whatever array item type you want, but it isn't exposed in .NET's OLE DB classes.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Now I changed code to like:
OleDbParameter param = new OleDbParameter(sName, new int[5]);
Now I am getting System.FormatException instead of OleDbException from ORACLE.
This is the message text:
"Index (zero based) must be greater than or equal to zero and less than the size of the argument list."
Does it provide any clue?
|
|
|
|
|
That parameter won't get you anything. Don't declare it in your arguments otherwise you won't be getting it back out (you can't reference it).
In any case, the type has to be supported by the OleDbParameter . If there's not a corresponding OleDbType , it isn't supported.
Microsoft MVP, Visual C#
My Articles
|
|
|
|