|
My guess is that there is something up with the memory stream.
Try saving the image to a file (by passing a string) instead of a stream. If the error still occurs, then it must be a problem with the image.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
Hi,
almost all errors occuring in GDI+ lead to the same message, so it can be many things.
Most liekly in your case: you have forgotten to reposition the stream, if you write data
to a stream, its position advances; now if you want to save the image, you need to
set the position to zero again. Try memorystream.Position=0 before Image.Save
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi,
Thanx for reply.
I did this but still getting this error.Actually I m sending Live video from server to client and after recieving every frame this error is displaying so what should I do in this Scenario.
Shanzay
|
|
|
|
|
did you succeed in saving to a file as the other reply suggested?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
yah well I got success by adding two things
1. used thread.Sleep() before saving
2. used file.jpg instead memorystream.
Thanx.
Shanzay
|
|
|
|
|
I am developing a windows application and reqiure to make POPUP Window when my application is minimized to show message what ever i want.
|
|
|
|
|
Dear dikshant,
You have to have an windows form ready as a POP UP window ...
Once you have the form ready ...
you have create an object of that form class and need to call show method of the form class object ..
here is the pseudo code for that .....
frmPopup _fPopup=new frmPopup()
_fPopup.show();
hope it helps !! :->
Thanks,
Arindam D Tewary
|
|
|
|
|
What kind of pop up window do you want ??
|
|
|
|
|
You really were patient enough to wait 9 minutes before asking the same question again?
Great.
But I think you were missing the word "URGENT" in your requests.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
A MessageBox?
If I have understood your question, all you need is MessageBox on the right event.
Something like this:
MessageBox.Show("Your message.", "Caption");
Is this helping?
|
|
|
|
|
Hello I am developing Windows application required to make a POPUP Window when application Minimized so how can i make that popup window.
|
|
|
|
|
|
dikshant@p-dd.com wrote:
Hello I am developing Windows application required to make a POPUP Window when application Minimized so how can i make that popup window.
Don't ask the same question twice within 9 minutes of each other. Be patient and someone will respond.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi frns
i have one dropdown list,button and a grid view in my proj i have filled dropdown list with my database tables values as select items now i want to display in the details of item1 column values in grid view when i select item1 in dropdown list and click on button
plz send me asnwers as early as possible
regards
sunil
|
|
|
|
|
Following is the pseudocode that you can use for your purpose !!!
In the button click event ...
public void button1_Click(object sender,EventArgs e)
{
string _strSelectedID=cboValues.SelectedItem.Value;
_dgrYourDataGridName.DataSource = GetItemDetails(_strSelectedID)
_dgrYourDataGridName.databind() // this line is needed ONLY in case of your application is an Web Application.
}
public DataTable GetItemDetails(string ItemID)
{
// Get the the details of data grid depending upon the ItemID( it is the value of drop down selected item ) and get it as a DataTable ...
_dTItemDetails = DataBaseValues(...)
return _dTItemDetails
}
Happy Coding !!
Thanks,
Arindam D Tewary
|
|
|
|
|
under button clickevent what is cbovalues can u plz tell me
send answer as early as possible
|
|
|
|
|
hi,
my aim is to open a mdi child form which cant be dragged that is storing the positions and other size related properties permanently
if any one knows the answer or any clue please let me know
regards
sindhu tiwari
if i fail 100 times i will never call myself a failure i will tell that i have discovered 100 ways to fail
|
|
|
|
|
The simplest way to stop a form being dragged (moved) around by the user is to set the FormBorderStyle property to None for the Form you are making the MDI Child. Using None as the FormBorderStyle will also prevent the user from resizing the Form.
However this will remove the control bar at the top of the Form, if you can live with that and in order to close the form, you will need to provide a button which closes it.
|
|
|
|
|
hi all,
please do you have any idea to host .net console network server applicatioin inside IIS.May be i am wrong.
if feasible,please give me some useful references.
thank you in advance.
naresh is testing the site.
|
|
|
|
|
dhami_naresh wrote: please do you have any idea to host .net console network server applicatioin inside IIS
IIS is for executing server side scripts. Console application can't be executed by IIS
|
|
|
|
|
oh thank you.
naresh is testing the site.
|
|
|
|
|
hi
can we use TCPChannel in dll that is hosting in IIS.
thank you.
naresh is testing the site.
|
|
|
|
|
If Any one convert this vb code to c# i shall be thankfull to him.
//code started from here
option Explicit
'
private Declare Function FindWindowEx Lib "user32" _
Alias "FindWindowExA" (byval hWnd1 as Long, byval hWnd2 as Long, _
byval lpsz1 as string, byval lpsz2 as string) as Long
'
private Declare Function EnableWindow Lib "user32" (byval hwnd as Long, _
byval fEnable as Long) as Long
public Sub EnableStartMenuButton(byval bEnable as Boolean)
'
' Don't forget to re-enable it !
'
Dim lHwnd as Long
'
lHwnd = FindWindowEx(0&, 0&, "Shell_TrayWnd", vbNullString)
lHwnd = FindWindowEx(lHwnd, 0&, "Button", vbNullString)
Call EnableWindow(lHwnd, bEnable)
'
End Sub
//code ended
tahir
|
|
|
|
|
tahir_makhdoom wrote: public Sub EnableStartMenuButton(byval bEnable as Boolean)
'
' Don't forget to re-enable it !
'
Dim lHwnd as Long
'
lHwnd = FindWindowEx(0&, 0&, "Shell_TrayWnd", vbNullString)
lHwnd = FindWindowEx(lHwnd, 0&, "Button", vbNullString)
Call EnableWindow(lHwnd, bEnable)
'
End Sub
public void EnableStartMenuButton(bool bEnable)
{
long lHwnd;
lHwnd = FindWindowEx(0l, 0l, "Shell_TrayWnd", Constants.vbNullString);
lHwnd = FindWindowEx(lHwnd, 0l, "Button", Constants.vbNullString);
EnableWindow(lHwnd, bEnable);
}
Converted using http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx[^]
|
|
|
|
|
Thanks
i have a little problem in importing a dll
public class()
{
[DllImport("WinLockDll.dll")]
private static extern int StartButton_Show_Hide(bool bShowHide);
}
The error is below can you tell me what i should do
Error 1 The type or namespace name 'DllImport' could not be found (are you missing a using directive or an assembly reference?) e:\NewRestrictionsc#\WindowsApplication1\WindowsApplication1\Form1.cs
tahir
|
|
|
|