180 Archived Topics
Remove Filter I have a Uniden wireless security system installed. The system consists of two wireless cameras and a small, handheld receiver with an LCD screen. The receiver has a USB connector to allow it to connect to my laptop. Software runs on the laptop which allows me to monitor the cameras … | |
I'm having intermittent problems with scrolling via the wheel on my Logitech Anywhere MX mouse. I have been spending a lot of time editing old DaniWeb posts to correct formatting errors so this is where I tend to see the problem as it requires a lot of scrolling. After a … | |
If you have any particular topics that you'd like to see a code snippet for then please post your requests here. In order to avoid duplication of effort, if you feel inclined to respond to a request then please post here indicating that you will create the requested code snippet … | |
A lot of questions in the VB.NET forum are database related. Most of the code that gets posted result in one or more comments like "use parameterized queries to avoid SQL injection attacks". I won't describe the nature of a SQL injection because it is easily looked up via google. … | |
One of the things I have been steadfastly avoiding is writing code to print stuff. Most of what I want to print is from withing apps like Outlook or Word that already provide that functionality. But I finally ended up having to bite the bullet. What I ended up with … | |
The code in this snippet (and attached project zip) demonstrates how to use a background worker thread to monitor a network address (name or IP). It shows how to start and stop the thread and how to update controls in the main thread using delegates. It should be simple to … | |
This is a short bit of code that shows how to implement sorting on columns in a details-mode ListView. Suggestions for improvement are always welcome. One possible improvement would be to modify the column headers to indicate which column is being sorted and in which direction. | |
I need to get the value of one field out of a web page. I've never done web programming and I've never used the VB Web controls. I have no desire to learn all of the details because I doubt I'll ever have to do this again. I have a … | |
Sometimes sorting data can be easy and sometimes it can be difficult. If you have data in a listview you can spend a great deal of time writing ICompare functions. This is appropriate for non-trivial applications but can be a little intimidating for inexperienced programmers. Also, it is a problem … | |
I have a form that consists of only a TableLayoutPanel (which fills the entire form) containing a vertical stack of buttons. The resulting app is used in conjunction with another app. What I would like is to have the vb app do something when the mouse enters the form. Unfortunately, … | |
Please read through the following suggestions before posting in this forum. Questions in this forum are answered by people who generously volunteer their time. Following these guidelines will increase the chances of getting a quick and accurate answer. 1. Use Search to see if your question has been asked and … | |
This code demonstrates how to add controls to a form at run time. The number of rows and columns, the spacing between the controls and the size of the controls are all determined by Consts, but this could easily be changed so that the parameters are user entered. My example … | |
Here is a question I do not recall being addressed. In the last week I have had to completely rebuild my system. Following a lengthy install and configuration I had to look for the locatiuon of a settings file for an application (to make a backup). Being a dinosaur, I … | |
I have a form with a TableLayoutPanel with the following properties changed from default: Dock = Fill AutoSize = True AutoSizeMode = GrowAndShrink ColumnCount = 1 Margin.All = 0 one row set to AutoSize This is a stripped-to-the-basics version of part of my app. I want to generate a vertical, … | |
In the last few days I have lost the ability to render certain images on DaniWeb. For example, the icons to the left of the threads now show only as text. Likewise with the "buttons" in the edit window. Any ideas what might have caused this or how to fix … | |
I download a lot of articles for offline reading and archiving. When I download an article, it gets saved as AuthorFirstName AuthorLastName - title.ext Once I have read the article (assuming I want to keep it) I rename it to AuthorLastName, AuthorFirstName - title.ext I wrote a python script (swapnames.pyw) … | |
I have a NumericUpDown control that I want to allow the user to change with the mouse scroll wheel. The problem is that even with the following code [code] Private Sub numSeries_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles numSeries.MouseWheel If e.Delta > 0 Then numSeries.Value += 1 Else … | |
Well, this is embarrassing. I had to completely rebuild my laptop from scratch. I usually keep 3 or 4 items pinned to the taskbar and launch them with WINKEY-1, WINKEY-2, etc but somehow or other this no longer works. I really should know how to do this but I just … | |
I have an app I wrote in Python/wxPython. When I click a button, the action that is taken will depend on whether or not a modifier key (such as CTRL) is currently pressed. I can't toggle a swich based on a keypress event (eg ctrldown = True or False) because … | |
I wrote this 3D Breakout game as a sample project to learn both Python and the visual module, vPython. It is based on a similar game I had on my Amiga back in the 80s. I don't expect that my Python is either standard or as elegant as it could … | |
I thought I'd play around with vPython so I wrote a 3D breakout game (I used to have one on my Amiga and I haven't seen one for Windows). Everything is done except for one wee problem. I want to idle while waiting for the user to click the left … | |
I was doing a little playing around with some scrollbar controls and I noticed an odd behaviour that I was hoping someone could explain. I create three horizontal scrollbar controls, one for each primary colour. Possible values for each R, G or B are 0 to 255. When I set … | |
I have a textbox control for which I want to fit twelve double spaced lines of text so that the textbox is optimally filled (as little whitespace at the end as possible). So far the best I have come up with is [code] Dim fh As Integer = txtCategories.Height \ … | |
I have two forms that are called by the main form. One is named frmEdit, and is invoked by the ShowDialog (modal) method. The other is named frmSearch and is invoked by the Show (non modal) method. In both cases I want to preserve the last window position so each … | |
I would appreciate a snippet of code for adding groups at run-time to a listview. I am currently listing books (and stats) without groups via the following code which is executed in a loop (one pass per book title). [code] item = New ListViewItem item.Text = seq.ToString item.SubItems.Add(Mid(titlenode.Nodes(N_CSTAT).Text, 3)) item.SubItems.Add(Mid(titlenode.Nodes(N_JSTAT).Text, … | |
Am I missing something here? I am writing a game that requires some random number generation. I decided to use the System.Random class but I was getting strange results. The documentation says that if I have an instance of the class (let's call it r), the call r.Next(1,6) returns a … | |
I'm running Windows 7 Pro on a Dell Inspiron 1720. I have desktop slideshow enabled and pointed to a folder of my favourite pictures. Occasionally I will force a switch to the next picture from the desktop context menu item "Next desktop background" which appears between the "NVIDIA control panel" … | |
When I try to build a C++ project I get the error message in the title line. I am trying to help my son move his development from a unix cluster to his laptop. He is running Windows XP Pro and has installed the Eclipse IDE for C/C++ Developers. The … | |
Can someone please fill in the missing line of code in OnPageChange? I have a notebook control and on a page change event, I want to retrieve the label of the tab that was just selected. GetLabel and GetLabelText both return '' [CODE] import wx import wx.lib.mixins.inspection class Frame(wx.Frame): def … |
The End.