Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
E

Enriad

@Enriad
About
Posts
12
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Barcode
    E Enriad

    Barcode scanners normally work like a normal keyboard, you just need to trap the event for 'Enter' being pressed in your textbox (or whichever control you're using), which is sent after the end character of the barcode is scanned. I'm not saying it works for all scanners, though it has in the one's I have tried

    Visual Basic help question

  • Three topics - help greatly appreciated!
    E Enriad

    This is used to detect when someone inserts or removes a USB drive, cd or dvd, provising plug and play is still on. It also tells you what kind of drive is used so I hope this can point you in the right direction or at least allows you to snip bits out. Private Const GWL_WNDPROC As Long = (-4) Private Const WM_DEVICECHANGE As Long = &H219 Private Const DBT_DEVNODES_CHANGED As Long = &H7 Private Const DBT_DEVICEARRIVAL As Long = &H8000& Private Const DBT_DEVICEREMOVECOMPLETE As Long = &H8004& Private Const DBT_DEVTYP_VOLUME As Long = &H2 ' Logical volume Private Const DBT_DEVTYP_DEVICEINTERFACE As Long = &H5 ' Device interface class Private Const DBTF_MEDIA As Long = &H1 ' Media comings and goings Private Const DBTF_NET As Long = &H2 ' Network volume Private Enum DriveType As Integer DRIVE_UNKNOWN = 0 DRIVE_NO_ROOT_DIR = 1 DRIVE_REMOVABLE = 2 DRIVE_FIXED = 3 DRIVE_REMOTE = 4 DRIVE_CDROM = 5 DRIVE_RAMDISK = 6 End Enum Private Structure DEV_BROADCAST_HDR Public dbch_size As Integer Public dbch_devicetype As Integer Public dbch_reserved As Integer End Structure Private Structure DEV_BROADCAST_VOLUME Public dbcv_size As Integer Public dbcv_devicetype As Integer Public dbcv_reserved As Integer Public dbcv_unitmask As Integer Public dbcv_Flags As Short End Structure Private Declare Auto Function GetDriveType Lib "kernel32.dll" (ByVal nDrive As String) As DriveType Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) If m.Msg = WM_DEVICECHANGE Then Dim WParam As Int32 = m.WParam.ToInt32() Dim dInfo As String = "" Select Case WParam Case DBT_DEVICEARRIVAL dInfo = showInfo(m, WParam) If Me.advancedMode Then If MsgBox("New Drive Detected: " & dInfo & vbCrLf & "Would you like to view the images on the drive?", CType(MsgBoxStyle.Question + MsgBoxStyle.YesNo, MsgBoxStyle), "New Drive Detected") = MsgBoxResult.Yes Then 'Me.treeBrowse_ExpTreeNodeSelected(Split$(dInfo, ":")(0) & ":\", ) loadImages(Split$(dInfo, ":")(0) & ":\") End If Else loadImagesUploader(Split$(dInfo, ":")(0) & ":\") End If

    Visual Basic csharp json performance help

  • Looping through tab in a tab control
    E Enriad

    Hi there, you need to use TabCount - 1 as the first index of the tabs is zero. Alternatively, you can use this: For Each t As TabPage In Me.TabControl1.TabPages taskID = t.Name.ToString() Next Hope this helps, Daniel

    Visual Basic database help

  • Richtextbox region collapsing control
    E Enriad

    Hey guys, I'm making an IRC client and decided to muck around with the scripting GUI. I'm basing it on Visual Studio 2005/Orcas' interface, with the line numbers and the auto-complete style. I decided I would like to add the collapsible region type thing to it, for each function and custom areas. I tried looking at Sharpdevelop, as it has the same thing, though it's a little complicated for my liking. I also took a look at Fireball (I think that's the name), another editor which has regions in it, though a lot is in Spanish and somewhat confusing, though the regions are less buggy than on Sharpdevelop. What I was thinking, is that, store the text in memory and then draw it on the textarea, though I think I'd need to set the text on the control so it can handle the cut, copy, paste, navigation, etc. When I do that, it doesn't draw the text at all, only what the RTB.Text equals. If someone could please point me in the right direction or if they have looked through the Sharpdevelop and/or Fireball code (as it's C# and I don't know that all too well) and help, I would greatly appreciate it. Regards, Daniel Wallace

    Visual Basic csharp css visual-studio performance help

  • Printing a form larger than the screen [modified]
    E Enriad

    Hi guys, just a quick question with printing in VB.Net. I have managed to print a form by making an image and using the BitBlt API, though I have been unsuccessful in getting the entire form if it scrolls past the size of a form. Could someone please point me in the right direction? Thanks in advance, Daniel -- modified at 1:48 Tuesday 13th March, 2007 Found a control that does what I want, though it needs a little tweaking for my purposes. I hope this also helps others looking for a similar solution: http://www.codeproject.com/csharp/ControlPrint.asp[^]

    ATL / WTL / STL

  • what is differeence between i.equal(j) and i=j in vb.net?
    E Enriad

    .equals is for comparing things other than numbers or words, like controls. if textboxTMP.equals(textboxName) kind of thing, if you're working with say, forms or addressbooks and you need to have some sort of checking rather than a loop or select for each control. Personally, I don't use it, so I can't think of a useful instance, though I'm sure there are a few. Daniel

    Visual Basic question csharp

  • line numbers?
    E Enriad

    Hi, you can take a look here for a start: http://www.codeproject.com/cs/samples/linenumberingapp.asp[^] There are also heaps of hits on google which let you use GetCurPos() and GetCursorPos() to get the position of the caret if you wish to return the line you are currently editing. I'm sure there are some built in things in the framework, though I'm really tired and can't think at the moment. Cheers, Daniel

    Visual Basic question

  • MDI skinning question
    E Enriad

    Hi Martin, thanks for that. Works great for a background image (which I might add in later, looks better than the grey and much nicer than doing it the way I was fiddling with before). Unfortunately, the client area still has a square border around it :/

    Visual Basic graphics question

  • how to use marquee property in status bar?
    E Enriad

    You could also use a timer and a label to move the text, though you might need a picturebox either side of the label as it is a container and will hide the label as it is moved across. Basically timer1_tick() labelStuff.left -= 1, with some checking for the maximum area it can go to. If you want to have it continuously scrolling (not just start again once finished), you'll need at least 2 labels, and it gets a bit trickier. Cheers, Daniel

    Visual Basic tutorial question

  • Multi-Tab Controlling
    E Enriad

    This is what you might be looking for (Tabbed MDI[^]), though it is in C# (you can convert to vb.net, there are plenty of sites out there that do it if you don't know how). Another option is a control (by Weifen Luo), pre-made which can be found here[^]. Cheers, Daniel

    Visual Basic com tutorial question

  • Performance with Editor
    E Enriad

    One way would be to use delegate's to perform the looping. Set the enabled value of the treeview to false and once the looping has finished, set it to true. This will stop people from clicking on it before you want them to. There are some good tutorials on MSDN for delegating, though not many for placing arguments/paramters in the functions (if someone could let me know one, that would be great, I lost the bookmark and my code when my old HDD died :( ) As for the faster matching, there isn't an overly fast way to loop over 20,000 lines of an array, you might have to deal with the regex loop searching. I'd have to take a look at the search part of the code to see, though you could try a google hit for 'vb.net text search optimizing' Daniel

    Visual Basic regex help question data-structures performance

  • MDI skinning question
    E Enriad

    Hey guys, I've tried looking everywhere and I can't seem to find a solution. Basically, I want to change the inside "box" of an MDI parent form (where an MDIChild can go) and round the corners there. I tried drawing a "border" around the MDIChild and forms, I also thought I could set the background colour to transparent of the MDI Parent, though this didn't work. If someone could point me in the right direction or let me know it cannot be done, that would be great. Thanks, Daniel

    Visual Basic graphics question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups