|
does this mean it is impossible to do this ?
regs
g00fy
|
|
|
|
|
It means no matter what happens, you need to write a TWAIN implimentation, or buy one. Once you do that, I see no reason why you can't render the image being scanned where ever you feel like it, assuming you have that level of control in the code you buy, or write it yourself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
well thats wot i thought, however i downloaded a trial of imageXpress and i cannot see anyway to avoid the twain interface appearing as a secondary process.
note: twain interface in this post refers to the UI not the hardware interface
what i would like is capture froma a twain camera (acting as a web cam), and if the person moves then this is reflected inside the windows forms application. and capturing of the 'video' will result in a still being placed in the same location (or other...)
however, my current implementation..
when you click acquire it pops up the twain interface (where the above description takes place, as opposed to inside the c# app) and on clicking 'get pictures' or similar, the picture is sent back to the windows forms app.
this is what i am trying to acheive and i have googled for a long time and found no suggestion that this is possible, however i assume it is as the twain interface itself is doing this.
kind regards,
g00fy
|
|
|
|
|
I was looking at this[^] the other day and it seems good. I haven't researched further because I haven't had much time, but it might work for you.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
g00fyman wrote:
however i downloaded a trial of imageXpress and i cannot see anyway to avoid the twain interface appearing as a secondary process.
Yeah, well, that's generally how it's done, so that's probably what they support.
g00fyman wrote:
what i would like is capture froma a twain camera (acting as a web cam), and if the person moves then this is reflected inside the windows forms application. and capturing of the 'video' will result in a still being placed in the same location (or other...)
Doesn't DirectShow let you do this ?
g00fyman wrote:
however i assume it is as the twain interface itself is doing this.
Yeah, I'd assume so, too. But I've never done anything like this, when I did TWAIN stuff, it was for a scanner, with the sort of interface you suggest.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thank you both,
i will keep going, i was mainly checking that it was not impossible,
ill be sure to let *everyone* know how its done when completed.
regs to all
g00fy
|
|
|
|
|
g00fyman wrote:
ill be sure to let *everyone* know how its done when completed
An article good be a great way of letting us know! good luck!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
no problem there,
that link u posted uses same 'traditional methods' of acquisition
regs
g00fy
|
|
|
|
|
Well, everytime I've scanned uses the "traditional" method. From any Office application, Paint Shop.... so I don't think it's so bad for scanning.
There's an article here I saw a few days ago about using DirectShow to capture images from a webcam. I quickly searched for it but I couldn't find it. Maybe if you searched more deeply.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
The following code crashes when I try to pass an image
______________________________________________________________________________
private void zoomin_Click(object sender, System.EventArgs e)
{
dxfviewer.Image =ScaleByPercent(dxfviewer.Image,50);
}//end function
static Image ScaleByPercent(Image imgPhoto, int Percent)
{
float nPercent = ((float)Percent/100);
int sourceWidth = imgPhoto.Width; //with is null when passed this way
int sourceHeight = imgPhoto.Height;
int sourceX = 0;
int sourceY = 0;
_____________________________________________________________________________
Any thoughts on why this happens.
Thanks
|
|
|
|
|
Reanalyse wrote:
imgPhoto.Width; //with is null when passed this way
You need to add code to check if imgPhoto is null then, in which case, you have no image to scale and need to just return null.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How do you refer to a control that belongs to a different class within the same namespace?
I have two classes one is named Form1 and the other is named MyClass.
I created a RichTextBox in Form1 and set it's access to Public
When I try to refer to it from within MyClass like so:
Form1.richTextBox1.Text = "";
It tells me that i need to create a reference. How can I do this without setting the control to be a static control?
|
|
|
|
|
The problem is that unless the form is visible, the richTextBox is null, it gets created as the form is created. You should name it something meaningful, make it private, and add a public property for the string. Then in your initialisation code, set the text to equal the value of that string.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
in source code you type( using calasename)
then let you to use public object in calss
|
|
|
|
|
You have to create an instance for Form1, and then access the control.
Form1 form = new Form1();
form.richTextBox1.Text = "whatever!"; You don't pick a color for Ferrari cars. You pick a color for *one particular* Ferrari.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hi,
I am wanting to create a Treeview Thread for loading the tree. I tried just calling the procedure that loads it and I got a control invoke issue. I have never created a thread before so I am looking for a sample if possible.
Thanks
Stephen
|
|
|
|
|
StephenMcAllister wrote:
I tried just calling the procedure that loads it and I got a control invoke issue.
Controls should be manipulated in the application thread. At best, you can load your data into an in-memory table or some sort of structure using a thread, then populate the tree in the application thread.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
There's somenthing you can do. I've not done it, but I'm thinking it might be possible.
You can see this article[^] but the main steps are something like this:
public delegate void AddTreeNodeHandler(TreeNode node);
...
void myAddTreeNode(TreeNode node)
{
treeView.Nodes.Add(node);
}
...
MyThread t = new MyThread(treeView, new AddTreeNodeHandler(myAddTreeNode));
Thread t = new Thread(new ThreadStart(t.ThreadMain));
t.Start();
...
class MyThread
{
Control ctl;
AddTreeNodeHandler atn;
void MyThread(Control ctl, AddTreeNodeHandler atn)
{
this.ctl = ctl;
this.atn = atn;
}
void ThreadMain()
{
while(all nodes you need to add)
{
TreeNode node = new TreeNode("text");
ctl.BeginInvoke(atn, new object[] { node });
}
}
}</code> I did it all from the top of my head, without checking docs, and obviously without compiling it, so it might have some mistakes. But it's a good start for what your trying to do.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
|
Hey!
I am looking for some performance gain in my program.
I have a textbox that shows incomming data, this textbox can be set to any size.
Will the textbox take any performance even if its only 5 height and is coverd by an other control, shold i Hide it instead?
BestRegards
SnowJim
|
|
|
|
|
Snowjim wrote:
Will the textbox take any performance even if its only 5 height and is coverd by an other control, shold i Hide it instead?
I honestly can't imagine that this would have even a measurable impact on performance. Even if you're updating the textbox continuously, the OS should only place one repaint message in the message queue. And the screen rendering is often hardware accelerated nowadays. Your best alternative is not to update the textbox at all, or look for other performance improvements.
Why do you think changing the textbox size will have an impact? Have you done any testing that shows some improvement? I'm truly curious.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
Quite simply just what the title says.
What i want to do is have all of my files built into the app, but i cant seem to play a music file from the resources so i want to move it to a temporary folder, play it there, then delete it when im done.
|
|
|
|
|
Fine leave me to die... I'll just come back to haunt you, HAUNT YOU ALL I SAY
|
|
|
|
|
Hi,
When my file is right clicked, under the version tab,there are details like file version & language. May i know how to retrieve these details of that file in C# program(without right clicking)
|
|
|
|
|
what kind of file? If it is .NET assembly - reflection. If not, it's Win32 resource (IIRC)... I don't know how to get it from executable... but PE is documented format, right? must be on the web...
e.g here[^]
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|