|
|
Ok good, you're welcome
|
|
|
|
|
|
Can't you use
private Null<int?> index = null;
or
private Null<int>? index = null;
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
|
Hi
I have been using Total Copy for like for ever, but I always wanted to write my own App for copying files with the same functionality.
How can I pause and resume the copy of a file in C# (WinForms) as Total Copy does?
I've tried Googling, but I'm not finding what I'm looking for.
Thanks in advance.
|
|
|
|
|
Use FileStream to copy the source file into the target file. When you want to pause the opration you just need to close the stream. When you want to resume, you can use seek method find last written byte and restart writing.
Another way could be to have copy operation on a separate thread which can be stopped and resumed when required. I have not tried this hence not sure.
Hope this helps.
|
|
|
|
|
Thanks for the reply. Maybe binary Reader would do the job... will check it out.
|
|
|
|
|
Hi all
on a video stream display control i have i've got an overlay bitmap on which I can add markers. the bitmap is defined to be the size of the video stream (say 640X480 for a webcam), but the user can resize the display, so the videoimage + bitmap are also resized befor display . i've got markers drawn by the Graphics.DrawLine(...) with a 1 pixel width Pen. the user can also move the markers about. if the resize is by a whole number (say, resize the 640x480 to 1280x960 and so on) there are no problems, bit if the ratio is fractional (say 640x480 to 1024x768, which is 1.6) i have the following artifect: whenever the coordinate times the ratio gives a float with the fractional part larger than 0.5, the line thins out by a pixel. so if i'm running on a 1600X1200resolution and the stretch is to 1024 the line thins from 2 pixels to 1, but on a lower screen resolution the line dissapears completely. since the markers are sort of crosshairs, it's a real problem i can't ignore. I tried rounding down the coord value to prevent this, but no good, so if anybody has encountered this before i'd love to hear about it .
thanks
grizli
|
|
|
|
|
Hi,
to get the best results when the overlay contains either lines with fixed thickness (such as cross-hairs) or text, both of which don't scale well, this is what I would try:
1. either don't use an overlay bitmap at all, just draw the overlay in real-time
2. or generate a new overlay bitmap every time the video display gets resized
Both have in common that they should work at the display resolution, not the original video resolution.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 9:16 AM
|
|
|
|
|
How to put the bitmap/image on the button.
thanks
|
|
|
|
|
Button has Image propery. Use it.
|
|
|
|
|
Hiii
I am developing one window application in c# and .net with sql server 2005 as database.
now, i have Four questions:
1] I have one dropdownlist in form and i want to fetch the content/data of table category in to this dropdownlist and when I run this form on clicking dropdownlist the data should be displayed in dropdownlist.
2] As i said one dropdownlist is there and also one textbox is there in this form , now i am selecting one value from dropdownlist and entering keyword or text in textbox and pressing button search, on click event of this button it should compare the dropdownlist and textbox and depending upon the comparision the result should be display in datagridview. the value of dropdownlist and textbox are the data member of table Product
and result should be fetch in datagridview from this table "Product"
3] In Web application we have file uploader control so how we can provide file upload facility in window application?
4] How We can make search of particular keyword in PDF files?
I am really frustating by this questions and my project arrived at the deadline please help me!
I hope You will Help me in good way! Thanx in Advance.
|
|
|
|
|
1 and 2 are pretty trivial. It's obvious that 3 and 4 and totally beyond you. I recommend that in future you learn the language/platform you're paid to code in, instead of asking people to do your work for you after the deadline expires.
For number 1 and 2, I can only say, learn to use google and buy a book. They are both trivial.
For 3 - a web app is already connected to the server. Your app is not. The easiest way to do this, is to create a web service on the server that takes the information of a file, and then use that to send files to your server.
For 4 - you need to buy a PDF library.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Digubha wrote: my project arrived at the deadline please help me
Be patient. Deadlines come and go. Nothing to worry about.
Do your work yourself.
|
|
|
|
|
|
There's a forum under the article for questions to the author. Do you have .NET installed ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello,
i have an exception on the bold text code, but in another comptuer, this code work :
<br />
XlFixedFormatType paramExportFormat = XlFixedFormatType.xlTypePDF;<br />
XlFixedFormatQuality paramExportQuality =<br />
XlFixedFormatQuality.xlQualityStandard;<br />
bool paramOpenAfterPublish = false;<br />
bool paramIncludeDocProps = false;<br />
bool paramIgnorePrintAreas = true;<br />
object paramFromPage = Type.Missing;<br />
object paramToPage = Type.Missing;<br />
<br />
<br />
excelWorkBook = excelApplication.Workbooks.Open(paramSourceBookPath,<br />
paramMissing, paramMissing, paramMissing, paramMissing,<br />
paramMissing, paramMissing, paramMissing, paramMissing,<br />
paramMissing, paramMissing, paramMissing, paramMissing,<br />
paramMissing, paramMissing);<br />
<br />
if (excelWorkBook != null)<br />
<big> excelWorkBook.ExportAsFixedFormat(paramExportFormat,<br />
paramExportFilePath, paramExportQuality,<br />
paramIncludeDocProps, paramIgnorePrintAreas, paramFromPage,<br />
paramToPage, paramOpenAfterPublish,<br />
paramMissing);</big>
the office 2007 was installed, but there are always this exception, please help me to resolve this great problem, thank you verry mutch.
|
|
|
|
|
How about telling us the exception message, and what's different ( such as different office versions ) between the two machines ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
It is the same version of office, it's office 2007 plus, thank you verry mutch.
|
|
|
|
|
OK. But what error message you are getting ?
I think (just a guess) that you dont have correct filepath. i.e. you are using D:\xyz and D: is not there or xyz is not there.
or try this.
in Office 2007
*) Open the 2007 Microsoft Office system application in question. Click the Microsoft Office button, and then click Application Options.
*) Click the Trust Center tab, and then click Trust Center Settings.
*) Click the Macro Settings tab, click to select the Trust access to the VBA project object model check box, and then click OK.
*) Click OK.
Or try opening excel application (manually) and then run your code.
|
|
|
|
|
Thank you verry mutch for your answer but it doesn't work, in a computer it's the same parameter's of office and it work but in my pc it don't work, i try to install microsoft office 2003 and it the same, please help me to resolve this problem, thank you verry mutch.
|
|
|
|
|
But what is the error message you are getting ?
Try this one.
1. Click Start, click Run, and then type DCOMCNFG. Select the application that we want to automate. The application names are listed below:
2. Microsoft Excel 97/2000/2002/2003 - Microsoft Excel Application
3. Click Properties to open the property dialog box for this application.
4. Click the Security tab. Verify that Use Default Access Permissions and Use Default Launch Permissions are selected.
5. Click the Identity tab. Verify that The Launching User is selected.
6. Click OK to close the property dialog box and return to the main applications list dialog box.
7. In the DCOM Configuration dialog box, click the Default Security tab.
8. Click Edit Defaults for access permissions. Verify that the following users are listed in the access permissions, or add the users if they are not listed:
SYSTEM
INTERACTIVE
Everyone
Administrators
OfficeAutomationUser
IUSR_<machinename>*
IWAM_<machinename>*
* These accounts exist only if Internet Information Server (IIS) is installed on the computer.
9.Make sure that each user is allowed access and click OK.
Click Edit Defaults for launch permissions. Verify that the following users are listed in the launch permissions, or add the users if they are not listed:
SYSTEM
INTERACTIVE
Everyone
Administrators
OfficeAutomationUser
IUSR_<machinename>*
IWAM_<machinename>*
* These accounts exist only if IIS is installed on the computer.
|
|
|
|
|
When i excute DCOMCNFG, a table appear, there are a root : consol and thre fields : services composant, services and log file, but i don't find microsoft excel 2003 or 2007, thank you verry mutch.
|
|
|
|
|
in "DCOMCNFG"
Go to
Component Service
Computers
My Computer
DCOM Config
now select from right hand side list
|
|
|
|
|