180 Archived Topics

Remove Filter
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
0
508
Member Avatar for Reverend Jim

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 …

0
123
Member Avatar for Reverend Jim

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 …

3
114
Member Avatar for Reverend Jim

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. …

Member Avatar for Reverend Jim
6
5K
Member Avatar for Reverend Jim

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 …

Member Avatar for tinstaafl
2
3K
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
1
2K
Member Avatar for Reverend Jim

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.

0
2K
Member Avatar for Reverend Jim

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 …

Member Avatar for DeanMSands3
0
431
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
1
892
Member Avatar for Reverend Jim

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, …

Member Avatar for Reverend Jim
0
2K
Member Avatar for Reverend Jim

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 …

Member Avatar for themaj
17
1K
Member Avatar for Reverend Jim

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 …

3
670
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
1
290
Member Avatar for Reverend Jim

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, …

Member Avatar for Reverend Jim
0
2K
Member Avatar for Reverend Jim

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 …

Member Avatar for caperjack
0
130
Member Avatar for Reverend Jim

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) …

Member Avatar for Reverend Jim
0
141
Member Avatar for Reverend Jim

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 …

0
219
Member Avatar for Reverend Jim

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 …

Member Avatar for caperjack
0
125
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
0
169
Member Avatar for Reverend Jim
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
0
499
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
0
274
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
1
214
Member Avatar for Reverend Jim

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 \ …

0
99
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
0
164
Member Avatar for Reverend Jim

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, …

Member Avatar for Reverend Jim
0
2K
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
0
142
Member Avatar for Reverend Jim

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" …

Member Avatar for Reverend Jim
0
315
Member Avatar for Reverend Jim

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 …

Member Avatar for nezachem
0
4K
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
0
1K

The End.