|
For text, you could just create an in-memory bitmap, draw the text on it, and save to tiff.
For rtf, you should be able to do the same using the RichTextBox control and the DrawToBitmap method of the Control class (.NET v2).
For proprietary, closed types such as doc and pdf, you might need some library to parse them out for custom rendering. I can't help you there; I know there are several PDF reader and writer SDKs out there...I'm not sure if any of them support rendering them to bitmap.
|
|
|
|
|
Following up on Judah's suggestion, you may want to check out this[^] PDF to image converter.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I need to call a win32 api into c#
can any 1 suggest any example program to help me understand the idea.
Please any1 out there reply coz i realy need help...
|
|
|
|
|
|
Have you not already asked this question in a round about way?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Hi,
I am creating a setup project in Visual Studio. Apart form installation, I also want to run a batch file during setup. How do I do that?
Thanks in advance.
|
|
|
|
|
|
Is it possible to get a readily available directory and file browser control of like windows explorer so that i can have it populated in a treeview from which i can choose whichever file i want to open.
|
|
|
|
|
System.Windows.Forms.OpenFileDialog, System.Windows.Forms.FolderBrowserDialog
|
|
|
|
|
I have a TabControl 'tabcontrol1', which i am populating with 5 tabpages at runtime. Now i also have another TabControl 'tabcontrol2' which has 2 tabpages of its own already. I want to add 'tabcontrol2' on every one of the 5 tabpages of 'tabcontrol1' when they get created during runtime.
Any suggestions !
|
|
|
|
|
You cannot add a control to multiple parents, AFAIK. Since only one tab can be viewed at a time, just add the tabcontrol2 to whichever page happens to be visible at the time.
|
|
|
|
|
Hi,
I want to perform some action by event handling when
the app window go top and not go top when the user choose
another application on the desktop.
I have try Form.Activated, Form.Deactivate, Form.LostFocus,
Form.GotFocus, Form.Enter, Form.Leave, but none of them work !
Could any one help me pls ?
Thanks
|
|
|
|
|
When the form becomes the active form, you should get an Activated event. We would need to see your code if something is not working right.
|
|
|
|
|
I am working on a project which communiactes with a Radio Device (WR G303e Radio Receiver)connected to PC via USB.
I comes with an API WRG3API.DLL implemented as a 32-bit driver.
In the SDK it has examples for Delphi and C/C++.
My Question is.....
How can i import/communicate (with) this dll to work in C#.
I am looking for some1 2 reply... please help me if any1 out there has any info about this issue...
Kind Regards
t4urean
|
|
|
|
|
I would wrap up the appropriate C++ functions in Managed C++ and then access the managed code from C#
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Antony M Kancidrowski wrote: would wrap up the appropriate C++ functions in Managed C++ and then access the managed code from C#
Ant.
do You mean that i have 2 implement all the functions in a c++ class and then import it in c#?
I am a newbie so i didn't actually understand what do u mean. Can u give me example to make me understand more quickly....
Kind Regards
t4urean
|
|
|
|
|
See Nish's article on C++/CLI[^]. Basically, it allows you to compile C++ and expose certain functions to pure managed languages, such as C#.
In C++/CLI, define a C++ class like this:
public ref class MyClass
{
void DoSomething()
{
}
};
Build this C++/CLI class a .dll.
In C#, add a reference to the C++/CLI dll you just built. You can then call the DoSomething method as if it were written in C#. It's really great. Go read Nish's article linked above. There's another article[^] over at MSDN as well.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: How 'bout a little guitar now?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
I understand your idea...
I have 2 define/call all the functions which I need, from the API in c++ class and then include that class in a c# project.
Can you tell me that wouldn't it be better to directly call the functions from the API in c# (I think there is "dllimport" which I am not totally familiar with).
The reason is that my project deals with real time data and I need high speed response. Using indirect function calls may slow up the process???
... What is your opinion ....
Please comment ASAP
t4urean
|
|
|
|
|
t4urean wrote: unc
C++/CLI is far faster than using dllimport (which is part of P/Invoke). If you read Nish's article linked above, you could see the performance results yourself.
|
|
|
|
|
Hey, I’m trying to search for an ID and get the results from two tables as you can see in the below code.
The problem is that the fields that I save in dataset are from two tables but what can I do about datasource for my DatagrideVeiw there is no specific table ??!!
And when I use this code
dataGridView1.DataSource = myDS;
It doesn’t show anything !!!
string cmd = "SELECT UniversityDB.ID, UniversityDB.UniID, UniversityDB.UniCode, UniversityDB.UniName, UniversityDB.UniAddress, UniversityDB.UniDetail, UniMajorDB.Major, UniMajorDB.Level " + <br />
"FROM UniversityDB INNER JOIN UniMajorDB ON UniversityDB.UniCode = UniMajorDB.UniCode = '" + UniCode_tb.Text + "'"; <br />
<br />
MyAd.SelectCommand = new OleDbCommand(cmd, MyConn); <br />
MyAd.Fill(myDS); <br />
dataGridView1.DataSource = myDS.Tables[TableName];
can you help me out or if there is another way to show the results in DataGridView please let me know.
Thanx
Mr.K
|
|
|
|
|
mrkeivan wrote: dataGridView1.DataSource = myDS.Tables[TableName];
And finally you should call:
dataGridView1.DataBind();
|
|
|
|
|
I did that but i had this error
System.Windows.Forms.DataGridView' does not contain a definition for DataBind
what is this Databind ? what does it do ?
and the thing is that there is no table, I get the fields from two diffrent table, so what should i replace tableName with ??
Mr.K
|
|
|
|
|
Hi,
My first post here so I hope it is in the right place.
Here it goes:
Lets say I have two bitmaps. One of them is smaller than the other.
Now I want to find out if the smaller bitmap occurs somewhere "inside" the other bitmap.
How am I going to do that? I cant be to demanding, because I want some speed...
I have tried filling arrays with the bitmaps color-values and then comparing them pixel by pixel. Cant seem to get it to work properly...(maybe someone could show some code?)
Im getting very annoyed by this.
Thanks for any help. I need it.
HjalleBK
|
|
|
|
|
There are many algorithms out there for bitmap matching. The solutions generally are not trivial.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Yeah I have found a lot of those, but there is a big difference betweeb comparing two bitmaps and finding a bitmap inside another, but maybe its just me being stupid.
HjalleBK
|
|
|
|