title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|
Tuesday, October 07, 2003 | |
From a post from the VB.NET mailing list at Yahoo: I want my windows form to draw a line automatically when the form loads. To do this i am trying the following code: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim g As Graphics = Me.CreateGraphics g.DrawLine(SystemPens.ControlDarkDark, 10, 10, 50, 100) g.Dispose() End Sub but the line is not seen on the form! This code runs perfectly fine if i put it behind a button or other events but not on form loading. What should i do to make a line appear on form load? I've ranted before and I'll rant again... Why should simple html tasks be so difficult? Really, what's the advantage of putting another layer (Web Forms and C#/VB.NET) between you and the code (html/javascript) you're making? For simple forms, etc, where you'd like to reuse some Windows.Forms code, I can see using the .NET web forms. But if something doesn't work the way you'd like after one shot, you really should kick the project to a web developer and use codebehind to seperate UI from logic -- or, imagine this, learn html! I think there are still quite a few lessons to learn from asp.net programming. In other news, be careful what news aggregator you use!! I tried and like RSS Reader. It's freeware, it's in .NET (just neat to see a useful client app in the new tech), and it does a great job parsing RSS feeds. The problem? It uses the infamous MS Internet Control, which means it's just as vulnerable to security flaws in Internet Explorer as IE itself. That's a bad place to put your eggs, if you ask me. I've been complaining recently that end users need to be better educated about the risks of using a computer online -- this is a nasty sort of backdoor for virii. An app that looks totally unrelated to IE to the typical end user -- even one using Mozilla or Netscape for daily browsing -- can cut loose a nasty virus. Naturally, you'd hope the RSS feeding sites would be more likely to be on the up and up than your daily pr0n sites, but it's still a gaping hole that could blindside even a relatively well-informed PC user. The answer? Well, luckily that's easy. Wrap the Mozilla ActiveX control I mentioned yesterday in a .NET wrapper (or just use COM-interop if you don't mind rewriting a bit of your .NET code), and stick a safe(er) rendering engine in your app. posted by ruffin at 10/07/2003 09:25:00 AM |
|
| |
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
![]() |
|
|