|
User register from windows form application and then insert that data to webserver database please help me.
|
|
|
|
|
That is not a question, that is functionality. As is, the task is a bit large to explain.
Have you inserted data into a database before? If not, that is where you start.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I need to display some summary details in the RDLC report and also i need that in the form of table. I tried vertical tablix and bond values with DataSet but right now my problem is the summary details are showing vertically twice.
Eg. I need
Sum1 val1
Sum2 val2
Sum3 val3
Total val1+val2+val3
BUT right now its displaying like
Sum1 val1
Sum2 val2
Sum3 val3
Total val1+val2+val3
Sum1 val1
Sum2 val2
Sum3 val3
Total val1+val2+val3
|
|
|
|
|
That is the code? I am sure not, so the code of your application would help us understand the context and problem.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Thanks..
|
|
|
|
|
I would like to know if it is possible to develop an webcam application under WPF C# to capture webcam image and save it to disk without showing the preview (showing the content to the user)?
|
|
|
|
|
|
|
Great! Please help me with a few codes in WPF C# so I could implement this to my application.
Please note that the objective is not to aware the user of the webcam activity at all.
Thanks in advance.
|
|
|
|
|
I said it's possible, I did not say I know how to do it. You need to study the webcam interface to see what you need to do in order to capture the activity without displaying it. But personally I would never install such an application on my PC.
|
|
|
|
|
Let me clear my objectives one more time before it creates any ambiguity.
This is an application where the user puts a few input in a sequence of pages. Every time the user enters into a page the application captures the image of his/her face along with the other activities with 2 webcams. Reason to take the image is to resolve any dispute if occurs. It would be awkward to show the webcam preview on the input pages. If we had to put an image control it has to be on the main window keeping it hidden.
This is a DropBox application to be written in C# WPF where there are 2 webcams - 1 for the user face and the other at the DropBox shutter end to capture if the user actually dropped anything.
|
|
|
|
|
And how are you going to switch off the Webcam notification itself? You know, the light that appears on the camera when it's in use.
|
|
|
|
|
Since all the webcams are inside the cage the light can not be seen by the user.
|
|
|
|
|
Do take note that this might not be legal in some places
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Don't worry, the DropBoxes are generally like this and it does not have any illegal elements. And by the way we are actually looking for something where there is no preview - just capture on demand. So, even if the user sees the light of the webcam it really doesn't matter because it actually strengthens his side in case of any dispute unless he claims anything useless (like claiming transaction without dropping the envelop).
|
|
|
|
|
Eddy didn't mean illegal activity, but more of the legality of having a person on camera. You may need to have consent from the person or some notification that they are being filmed.
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
Ultimately the webcam image is just a stream of bytes. That's all you need to know to work out the rest.
|
|
|
|
|
Yes. But how do I do it without showing it on the image control?
|
|
|
|
|
It's a stream of bytes. The image control just renders the bytes out - it's a convenience for you. You don't need it. Think about how you save a stream of bytes instead - that's the key. Forget that the Image Control ever existed.
|
|
|
|
|
This is where I failed to implement. Can you please share with me a few codes so I could understand the fact to store the stream anything other than the image control and grab the current from that variable?
|
|
|
|
|
You already have the code. All you need to do is use a FileStream instead of a MemoryStream to write the bytes out to a file.
|
|
|
|
|
Still cannot figure out. Please help the novice.
|
|
|
|
|
Please find below the extarct of my application where the stream is stored in an image control named frameHolder and function SavePic grabs the current frame and save it to disk. frameHolder is shown on the Main Window. Making it invisible captures blank picture.
MainWindow.xaml.cs
void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
LoaclWebCamsCollection = new FilterInfoCollection(FilterCategory.VideoInputDevice);
LocalWebCam = new VideoCaptureDevice(LoaclWebCamsCollection[0].MonikerString);
LocalWebCam.DesiredFrameSize = new System.Drawing.Size(320, 240);
//MessageBox.Show(LocalWebCam.DesiredFrameSize.ToString());
LocalWebCam.NewFrame += new NewFrameEventHandler(Cam_NewFrame);
LocalWebCam.Start();
}
void Cam_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
BitmapImage bi = new BitmapImage();
try
{
img = (Bitmap)eventArgs.Frame.Clone();
MemoryStream ms = new MemoryStream();
img.Save(ms, ImageFormat.Bmp);
ms.Seek(0, SeekOrigin.Begin);
bi.BeginInit();
bi.StreamSource = ms;
bi.EndInit();
bi.Freeze();
Dispatcher.BeginInvoke(new ThreadStart(delegate
{
frameHolder.Source = bi;
}));
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "NW CDM Test of Image Capture Failed");
}
}
Sultan Uz Zaman at 4 hrs ago
Reply Modify the comment. Delete the comment.
A button click event does the follwoing to save the pic:
public static void SavePic(string imageFile)
{
//Cam_NewFrame(null,null);
//image1.Source = frameHolder.Source;
//Image frame = frameHolder.Cam_NewFrame(null,null);
// Release any previous buffer
MainWindow myWin = Application.Current.MainWindow as MainWindow;
RenderTargetBitmap bitmap = new RenderTargetBitmap(320, 240, 96, 96, PixelFormats.Pbgra32);
bitmap.Render(myWin.frameHolder);
using (FileStream stream = File.Create(Global.xImageLocation+"\\"+imageFile)) // or .png
{
JpegBitmapEncoder encoder = new JpegBitmapEncoder();
encoder.QualityLevel = 90;
encoder.Frames.Add(BitmapFrame.Create(bitmap));
encoder.Save(stream);
}
}
|
|
|
|
|
Didn't you just post a code dump about this the other day? If so, what part of the code doesn't work?
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
Friends i use this code to get image from database
and show it on picturebox1
but i am getting
this error
system.drawing.image.fromstream(stream stream,boolean ....)
in database column datatype is varbinary(MAX)
byte[] data = new byte[0];
data = (byte[])(dsetName.Tables[0].Rows[0]["picture"]);
MemoryStream mem = new MemoryStream(data);
pictureBox1.Image = Image.FromStream(mem);
if there is some thing missing in my code than suggest me
|
|
|
|