Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: jo0ls
  • Order by date
  1. jo0ls

    Sine wave drawing

    It suffers from the #1 Problem on Bob's GDI FAQ: http://www.bobpowell.net/picturebox.htm - the drawing disapears when the picturebox.paint method is called. This will happen if you drag your form off screen and back on, or if another form moves across your form. It happens because the areas of...
  2. jo0ls

    Marhsaling Arrays

    The structure is passed as a blob of memory. Your program and the dll have to map out where the structures variables lie in that memory in the same way - otherwise things go astray. Lets say you have a structure: Structure Blah value1 as integer value2 as integer End Structure But in the dll...
  3. jo0ls

    Public Constants

    Friend Class ProjectConstants Private Shared m_numerOfBeersInASixPack = 6 Public Shared ReadOnly Property NumerOfBeersInASixPack() As Integer Get Return m_numerOfBeersInASixPack End Get End Property End Class
  4. jo0ls

    Public Constants

    I don't understand what encryption you mean. If you need to encrypt something then an obfuscator will encrypt the constants too. If you don't want to use a constant, then at least use a readonly porperty. Your Public Shared variable just ignores the whole reason for using a constant in the first...
  5. jo0ls

    Public Constants

    constants are implicity shared (so sayeth the msdn)
  6. jo0ls

    .net v1 or .net v2

    There is a thing called MSBee to build 1.1 apps in VS2005 - it's on GotDotNet.com
  7. jo0ls

    Problem checking for double

    Here's a vb 2005 only tip: Dim iVal As Double If Double.TryParse(TextBox1.Text, iVal) Then Me.Text = iVal.ToString Else Me.Text = "Enter a double you fool!!" End If This is recommended as using try..catch is slow when the catch block is...
  8. jo0ls

    Clear the Clipboard

    <DllImport("ole32.dll")> _ Private Shared Function OleSetClipboard(ByVal theDataObject As IDataObject) As Integer End Function send nothing
  9. jo0ls

    Charting options

    http://netcontrols.org/nplot/wiki/ http://zedgraph.sourceforge.net/
  10. jo0ls

    WMI query - get fields?

    You could try getting the results another way, see the vb.net 101 examples http://www.microsoft.com/downloads/details.aspx?FamilyId=08E3D5F8-033D-420B-A3B1-3074505C03F3&displaylang=en framework - using wmi
  11. jo0ls

    VS 2005 Beta, can't find AdventureWorks_Data.mdf

    http://www.microsoft.com/downloads/details.aspx?familyid=2adbc1a8-ae5c-497d-b584-eab6719300cd&displaylang=en
  12. jo0ls

    Property defiened As Image cannot be deleted

    use imports System.ComponentModel and then: <Browsable(True), Category("Appearance"), DefaultValue(GetType(Image), "Nothing")> _ Public Property MyImage() As Image Get Return m_MyImage End Get Set(ByVal Value As Image) m_MyImage = Value...
  13. jo0ls

    Printing Text File send blank Page out

    It works with a small tweak - you need withevents for the objPrintDocument Private WithEvents objPrintDocument As New PrintDocument Private objStreamToPrint As StreamReader Private objPrintFont As Font Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As...
  14. jo0ls

    Printing Text File send blank Page out

    never mind, load of rubbish what I just said...
  15. jo0ls

    Printing Text File send blank Page out

    the handler is for .PrintPage, but you are calling .Print
  16. jo0ls

    Getting behind Windows forms system colors

    I just found that out too. The combobox is apparently two controls. You have a listbox like control with the text, and the arrow. So wndproc is overriding the drop arrow. Urgh. This means you can use wndproc to stop the drop by blocking the mouse on the drop arrow. But it doesn't work to block...
  17. jo0ls

    Getting behind Windows forms system colors

    you can get the keys by overriding processcmdkey so for paste keys: Protected Overrides Function ProcessCmdKey(ByRef m As System.Windows.Forms.Message, _ ByVal keyData As System.Windows.Forms.Keys) As Boolean Const WM_KEYDOWN As Integer = &H100 Const WM_SYSKEYDOWN As...
  18. jo0ls

    Unsigned integers

    You can use the .net convert class to convert datatypes. uints -> ints ints -> uints. You get an overflow exception when the numbers don't fit into the target type. Convert.toInt32(some UInt)
  19. jo0ls

    Getting behind Windows forms system colors

    I also found that you can still move into the combobox with arrow keys when it is read only. The only way I found to get around it so far was to trap the arrow keypresses on the controls next to the comboboxes. And to do that you need to mess with IsInputKey. Public Class MyButton...
  20. jo0ls

    Getting behind Windows forms system colors

    I hate that too: Public Class MyComboBox 'new combobox that can be set to readonly so that its forcolor is black whien not in use. Inherits System.Windows.Forms.ComboBox ' make a variable to store readonly status. Private m_ReadOnly As Boolean = False...

Part and Inventory Search

Back
Top