Posted by admin | Posted in Code Snippets | Posted on 31-03-2008
2
I have decided to write a short post on how to automate page download from the Visual Studio using Browser control after my long (longer than one day
) very hard research on the internet. Couple of days ago I have decided to start my new personal project which is offline feed reader named ‘Crocodile’ (more on this in the near future) and after googling here and there I have decided to write the app in C#. The platform and language decision was mainly based on the fact that I couldn’t find anything like ‘Browser control’ in Java and mastering another language was also very tempting.
Browser control in VS is just stripped down version of IE and allows easy access to many features of normal IE browser straight from C# code. Everything looked very nice and things went smooth for a couple of development hours until I tried to implement automatic page saving. Using only methods exposed by browser control we can download the page by first displaying the “Save As..” dialog which is definietly not what I wanted.
I have decided that my new shiny ‘Crocodile’ will download the pages together with all goodness/badness like CSS, JS etc to see the pages exactly like they look online and I definietly don’t want to answer ‘OK’ to every single feed I want to download (about 100 a day).
I have found a simple solution on one of the VB or C# forums (don’t remember where exactly):
CDO.MessageClass message = new CDO.MessageClass();
message.CreateMHTMLBody(i.Link, CDO.CdoMHTMLFlags.cdoSuppressObjects, "", "");
ADODB.Stream st = message.GetStream();
st.SaveToFile("file.mht", ADODB.SaveOptionsEnum.adSaveCreateOverWrite);
All you have to do is add reference to Microsoft CDO and you are ready to go! There is a number of CdoMHTMLFlags to experiment with to suppress CSS stylesheets, images etc.
The drawback of this approach is the MHT format which can be used only by IE.
Posted by admin | Posted in General Programming | Posted on 22-03-2008
0
Hurrrraaaayyyyy!
Finaly year project – done
All courseworks – done
Few liters of vodka with friends – done
With 3 weeks holiday and exams in about 2 months I have finally some time for pure pleasure – programming whatever I like when I wake up
Life is beautiful
Posted by admin | Posted in Learning Materials | Posted on 01-03-2008
1
Another example of the book proving that software books can be fun! Head First series books are usualy easy to read and thats what makes them most valuable for me. I have read a few of them, since I started learning how to program, and I was never disappointed, I think I have read HF Servlets and JSP about 3 times
and I know that if I start a project with Servlets or JSPs I will read a few bits again
.
HF Software Development is of course no exception. This book on my bookshelf is a result of my new subscription to Safari, I should actualy say it’s on my virtual bookshelf
.
I belive there are experienced software developers which will find this book boring or maybe not bringing anything new to their ‘toolbox’.
For me this book is superb! In my opinion every CS student should read it before going into the wild and look for a job.
This is in short what you can get:
- A feel of profesional software development process
- Reason for manager’s daily headache
- What is TDD and how it works
- What is Continous Integration
- How tos: gathering requirements, desing and implement
- A few bits on proper design, UML and refactoring
- Many others which I either considered common knowledge or haven’t notice
Go to Safari books online or Amazon for detailed table of contents.
I would give it 5/5 mark.
Highly recommended
Posted by admin | Posted in General Programming | Posted on 01-03-2008
0
I have to confess, I very much like developer kinds of events! This post is a bit late but this whole blog was created to make a record of such events and it had to be submitted
.
The event took place on 20th Feb, as usual at King William St., in London and took half of my day but it was worth it!
This was another “Make it Fly” event organised by Arcadia and Sun Microsystems and it was one of the best I’ve been to.
The conference was all about Netbeans and its new features found in 6.0 version. Besides the fact that I’m using NB 6.0 for a few months already I have to tell that I was able to find a few interesting things about it anyway.
I have found sessions on new Swing features and Java FX extremly interesting probably because for a last few months, when doing my final year project, I have been producing code mainly for enterprise and mobile platforms and forgot about Swing and desktop dev altogether.
For anyone interested in future events by Arcadia and Sun, visit the page at:www.makeitfly.co.uk and register to receive emails informing you of upcoming events.
I just cannot wait when I finally upload all my final year work and start experimenting with new things, start new personal project, learn new language and many other things, right now I don’t
have time for anything, just 2 weeks left so I keep going…..Bye!