|
Hi
I need to draw images into the device screen using filter graph is it possible?
Regards
Sheeja. A.L
|
|
|
|
|
Hi,
iam doing windows application in c#
my windows form consists of textboxes,lables,buttons and datagridview control..
now i want to print the form...is there any code for both form controls and datagridview control printing ....
thanks in advance..
with regards
murali
murali krishna
|
|
|
|
|
1. Use BitBlt API or PrintWindows API to capture the screenshot of your window form.
2. Save it as image in your memory stream or disk.
3. Print this image.
Example : Printing a Windows Form[^]
Hope it helps.
|
|
|
|
|
Image of complete form or image of any control can be drawn on a bitmap object using Control.DrawToBitmap() function, here it would be something like, this.DrawToBitmap().
Once you get snapshot on a bitmap object, use PrintDocument control and draw this image using e.Graphics.DrawImage in PrintPage event of PrintDocument.
I hope this helps.
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
I have installed an application using clickonce.
The user is running the application on wini xp pro machine.
Not sure why the user sometimes gets the following message when trying to open the application.
In case it makes any difference, the application is written in .net 2.0
Any thoughts please?
Here is the error message:
Cannot Start Application
Cannot continue. The application is improperly formatted.
Contact the application vendor for assistance.
OK Details…
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.42
System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200)
mscorwks.dll : 2.0.50727.42 (RTM.050727-4200)
dfdll.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)
SOURCES
Deployment url : file:///C:/Documents%20and%20Settings/engelber/Start%20Menu/Programs/xyz%20Europe/PricingAnalytics.appref-ms
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Documents and Settings\engelber\Start Menu\Programs\xyz Europe\PricingAnalytics.appref-ms resulted in exception. Following failure messages were detected:
+ Exception reading manifest from http://ldn03a01/PricingAnalytics/PricingAnalytics.application: the manifest may not be valid or the file could not be opened.
+ The 'link' start tag on line 20 does not match the end tag of 'head'. Line 222, position 3.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [10/12/2007 07:05:54] : Activation of C:\Documents and Settings\engelber\Start Menu\Programs\xyz Europe\PricingAnalytics.appref-ms has started.
* [10/12/2007 07:05:54] : Performing necessary update check as specified by the deployment.
ERROR DETAILS
Following errors were detected during this operation.
* [10/12/2007 07:05:54] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from http://ldn03a01/PricingAnalytics/PricingAnalytics.application: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifest(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState subState)
at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, TempFile& deployFile)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Xml.XmlException
- The 'link' start tag on line 20 does not match the end tag of 'head'. Line 222, position 3.
- Source: System.Xml
- Stack trace:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlCharCheckingReader.Read()
at System.Xml.XsdValidatingReader.Read()
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
|
|
|
|
|
either *.application (e.g. Shell.application) or *.exe.manifest (e.g. Shell.exe.manifest) is invalid. So, try to fix those files by using megaui tool or republish your application.
|
|
|
|
|
Hi,
How do I create the aspx page on the fly? is there any better solution.
|
|
|
|
|
1 - ask in the ASP.NET forum
2 - why do you want to, and what do you mean by 'on the fly' ? ASP.NET allows you to use things like literal controls to generate any HTML you like. You can also create controls themselves on the fly, but if you do, you'll have to work hard to get events from them.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Use file manipulation function to create a file and write contents into that following ASP.NET syntax. This newly created page won't have a code-behind file. You need to write server side scripts in ASPX page itself. But this method is tough for doing changes to the page.
|
|
|
|
|
What am I doing wrong in this snippet of code? I can't seem to figure out how to make this work:
using System;
public class DebugFive2
{
public static void Main()
{
const string pass1 = home;
const string pass2 = house;
const string pass3 = mouse;
string password;
Console.Write("Please enter your password ");
password = Console.ReadLine();
while(password != pass1 || password != pass2 || password != pass3)
Console.WriteLine("Invalid password. Please enter again. ");
password = Console.ReadLine();
Console.WriteLine("Valid password");
}
}
Any help would be greatly appreciated
|
|
|
|
|
First: you should get an compiler error with the consts - use const string pass1 = "home"; for example
Second: in your while-loop you are just using the Writeline (no block) - use this:
<br />
{<br />
Consoloe.WriteLine(....<br />
password = ....<br />
}<br />
Then your problem is with the ORs (||):
You iterate the while-loop as long the password is not pass1 OR not pass2 OR not pass3 and as pass1 != pass2 != pass3 you will satisfy this contition no matter what the input is - so just use && instead of || (substituting OR with AND) and it will work.
|
|
|
|
|
Thanks CKnig, that definitely cleared things up for me. I appreciate your help!
|
|
|
|
|
Hello everyone,
I have a WebBrowser Control in Windows Application. As the user Navigate using the Web Browser Control if the site tries to open a new Window using script I get the following error.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I also tried the code given here http://www.codeproject.com/KB/cpp/ExtendedWebBrowser.aspx[^] and same error was given.
I am using Visual Studio C# 2008.
Can anyone tell me what is going on and how I can sort this out?
Thank you very much for your help and have a great day.
Khoramdin
modified on Sunday, December 09, 2007 11:07:25 PM
|
|
|
|
|
What does the debugger say. If an error is reproducable in this way you can be lucky.
The reasons are many: Overwritten memory, buffer overrun, unlocked pointer, pointer to a pined managed object were the pn is freed, but the pointer is still in use...
Repro the error in the debugger and watch the call stack.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Vri SSK wrote: What does the debugger say. If an error is reproducable in this way you can be lucky.
The reasons are many: Overwritten memory, buffer overrun, unlocked pointer, pointer to a pined managed object were the pn is freed, but the pointer is still in use...
Repro the error in the debugger and watch the call stack.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=148108&SiteID=1[^]
|
|
|
|
|
|
Did it occur to you to just remove the line and see what happened ? Either way, this is better written as f.WriteLine("*"); instead of two statements. That should also make clear what's going on.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi there,
I’m working on smart client application and i use WCF as main communication service.
Most of the times I use single Dataset to transmit data from the client to server (service) and vice-versa.
My dataset would contain only one table with single record (as i have normalised pulling large data in single dataset).This record had a column which stored actual file date (byte array). This is working fine for < 1MB data.
Never before I have come across transmitting large data via WCF (large data-size being approximately more than 2MB and defiantly less than 10MB). And this is something i need to implement but i have very little idea.
I have started looking on net for solution but none of them seems to be working for me.
Well i have done the following
client side
Binding being
<system.servicemodel>
<bindings>
<wshttpbinding>
<binding name="WSHttpBinding_IAttachmentService" closetimeout="00:10:00">
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="500000" maxReceivedMessageSize="1000000"
messageEncoding="Mtom" useDefaultWebProxy="true" allowCookies="false">
<readerquotas maxdepth="32" maxstringcontentlength="8192">
maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliablesession ordered="true" inactivitytimeout="00:10:00" enabled="false" />
<security mode="Message">
<transport clientcredentialtype="Windows" proxycredentialtype="None" realm="" />
<message clientcredentialtype="Windows" negotiateservicecredential="true">
algorithmSuite="Default" establishSecurityContext="true" />
</message></security>
</readerquotas></binding>
</wshttpbinding>
</bindings>
</system.servicemodel>
server side
Binding being
<binding name="Binding_IAttachmentService" closetimeout="00:10:00">
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="500000" maxReceivedMessageSize="65536"
messageEncoding="Mtom" useDefaultWebProxy="true" allowCookies="false">
<readerquotas maxdepth="32" maxstringcontentlength="8192" maxarraylength="16384">
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliablesession ordered="true" inactivitytimeout="00:10:00">
enabled="false" />
<security mode="Message">
<transport clientcredentialtype="Windows" proxycredentialtype="None">
realm="" />
<message clientcredentialtype="Windows" negotiateservicecredential="true">
algorithmSuite="Default" establishSecurityContext="true" />
</message></transport></security>
</reliablesession></readerquotas></binding>
please let me know if there is something I’m missing to change on dataset or on my service proxy level or on service itself. I was thinking dataset by default is serializable and so i need not wrap it to WCF DataContract. if thats not the case then is there an alternative solution to my problem.
It would be very helpful if someone throw some light on me.
regds,
pavan
|
|
|
|
|
My experience is that you have to set maxReceivedMessageSize and maxArrayLength to be at least your maximum buffer size. If these are smaller than the actual send length the connection gets reset (I don't have the exact error message handy). I only specify these on the client side, but I don't think having them on the server side will hurt anything.
Using native data types (e.g. byte[]) vs. wrapping in a DataContract shouldn't make any difference.
I hope that helps.
Bob
|
|
|
|
|
i get two errors 'ProtocolException' and 'The remote server returned an error: (415) Unsupported Media Type'
|
|
|
|
|
Dear All
We have been struggling to set expiry date to power point files with following code. Though there is no syntactical error in it, it fails to set expiry date for given file.
<br />
Microsoft.Office.Interop.PowerPoint.Presentation presentation;<br />
<br />
Microsoft.Office.Interop.PowerPoint.ApplicationClass oPPT = new Microsoft.Office.Interop.PowerPoint.ApplicationClass();<br />
<br />
presentation = oPPT.Presentations.Open(pptFileName.ToString(), Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse);<br />
<br />
presentation.Application.Activate();<br />
<br />
presentation.Permission.Enabled = true;<br />
<br />
presentation.Permission.Add("real_alias@real_site.com", MsoPermission.msoPermissionRead, dtExpireDate);<br />
<br />
presentation.Close();<br />
<br />
presentation = null;<br />
<br />
oPPT = null;<br />
We have done similar thing with excel and word files successfully and still are clueless for doing the same to Infopath file.
Please guide
Regards
Sachin
modified on Sunday, December 09, 2007 9:00:07 PM
|
|
|
|
|
I've tried looking into this. Have you figured out what is going on?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
I'm using a webbrowser control and have set it to navigate to a given page, eg codeproject.com. Once it has loaded the page, how can i access the images that were downloaded on that page?
|
|
|
|
|
They are stored in the temporary files, but there's no real way for you to work out which file is what image. If you're examining the HTML anyhow, you'd find it easier to just download them again in your code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am currently doing that, by extracting the url from the src of the image combined with the page url, but as i am on dialup and they are large images, it seems pointless to download it twice.
In the cache (C:\Documents and Settings\[User]\Temporary Internet Files), there are columns with the headings Name, Internet Address, Type, and Last Accessed.
Is there anyway i can go through the list of files, and search for one with the correct Internet Address property, then import this into my project to display?
eg:
<br />
Dir directory = "C:\Documents and Settings\[User]\Temporary Internet Files";<br />
foreach(File f in directory)<br />
{<br />
if(f.Internet Address == imgAddr)<br />
{<br />
LoadIntoApp(f);<br />
}<br />
}<br />
|
|
|
|