|
im writing a code to compare images from a web cam (motion detection)
if there is a deference i attend to send that image through a bluetooth device to my mobile (nokia 6600) or through my mobile to another one directly without making any confirmation
my Q. is there a code in c# to do it
ashraf hamdan
|
|
|
|
|
Is it possible to manipulate a richTextBox's content without selecting the text to be changed ?
Or is there something like BeginUpdate(), EndUpdate() we find for ListBox ?
What I want is to avoid richTextBox flickering.
(For VB we have the LockWindowUpdate that works with richTextBox)
|
|
|
|
|
I found THE PERFECT SOLUTION at :
http://www.theimagingsourceforums.com/showthread.php?threadid=316120
|
|
|
|
|
I have created an Office COM Add in using C#. I have a form that I want to display in PowerPoint when the user selects a menu item. The menu selection is working but the form doesn't appear. The code stops after .ShowDialog() is executed waiting for the DialogResults to return.
MultiReportActionDialog dlg = new MultiReportActionDialog(Something, null,
MultiReportActionType.Delete);
dlg.BringToFront();
DialogResult r = dlg.ShowDialog();//((System.Windows.Forms.IWin32Window)_ppAddIn.DocWindowHandle)
if(r==DialogResult.OK)
{
foreach(Report rpt in dlg.SelectedReports)
{
do.something
}
}
I have set the ShowDialog arguement to the active window of PowerPoint ppApp.ActiveWindow. I have tried casting the handle of the active window to IntPtr and passing that to ShowDialog but it complains it can't cast IntPtr as a System.Windows.Forms.IWin32Window.
Is this possible? Do I have to control marshalling under the covers instead of letting Interop handle it?
Thanks in advance.
Mark Finley
|
|
|
|
|
Solved. There is a problem in the form itself. Thank you if you read this.
Mark
|
|
|
|
|
Is Possible to hide the page count pop-up that is showed when previewing
a document in the printpreviewcontrol ?
|
|
|
|
|
No it's not. You'll have to write your own print preview control to to do that. You'd want to look into the PrintPreviewControl class before starting on your own PrintPreview Dialog.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I'm trying to access a SQL server in a newly created worker thread. This doesn't seem to work (can't even open a connection!). Is this by design? Can I only access the server in the initial thread?
Thanks for any help!
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
You don't give us a lot to go on. What is the Exception thrown, how are you connecting. Us knowing these things might be useful..
|
|
|
|
|
Sorry!
I'm trying to execute a fairly long list of SQL Commands and I don't want my GUI to hang while dealing with the database. So I've created a seperate thread, which should take care about business.
In this WorkerThread I'm connecting to the Database using an SqlConnection object and a valid connection string. When calling the Open() method, nothing happens. Using the SQL Profiler tool I can't see anything going on at the SQL Server and there is no Exception thrown.
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
Matthias Steinbart wrote:
In this WorkerThread I'm connecting to the Database using an SqlConnection object and a valid connection string. When calling the Open() method, nothing happens. Using the SQL Profiler tool I can't see anything going on at the SQL Server and there is no Exception thrown.
This usually works, and I do this a lot. Please post some small piece of code which reproduces the problem so we may be able to help you...
Yes, even I am blogging now!
|
|
|
|
|
It seems to work for me:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Threading;
public class WindowsForm : System.Windows.Forms.Form
{
public static void Main()
{
Application.Run(new WindowsForm());
}
public WindowsForm()
{
Thread t = new Thread(new ThreadStart(GetData));
t.Start();
}
private void GetData()
{
string query = "SELECT * FROM users";
string constr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\test.mdb;";
OleDbConnection conn = new OleDbConnection(constr);
OleDbCommand cmd = new OleDbCommand(query, conn);
conn.Open();
try
{
OleDbDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
MessageBox.Show(reader.GetString(0));
}
reader.Close();
conn.Close();
}
catch(Exception e)
{
MessageBox.Show(e.Message);
}
}
}
- Nick Parker My Blog | My Articles
|
|
|
|
|
Hi...
I have a pictureBox i would like to use as a button!
I want it to be pressed when i press the enter button, and when i press the Tab button it have to get Focus or something (maybe change image) so the user can see he is at the "button"!
I have the Cursor.Hide() Enabled so the mouse dont work!
Thats why i want the pictureBox to could use TabStop!
First i tried to set the BackgroundImage on the Button, but it didn't look good at all!
So if anyone can help me to make a pictureBox to use tabstop and/or work as a button i would be very happy!
QzRz
|
|
|
|
|
Have you tried using a BUTTON with the IMAGE property set to your graphic???
This signature left intentionally blank
|
|
|
|
|
Yes... it still don't look good!
A black line is all around the button!
And it don't look good with that line
QzRz
|
|
|
|
|
I would think then that your only other option is a bit uglier.
Mark the button as OwnerDraw = true and do your own graphic drawing of the button.
You could create your own button inherited from button ... but then again you still are doing your own drawing of the graphics. Hmm...guess it is really only one option.
Just using a picture box will not inherently give you the behavior of a button. It is doing what it is intended to do which is display a graphic and probably inherits from the same base object as label.
This signature left intentionally blank
|
|
|
|
|
Hmmm.... ot suck i can't make a pictureBox like a button... but you are right it does what it i supose to do!!
So i just have to use a Button....!
Thanks!
QzRz
|
|
|
|
|
You could use a PictureBox as a button, it's just a LOT more complicated than using an actual button and customizing it the way you want.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm creating a website mirroring tool that allows you to filter html and image files by thier file size, but I'm trying to figure out the best way to do this. Is there any way to determine the size of a remote html or image file? Or would one have to download the file and then check the file size? Help is greatly appreciates!!
|
|
|
|
|
adeas wrote:
Or would one have to download the file and then check the file size?
Correct, or you could have a remote object on the server check it for you and simply return the value.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Not an option - trying to code it from the perspective of people not having the rights/capabilities/knowledge to have a program on the remote server like that, just plain site mirroring via HTTP
|
|
|
|
|
If this were the case how would people even know what files existed and where?
- Nick Parker My Blog | My Articles
|
|
|
|
|
You could write a remoting object on the webserver and have the client open a channel to that object. By implementing an interface on the remote object....then the user could access info via the methods GetList() and GetSize(string item) where item is a file exposed via GetList. The user would not need any 'special' security if you set it open as such. However this should only be exposed in an internal application and not for Internet Consumption.
This signature left intentionally blank
|
|
|
|
|
|
One way to do it is to make a request for the file, the content-size is one of the headers sent back so you get the size without the contents, but you still have to make a request per file rather then get a list.
I'm not sure, but there might be a head request to get the content size as well. Or if the server supports WebDAV, it might have methods to get that information as well.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|