|
Search MSDN for "sysobjects". It's a "table" where this kind of metadata information is available and it's fully documented on MSDN.
As a sample, if you want the list of all the tables on the current database, run:
select name from sysobjects where xtype = 'U'
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
The system tables are subject to change in future versions of SQL server. (They have changed before)
The recomended approach is to use the INFORMATION_SCHEMA views and some system stored procedures, since MS have committed to keep the output of these compatible through all versions on SQL Server they exist on, and they will exist on all future releases of SQL Server. (Meaning MS has added some, but not removed any of them...)
Usage example:
SELECT * FROM INFORMATION_SCHEMA.TABLES
Lookup in BOL's index on INFORMATION_SCHEMA
|
|
|
|
|
I have RichTextBox with some menu items I've added, like "bold", "italic" ...all the normal stuff.
But I'd like to add some cool effect things too. Right now, I'd like to add a color gradient feature that would allow the user to choose two colors and the selected text does a gradient color change from color1 to color2. Kind of like you can do with Yahoo Messenger if you are familiar with Y!Messenger.
I've seen an example of doing this with drawing through a built in API call, but is there a way I can do that with RichText (RTF) ? Or can I use a DrawString and convert it to RTF in some easy way?
I started out trying to do it manually, but there are a lof of special cases depending on the distance of each color component (R, G and B), and the number of chars, etc...
Any ideas?
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Right...that's what I was saying was possible...but how do I get it back to RTF from there?
It's now a "graphic" right? How can I convert that back to the RTF form in the RichTextBox window?
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Can you use a DrawString() in an RichTextBox control?
I need the RTF string in the RichTextBox control to update with the color format. I'm afterward converting the formatting from the RTF to another format.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Check this, it's probably not exactly what you are looking for but pretty close. Give it a shot:
Your first C# control[^]
-Nick Parker
|
|
|
|
|
All rightie...
I have a design problem. I'm coding an image processing application.
I have some functions for the different transformations in my app. I've then declared some delegates for those functions, and when the user chooses a transformation the appropriate delegates gets pushed in a collection.
That way I have a kind of a stack of transformations and the user can rearrange the operations and such. Clever right?
BUT, now I'm seeing a bloody big flaw. All the transformation functions need to be of the same signature (because of the delegates of course), and many transformations need some input variables; some many, some a few, and some none at all.
I don't know what to do about this. Any suggestions?
I've thought about passing around some kind of a TransformationArgs struct. That way if the transformation needs some input they can get from that. It just seems so "un-tight" and error-prone. But maybe that's just me?
Anyway, any kind of suggestions/comments would be much appreciated.
|
|
|
|
|
whay not have an abstract class TransformationArgs as the parameter.
Then each transformation class can derive its own version with more specific information.
Each class can then test that its got a pramaters that can be cast into their specific version - an if not throw an exception.
Otherwise, get the transformation class to call back an request the paramaters...
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
hello
there is an exception in the last line of the code
i actually want to get everything in the TABLE tag, but this is the hurdle in my way.
EXCEPTION IS: object reference not set to an instance of the object.
plz help me out.
mshtml.HTMLDocument doc = new HTMLDocumentClass();
doc = (HTMLDocument) axWebBrowser1.Document;
string docstr=doc.body.innerHTML;
MessageBox.Show(docstr,"inner HTML");
object abdoc=doc.getElementsByTagName("TABLE").item("TABLE","1");
String msg=abdoc.ToString();
ASIM
Asim
|
|
|
|
|
Hi All,
Is there any one know how to send a file from PC to PDA through IrDA using C#? I had tried to use winsock in the System.Net.Socket but to no avail because I don't have much knowledge in IrDA programming. There is alot of C++ sample code on the web that on IrDA programming but I can't find any in C#.
Please help. Thanks.
Regards
Sek Huat
|
|
|
|
|
I have a COM+ component written in C++ from an external provider. We wish to call this component from a .NET managed code application. I am using the .Net Framework 1.1.
The COM+ interop is working fine for the basic calls to the component (using standard data types), but one of the calls requires an array of C++ structs to be passed. Because of COM+ marshalling this is packaged into a SAFEARRAY and then passed as a VARIANT*.
I cannot find how to write the equivalent of this C++ code in C#. From documentation I can find, the passing of structures in a VARIANT was not supported in .Net 1.0, but it may be now - I just cannot find any documentation.
The C++ sample code is below:
struct sTaskFile
{
char TaskFileName[600];
sTaskFile() { memset(this, '\0', sizeof(this)); }
};
VARIANT vFileDet;
VariantInit(&vFileDet);
sTaskFile File1;
sTaskFile File2;
strcpy(File1.TaskFileName, "\\\\steve\\c$\\boot.ini");
strcpy(File2.TaskFileName, "\\\\steve\\c$\\Acturis.ini");
SAFEARRAY *pSA = NULL;
SAFEARRAYBOUND SAb[1];
SAb[0].lLbound = 0;
SAb[0].cElements = sizeof(sTaskFile) * 2;
pSA = SafeArrayCreate(VT_UI1, 1, SAb);
pSA->pvData = malloc(sizeof(sTaskFile)*2);
memcpy(pSA->pvData, &File1, sizeof(sTaskFile));
memcpy((char*)pSA->pvData + sizeof(sTaskFile), &File2, sizeof(sTaskFile));
vFileDet.parray = pSA;
vFileDet.vt = VT_ARRAY | VT_UI1;
WMCreateTask(&vFileDet);
|
|
|
|
|
Chris Goddard wrote:
Because of COM+ marshalling this is packaged into a SAFEARRAY and then passed as a VARIANT*.
You can use part of the System.Reflection namespace to apply attributes to the particluar item you need to pass as a SAFEARRAY . Something like this wrapped around your C# variable might help, let me know.
<code>[MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VarEnum.VT_VARIANT)]</code>
-Nick Parker
|
|
|
|
|
Hi, friends! I want to do a graphic toolbar , but how could I do a rebar ? thx!
|
|
|
|
|
I have a plugin that exists as an API for Acrobat. This plugin converts PDF's to HTML. I need to access this plugin to automate the process of conversion in my application. Can anybody help me with this??
Cheers,
slnarasimhan
|
|
|
|
|
Is this API available as a DLL or a COM Control.
If its a DLL and exposes the API as a exported function, you can try through P/Invoke to perform the conversion, if its a COM object, add to your project as reference and call the functions through the proxy class generated to visual studio.net.
Cheers,
Kannan
|
|
|
|
|
You can use System.Runtime.InteropServices to call Native Code
from C#/.net
See PInvoke in MSDN.
Deepak Khajuria<pre>
|
|
|
|
|
Thanks ppl but the main problem is i don't know where this API resides(in which DLL). All i know is that it is a plug in available for the Acrobat.
Thanks,
SLN
|
|
|
|
|
If it is exported function, then you can use Depends utilty ( comes with visual Studio ) to find out which dll exports it.
Otherwise if it is a COM API, there is no need to find out, just import in into the project.
Deepak Khajuria<pre>
|
|
|
|
|
It is definitely not a COM api... I am searching for the depends utility.. Wld be great if you cld tell me where to find this utility.
I tried dllimport with a dll called plugin.dll.. thought this wld contain my required api.. but i am not able to define the entry point to this...
Regards
Laks
|
|
|
|
|
|
Thanks Deepak. I tried it out with depends but could find out nothing definitive. Almost all the DLL's appear on the depends tree for this API.
However i found an entrypoint to a function within the api.I shall try to call this function somehow but i dont know anything about this, the parameters etc.. is there a tool to view this information too???
Moreover 'depends' highlights this api's subsystem as GUI so i don't know if i could really use it for my purpose. Thanks anyway i have definitely learnt a lot.
Regards,
laks
Yours Truly
SLNarasimhan
|
|
|
|
|
Hi,
This was what i found out. I tried to import the API and call the function, but i get a System.FormsException on returning from the function. And nothing happens on the function call.
Regards,
Laks
|
|
|
|
|
I'm developing a C#/WinForms application which features a desktop control (Panel) that contains child controls (also Panels). The child controls may contain Buttons.
Sometimes I need to draw arrows between a Button in one child control to a Button in another child control. This arrow drawing is handled by the desktop control's OnPaint method. In the current implementation, the arrows are behind all of the desktop control's child controls. What I would prefer, though, is for the arrows to be drawn in front of the child controls, i.e. above or on the child controls.
How can I do this? Do I have to trap for something in desktop's WndProc, and then paint the arrows after Control.WndProc handles it? Would that work? Is there a better way?
|
|
|
|
|
Sounds like just the arrow paint is happening before the children control's OnPaint().
I think you can fix it by modifying the order in which the OnPaint() handler's occur.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Hmm, that's what I thought...
I had:
<br />
protected override void OnPaint(PaintEventArgs pe)<br />
{<br />
base.OnPaint(pe);<br />
<br />
}<br />
But that didn't work. Any other ideas?
|
|
|
|