|
|
You must have missed the part where I said LATEBINDING.
But thanks anyway.
|
|
|
|
|
If you want to perform late binding, you need to follow the following steps. You need to use Type.GetTypeFromProgID to retrieve the type from program ID that you want to work with, e.g. Word.Application. Create the object using Activator.CreateInstance and then use calls like InvokeMember to invoke methods in the DLL.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: If you want to perform late binding, you need to follow the following steps. You need to use Type.GetTypeFromProgID to retrieve the type from program ID that you want to work with, e.g. Word.Application.
Hi Pete
My apologies for only replying now.
I think my problem is that there exists no such Program ID on the system, according to what I've read in Microsoft's documentation, there is a registry entry for every valid program ID. My application however, retrieves the DLL file from a DB (in a BLOB field), saves it on the HDD and then attempts to work with it.
That last bit is where I'm stuck. Do I need to register the DLL with the system in order for it to be a valid ProgramID? And furthermore, I see that the programID always conforms to {Application}.{Class} or so it seems, I'm not even sure what my DLL's programID will be even if I do manage to use it in this manner.
I'd appreciate any help you may be able to provide.
Kind Regards!
|
|
|
|
|
|
Hi experts,
I am looking for code to generate thumbnail for the first page of Microsoft Office document (such as word,excel) and PDF. I found sth like this in MSDN and tried it, however, what is the missing reference for "Doc" as in the first line. What reference should I use for the "Doc"?
InlineShapes shapes = Doc.InlineShapes;
int i = 0;
foreach (InlineShape shape in shapes)
{
if (shape.Type == WdInlineShapeType.wdInlineShapePicture)
{
shape.Select();
shape.Application.Selection.CopyAsPicture();
IDataObject data = Clipboard.GetDataObject();
if (data.GetDataPresent(DataFormats.Bitmap))
{
Image image = (Image)data.GetData(DataFormats.Bitmap, true);
image.Save("c:\\111.bmp"), System.Drawing.Imaging.ImageFormat.Bmp);
}
}
}
Could anybody kindly help me with this? Will this code do the job or you guys have better solutions? Thank you very much.
Chris
|
|
|
|
|
this[^] might help you out, I think it's in the Microsoft Word 11.0 Object Library (you might want to Google for Microsoft Office Primary Interop Assemblies).
|
|
|
|
|
Respected Sir, i have just completed my Engineering. now i am trying to make a real time project, kindly help me,
first we need to Documentation( what things we should take care in that), what kind of ADO.net we should use (Connected or Disconnected), should we use Store Procedure and pls explain me why we use foriegn key, and if possible we me a small explain about primary and foreign in data dase and then relating data from primary field to foreign key feild...........
Thanks Everyone
Regards
Amaaan Khan
|
|
|
|
|
You would be far better served by buying a book or two.
The information you have asked for is far too complex and long to be covered in a forum such as this.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
How To disable the Close(X) in the windows form application?
Please help
|
|
|
|
|
|
|
Hi all. I want to get the columns in a DataGrid as an Array and i am trying such a piece of code:
foreach (DataGridViewColumn column in dataGridAppointments.Columns)
{
...
}
Where dataGridAppointments is a DataGrid control. I keep on getting the error message:
'System.Windows.Forms.DataGrid' does not contain a definition for 'Columns'.
How can i manage to loop through the collection of columns.
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
dataGridAppointments is not a DataGridView.
|
|
|
|
|
Thanks. So how do i get the columns in the DataGrid?
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Just for example :
DataGrid dataGrid;
.
.
.
to get Cell :
dataGrid[0, 0] -> means cell at row 0 and column 0
.
.
.
so... you can enter any number.
|
|
|
|
|
If you are in fact using a DataGrid you cannot use DataGridViewColumn since the DataGrid and the DataGridView are two different classes. I believe the DataGrid is in the System.Web.. namespace and DataGridView in the System.Windows.Forms namespace. Are you developing a WinForm application or a webb application?
|
|
|
|
|
Calla wrote: I believe the DataGrid is in the System.Web.. namespace and DataGridView in the System.Windows.Forms namespace. Are you developing a WinForm application or a webb application?
You're wrong.
DataGrid is a control in System.Windows.Forms
It's just way older than DataGridView and does not have a Columns collection.
var question = (_2b || !(_2b));
|
|
|
|
|
Okay then.. my bad
|
|
|
|
|
so ive got a webbrower which is filling in a form.
im using a listview to fill in different data for each listview item.
i call the fill webpage method, but i cant pass any variables to it, because its a documentcompleted event.
so i tried config settings, but it goes so fast that the settings dont change in time and they send the same data over and over, the amount of times is the amount of items.
so this is what i have:
private void cmd_Click(object sender, EventArgs e)
{
foreach (ListViewItem item in lvAccounts.Items)
{
Properties.Settings.Default.iEmail = iEmail;
Properties.Settings.Default.tehEmail = tehEmail;
Properties.Settings.Default.Save();
webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(SendMail);
webBrowser1.Navigate(myURL);
}
}
private void SendMail(object sender,WebBrowserDocumentCompletedEventArgs e)
{
HtmlDocument document = webBrowser1.Document;
document.GetElementById("to").SetAttribute("value", Properties.Settings.Default.iEmail);
document.GetElementById("body").SetAttribute("value", Properties.Settings.Default.tehEmail);
document.GetElementById("submit").InvokeMember("click");
}
thats the only way i see that i can pass variables on.
but i really need to know how to, because it sends the same thing, and sometimes the second on the list, if the list is long and takes a long time.
i basically want it to fill in the webbrowser one time with each listview item, with the different values.
please help
|
|
|
|
|
Hello. I got a code here in codeproject.com about radix sorting but it only sorts int based data. I want to use it to sort a string based data. My first try is I got first the ASCII codes of each characters in the strings then passed it in the radix sort code but what it gives me is totally different.
This is the link of the code that I got:
click here
Here is the output after getting the ASCII codes and pass it to the radix sort:
SHOW DATABASE: SORTING BY LAST NAME
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
97
97
97
110
110
111
111
111
114
115
115
115
117
122
122
What should I do for it to be able to sort string?
modified on Friday, September 4, 2009 6:02 AM
|
|
|
|
|
It would be more sensible to write a sort routine that accepts strings and sorts them by character order. Alternatively you could use one of the built in List/Array etc types that support sorting via one of their member functions.
|
|
|
|
|
Hi,
I don't know why you insist on using radix sort, as it will be slower than a regular sort when sorting strings.
Here is how it could work:
- determine the length L of the longest string;
- treat all strings as having length L by virtually appending NULL characters;
- the Nth "digit" of a string has a value that equals the (int) value of its Nth character (where you use zero if N exceeds the string length).
So sort all strings according to their (L-1)th character
then sort according to their (L-2)th character
etc
and finally sort according to their first character
As I said, it will be slow, as you have to get the characters, one by one, and compare those, whereas a normal sort would be based on a comparer method (such as string.Compare) that takes the whole string into account right away.
|
|
|
|
|
hello guys,
I am in a situation where I have an application that needs to be called from another application and then pass parameters and set properties to this application.
I cannot do this by Reflection as its not a DLL, and I cannot do it by calling Process.Start(..,arguments); and pass the arguments because the application dosen't have a public static void Main method.
Do you know any way in which i can achieve this guys?
|
|
|
|
|
??? What kind of application is that ???
Not a DLL but an EXE without start point ???
|
|
|
|