|
Please don't cross post in multiple forums!
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hello,
I have seen datagrid, a view control in Framework 1.0/1.1 but in Framework2.0 datagird also there but little change from datagrid to gridview but no separate view control. Is Gridview control composite of datagrid and a view control. What is there that we can do with gridview but not with datagrid? Is there any major difference. Moroever, what is better to use in the future applications that can provide a full control over gridview or datagrid controls as well as total control on their functionality.
Thanks for answering in advance.
|
|
|
|
|
|
how to get a image processing in vb.net?
|
|
|
|
|
mhammed wrote: image processing in vb.net?
Please select a suitable Forum and put your question there.
Regards,
Satips.
|
|
|
|
|
Write the code to do it maybe?
You might want to explain what you want in more detail. This is a very vague question that noone can possibly answer with any kind of accuracy.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hello, i want to know if there is a class in the .net framework to parser an MailMessage to an string, i mean, take all its properties,headers,etc, and return an string with those values..something like...
<br />
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage("< from >", "< to >", "< subject >", "< body >"));<br />
string commandToSend = Parser.Convert(message);<br />
Console.Write(commandToSend);<br />
I need the string value because it will be send to a service for spam evaluation.
Sorry for my bad english, its not my primary language.
thanks.
|
|
|
|
|
Hi, I was wondering if anyone knows a free downloadable forum program. Preferrably in C# and .NET. It would be nice if users had to register before they could post as well.
Thanks
|
|
|
|
|
Have you googled for this?
I just googled for "forum software c#" and got 4.5 million results, how about that!
|
|
|
|
|
Hey,
Have you heard about this.
Check this site and get the code for the Forum Program.
Regards,
Satips.
|
|
|
|
|
I've found a good one, I think(!), called Yet Another Forum.
Cheers
|
|
|
|
|
Hi all. I'm using iTextSharp to manage some documents. I want to rotate some pages 180 degrees. I've been reading itextsharp tutorial and about the transformation matrix.
I know that pages without rotation are properly created with:
cb1.AddTemplate(page, 1, 0, 0, 1, 0, 0)
and rotate 180 should be
cb1.AddTemplate(page, -1, 0, 0, 1, 0, 0)
But the page is blank. Maybe is someting about the traslation. Should I put some values in the last two zeros???
Regards,
Diego F.
|
|
|
|
|
I have an approach:
cb1.AddTemplate(page, 1.0F, 0, -0, -1.0F, 0, page.Height)
It is rotated, but the text is flipped. I only want to rotate the page, but still readable!!!
Regards,
Diego F.
|
|
|
|
|
What a stupid thing!
the solution is cb1.AddTemplate(page, -1, 0, 0, -1, page.Width, page.Heigth)
The trick was the translation. I tried that, but without page.Width.
Regards,
Diego F.
|
|
|
|
|
hi,
can anyone here to tell me, how to copy the text / contents from browser by using C# code under button_click event, in VS. net for smart devices?
please reply urgently, i shall be thankful to them.
|
|
|
|
|
Hello,
I created a C# console application (without GUI) that scrapes information from webpages. This application runs everyday on a unattended computer with Win2003 SP3, including latest security patches and up to date virusscanner, using a scheduled task. It uses the C# System.Windows.Forms.WebBrowser class to navigate the pages.
The application runs fine for weeks but all of a sudden the following error occurs
Win32Exception details: HRESULT=-2147467259 ecode=87 inner=
Failure... System.ComponentModel.Win32Exception: The parameter is incorrect
at System.Windows.Forms.NativeWindow.WindowClass.RegisterClass()
at System.Windows.Forms.NativeWindow.WindowClass.Create(String className, Int32 classStyle)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Application.MarshalingControl..ctor()
at System.Windows.Forms.Application.ThreadContext.get_MarshalingControl()
at System.Windows.Forms.WindowsFormsSynchronizationContext..ctor()
at System.Windows.Forms.WindowsFormsSynchronizationContext.InstallIfNeeded()
at System.Windows.Forms.Control..ctor(Boolean autoInstallSyncContext)
at System.Windows.Forms.WebBrowserBase..ctor(String clsidString)
at System.Windows.Forms.WebBrowser..ctor()
at MyNamespace.Scraper.Scrape()
An important code snippet:
public class Scraper
{
private WebBrowser browser;
public void Scrape()
{
using (browser = new WebBrowser())
{
NaviateToPage(browser);
ScrapeContent(browser);
}
}
}
The application is started every hour. It will run OK for days, until the exception occurs. When the exception occurs it keeps occuring. BUT when a user logs into the system and opens a browser and closes it again. The system runs fine for a couple of days again, until the exception shows up again (from that point on it will continue to fail again until somebody logs on... etc).
The exception is "The parameter is incorrect", but because I don't provide any parameters I don't have a clue which parameter might be incorrect and why.
I examed internet explorer settings on the machine and even scanned the registry for strange settings, but couldn't find anything that could point me in the right direction.
I also looked at the running processes. I examined which processes are running when the problem occurs and when the system is running fine, but there are not differences.
I am a kind of desparately looking for good ideas or background info that can point me in the right direction.
Thanx!
Paul
|
|
|
|
|
Hi,
the WebBrowser documentation states:
The WebBrowser control is resource-intensive. Be sure to call the Dispose method when you are finished using the control to ensure that all resources are released in a timely fashion. You must call the Dispose method on the same thread that attached the events, which should always be the message or user-interface (UI) thread.
And:
The WebBrowser class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your Main method is marked with the STAThreadAttribute attribute.
Your code uses the using statement, so Dispose is called.
The other requirements need to be verified.
The exception is an inner exception; ecode=87 means invalid parameter,
and HRESULT=-2147467259 corresponds to hex 80004005 which inside good old winerror.h
is the value for the symbols ERROR_REC_NON_EXISTENT as well as E_FAIL. so that
seems not to help us.
One guess is each new WebBrowser creates a new class name, and somehow these class
names suddenly are not valid any more. Suggestion: count and log each new WebBrowser
and try to recognize a pattern in the failures.
Another idea is something runs out, e.g. disk space for temporary internet files;
you might try to see if something like that occurs, and can be remedied without
launching IE, just to see if your app resumes normal operation.
Hope this helps.
|
|
|
|
|
Luc, thanx for the input.
Both the dispose (through the using statement) and the single thread apartment (STA) were already in place. Your comments show that I was on the right track adding those two.
I already checked the processes and active webbrowsers and system resources, but nothing can be seen there.
This weekend the server was rebooted, which killed some processes. Of course with the reboot the errors disappeared. Because I did not reboot the system since I implemented the STA and dispose actions, some problem processes might have been left in memory. Possibly this reboot might have solved this and could lead to a long-term solution.
I can only be sure if this works after a week or so. Then I'll report the final conclusion. Again, thanx for the input.
Paul
|
|
|
|
|
Hi All,
The solution seems to work. The Using Statement caused the Dispose function of the Webbrowser to be called. This solution was already implemented, but the problem remained.
Because the old version of the software, where the Dispose was not called, was running before, old "resource claims" probably were still active.
A reboot of the system seems to have solved the problem by releasing those claimed resources. The system is running fine now for a month now, while before to the problem occured every 4 or 5 days at least.
Luc, thanx for the help!
Paul
|
|
|
|
|
Hi Paul, you're welcome.
|
|
|
|
|
Afternoon All
I was wondering if anyone knew of any articles relating to GIS programming specifically for C#?
I would like to know more about plotting longitude and lattitude coordinates onto a vector diagram but am unsure how to go about rendering these vector diagrams in the first instance. Basically I suppose I am looking to build a GIS Vector viewer using C# but am at a loss as to where I should begin.
Any help greatfully appreciated
All the best
Col
|
|
|
|
|
|
Eh yeah already tried that but was hoping someone may have something a bit more specific
|
|
|
|
|
Well you'll have to be a bit more specific yourself. Firstly do you know C#, and secondly do you know anything about GIS?
If we can establish how much you know then perhaps we can help you more.
Also if you can be more specific on what you are trying to accomplish then that'd be helpful too, i.e. is this a just for fun project or does it have an ultimate goal at the end?
|
|
|
|
|
Hi Ed
I have a pretty good understanding of C#. I understand GIS to a degree but what I suppose I am not clear on is displaying the information. By that I mean if I have a dxf file, I would know how to read the file, plot the points and join these up. But the thing I cannot get my head around is if I had a vector diagram (dxf format again, say a shot of the Grand Canyon), obviously this is Geo-positioned, but if I was to plot a point on that diagram, how would I do that? How would I set my viewer up to handle well 'space' I guess. I could plot a point, but would it be displayed accurately on the diagram?
I know we have various coordinate systems, but I am unsure how to code this into an actual viewer.
This project is something I have wanted to do for a long time. Basically I want to take a vector image of a town and load on top of that coordinates from a GPS session plotting the route taken. It is purely for, ahem, 'fun' although it is currently driving me a bit potty. If I could just get to grips with how I present images within a coordinate system, I think I would be in a slightly better position.
I realise this is a bit fragmented and aplogise for this. If you have any further questions, please let me know and I will do my best to answer these clearly.
Many thanks
Colin
|
|
|
|
|