Saturday, August 20, 2005

Hey, Check this out from the Channel 9 Guys.

Show Off .  It's pretty cool. Basically, you put together a cool 5 minute video of some tip, trick, time-saver, gadget, really anything geeky and they will show it at the PDC. That is really cool. I am looking forward to seeing what they pick to show.

Doc

posted on Saturday, August 20, 2005 4:46:49 AM (GMT Daylight Time, UTC+01:00)  #    Comments [5] Trackback
Thursday, August 18, 2005

I went to the Indigo User Group Tour tonight. It was a great presentation and I look forward to the options that Indigo gives the .Net developer although I will wait until it gets a little closer to realease date before getting too excited. For now I will continue to use my old Remoting/Webservices skills.

Indigo.jpg

Mike Vincent, Me, Dave Foderick at Indigo UG Tour Event.

posted on Thursday, August 18, 2005 12:23:42 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
Wednesday, August 17, 2005

I recently received this question from one of the users of a messageboard that I answer questions for:

>>Hi,

>>I'm trying to open up a form and set it's top and left property
to be the same as one of my panels on my form. However,
it's not working out the way i >>planned. I even tried adding
up the top of form1 and the top of the panel but that didn't
work either. Any help on this would be appreciative.

His original code is below.

Private Sub lbl_LinkClicked( ByVal sender As System. Object , _
ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) _
Handles lbl.LinkClicked

Dim frmForm As New Form2
With Form2
    .Show()
    .Width = Me .Panel1.Width
    .Height = Me .Panel1.Height
    .Top = Me .Top + Me .Panel1.Top
    .Left = Me .Left + Me .Panel1.Left

End With

End Sub

At first glance of the code it looks like this should work.
He makes the form's width the same as the panel, then
makes it the same height as well. Now it is time to place
it on top of where the panel is located. He then sets the
Top of the form equal to the Top of the current form plus
the top of the panel on the form. This should place it right
on top of the panel right? Well no, actually he forgot to take
into account the forms menubar and side border.

So this should work for him right. Well yes it does but who
wants to hard code that kind of detail. What if the size of
the menubar or border changes?

Dim frmForm As New Form2
        With frmForm
           .Show()
           .Width = Me .Panel1.Width
           .Height = Me .Panel1.Height
           .Top = Me .Top + Me .Panel1.Top + 30
           .Left = Me .Left + Me .Panel1.Left +

        End With

To get the exact size you can use the
System.Windows.Forms.SystemInformation Namespace.
You can use the FrameBorderSize.Width and the
CaptionHeight (Menubar) to accomplish this. Make sure that
you add the CaptionHeight and FrameBorderWidth together for
the Top calculation because the border goes around the whole form.

Dim frmForm As New Form2
        With frmForm
           .Show()
           .Width = Me .Panel1.Width
           .Height = Me .Panel1.Height
            Dim intBorder As Integer
           intBorder = System.Windows.Forms. _
           SystemInformation.FrameBorderSize.Width

            Dim intMenuHeight As Integer
            intMenuHeight = System.Windows.Forms. _
            SystemInformation.CaptionHeight


           .Top = Me.Top +  _
                 
Me.Panel1.Top + _
                 
intBorder + _
                 
intMenuHeight
           .Left = Me.Left + _
                  
Me.Panel1.Left + _
                  
intBorder

        End With

So this got me to thinking. What else can the SystemInformation
Namespace do for me? Well quite a bit actually.
below I have detailed out some of the information you
can get using this namespace.

What is the computer name?
SystemInformation.ComputerName

Is a connection to a network present?
Network : SystemInformation.Network

What is the users Domain Name
SystemInformation.UserDomainName

What is the UserName?
SystemInformation.UserName

What was the boot mode (Normal, Safe Mode etc...)
SystemInformation.BootMode.ToString

Adjusting the disply for multiple monitors.
SystemInformation.MonitorCount.ToString
SystemInformation.MonitorsSameDisplayFormat.ToString
SystemInformation.ArrangeDirection.ToString
SystemInformation.PrimaryMonitorSize.ToString


Questions about the mouse.
MousePresent : SystemInformation.MousePresent.ToString
MouseButtonsSwapped : SystemInformation.MouseButtonsSwapped.ToString
MouseButtons: SystemInformation.MouseButtons.ToString

There are other items in there as well. Check out the help
files to see all the things this namespace can give you.

Happy Programming,

DotNetDoc


 

posted on Wednesday, August 17, 2005 10:46:10 PM (GMT Daylight Time, UTC+01:00)  #    Comments [1] Trackback

I just checked the PDC website and it looks like it is SOLD OUT.  Glad I got my ticket early. I can't wait to go. It is great that it is in my backyard this year. No hotel or plane travel !!!!. There are a lot of events surrounding the PDC so it should be a fun week.

Doc

posted on Wednesday, August 17, 2005 1:21:02 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
Tuesday, August 16, 2005

After my nights pondering how I wanted to work DotNetDoc, I have decided that most of the content of this site will be posted using this blog. I will post tips, tricks, articles etc.. through my blog. For right now, I am just using an IFrame to show the dasBlog from http://www.dotnetdoc.com but will keep an eye on Sperio.net to see when he has the DNN module for dasBlog completed.

I will start by blogging PDC 2005 stuff and move on from there. If you have any questions let me know.

DotNetDocSmall2.gifDotNetDoc - Daniel Egan

posted on Tuesday, August 16, 2005 10:37:28 PM (GMT Daylight Time, UTC+01:00)  #    Comments [4] Trackback
Wednesday, July 20, 2005

Be sure to visit all the options under "Configuration" in the Admin Menu Bar above. There are 16 themes to choose from, and you can also create your own.

 

posted on Wednesday, July 20, 2005 12:00:00 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback