Jump to content
Xtreme .Net Talk

Derek Stone

*Gurus*
  • Posts

    1910
  • Joined

  • Last visited

Everything posted by Derek Stone

  1. Well, if you're familiar with Win32 API use in VB5/6 read up on Platform Invoke (consuming Win32 API functions in .NET) and then read up on [api]SetWindowsHookEx[/api].
  2. http://www.visualbasicforum.com/showthread.php?s=&threadid=45326
  3. Absolutely, divil. Microsoft made two mistakes when they designed .NET: Microsoft.VisualBasic.Compatibility and modules.
  4. AxMediaPlayer.DisplaySize = MediaPlayer.MPDisplaySizeConstants.mpFullScreen
  5. Request.PhysicalApplicationPath Request.PhysicalPath
  6. Halfrubbish, you might want to learn a bit about Win32 API functions under .NET here: http://www.elitevb.com/content/01,0075,01/01.aspx
  7. Use [eapi]FindWindow[/eapi] to poll for the windows when they are opened. Then just send WM_CLOSE to them and you should be all set.
  8. Add a button/link which the user can click that refreshes the page. <a href="thisPage.aspx">Refresh</a> Also make sure to add this to the top of your ASP.NET code: <%@ OutputCache Duration="0" Location="Any" %>
  9. Dim g As Graphics g = PictureBox1.CreateGraphics() MessageBox.Show(g.GetHdc.ToString(), Application.ProductName)
  10. Check the Control.Focused property. Dim c As Control For Each c In someControl.Controls If c.Focused Then MessageBox(c.ToString, Application.ProductName) End If Next That code is off the top of my head, so if it doesn't work just give a yell.
  11. Make sure you're refeshing a non-cached version of the page.
  12. No, not at all. Those two lines are just showing you how to accomplish the same thing in .NET.
  13. MSHFlexgrid is a COM component, which you really should try to avoid using in .NET. Try the DataGrid component instead.
  14. Try the following. Dim strName() As String, tempString As String, i As Integer tempString = "Testing,out,explicit,type,casting" strName = tempString.Split(","c) For i = strName.GetLowerBound(0) To strName.GetUpperBound(0) lstDetails.Items.Add(strName(i)) Next
  15. As provided by the .NET SDK. <System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")> _ Private Shared Function Rectangle(hdc As IntPtr, _ ulCornerX As Integer, ulCornerY As Integer, lrCornerX As Integer, _ lrCornerY As Integer) As Boolean End Function Public Sub GetHdcForGDI(e As PaintEventArgs) ' Create pen. Dim redPen As New Pen(Color.Red, 1) ' Draw rectangle with GDI+. e.Graphics.DrawRectangle(redPen, 10, 10, 100, 50) ' Get handle to device context. Dim hdc As IntPtr = e.Graphics.GetHdc() ' Draw rectangle with GDI using default pen. Rectangle(hdc, 10, 70, 110, 120) ' Release handle to device context. e.Graphics.ReleaseHdc(hdc) End Sub
  16. They shouldn't have put it there in the first place.
  17. http://www.visualbasicforum.com/t47934.html
  18. The following code overloads the form's constructer so we can pass an instance of the other form to it. Keep in mind this code is located in the form that we want to display. It takes the argument it receives and stores it in a class variable. Public Sub New([b]ByRef frm As Form[/b]) MyBase.New() [b]frmReference = frm[/b] '... End Sub Now, when we want to create an instance of that form we use the following code snippet. Keep in mind this code passes a reference of the primary form to the form that's about to be displayed. Dim f As New Form2([b]Me[/b]) f.ShowDialog()
  19. http://www.visualbasicforum.com/showthread.php?s=&threadid=45326
  20. You'll need to use the Win32 API.
  21. Depends on what you mean by user management. Under most cases you'll need to use the Win32 API.
  22. I know... Application.ExecutablePath is sooo much longer.
  23. When you load the second form pass a reference to the main form to it. You can do this by overloading the form's New constructer.
  24. Hit the Build button/menu. Then look in the project's /bin directory.
  25. objCmd.CommandText = "DELETE * FROM myTable WHERE ID > 0" objCmd.ExecuteNonQuery()
×
×
  • Create New...