Having a real trouble getting a form to launch, which has previously worked.
I have a series of buttons set up on a menu screen, each button launches a different form in the same project. For each 'click' event there are two lines of code: a DIM statement to set up the form object then a show or showdialog. For one of the buttons, for one particular user I get a 'User name or Password incorrect' error message.

    Private Sub btnReviewing2_Click(sender As System.Object, e As System.EventArgs) Handles btnReviewing2.Click
            Dim myReviewForm As New frmReviewing
      End Sub

The error appears on the main menu, it does not seem to actually get as far as launching the new form (the new form doesn't appear on screen, and I put a 'Messagebox' statement on the first line of the load sub for the new form which doesn't display), so I am working on the problem being on the menu page. I am not using any user identification code in either the menu or the new form
Has anyone come across this before?

Hi All,
Just to complete this article: I spent an evening wiping the new PC and installing Windows 7 Pro. First thing I did after setting up the OS was some speed tests and it was flying! Installed Kaspersky and the ping response fell through the floor. Don't know exactly what the problem was (i.e which setting on Kaspersky was causing the bottleneck) but I have uninstalled it and gone for another provider and all is well with the world!
Thanks to all who contributed

Thanks rproffitt - this has given me some pointers and things to check

The PC was from a local independant shop rather than a national chain. It came as a pre-built system, I installed W10, and then installed the drivers from the CD's the shop had supplied. All drivers have installed correctly (to the best of my knowledge - at least none report errors). there are only a few apps installed - office, adobe reader, VPN for remote colleague - but there is nothing new that wasn't installed on the previous Win 7 setup.

We used to have a Win 7 Pro pc running as a file server in our small office - 4 or 5 client PC's attached, all running Windows variants. This was fine, but after 5 years I decided to replace the file server before problems started developing. This is now an i7 processor, 8GB ram and 2TB hard drive running Windows 10 Pro, but throughput across the network has plummeted. No changes have been made to the network infrastructure so I am thinking that a bottleneck has been created with Windows 10.

I have created a batch file which moves a bunch of files from my laptop over the network to the new file server and then moves them back, and then from my laptop over the network to the old file server and back. To the new server and back is 13 minutes, to the old server and back is 2 minutes 50 secs. Both file servers are on 1Gbit network connection to a gigabit switch.

Does anyone know of a 'setting' or registry hack that could account for this lag? Is there anything you need to change when installing Windows 10 for a file server, rather than just a 'normal' client setup?

Many thanks,

Sorry guys - I used the generic term 'Cat5' in my original post - it was actually Cat 5e cable.
Did some unplugging last night after the other staff had left, and found that the 100Mbps is the connection to the switch, not the router. I have also found the 'fault' - the NIC in my laptop is only 100Mbps, not 1000Mbps - serves me right for assuming! I borrowed a colleagues PC and set it up next to my laptop. If I unplug the ethernet cable from my laptop and connect to the PC, the PC shows a 1Gbps connection. If I reconnect the cable to my laptop, my laptop connects at 100Mbps.
Thanks for your assistance

Hi All,
The problem I have is that the port on my laptop NIC is meant to have gigabit capability, but I am only connecting at 100.0Mbps and I don't know where the bottleneck is.

My Cat 5 ethernet cable connects my laptop to the RJ45 wall socket. The cable then runs through to a patch panel, which is connected to a gigabit unmanaged switch, which is in turn connected to a gigabit router and then off to the internet. When my adapater reports it's connection speed, which component is it reporting it's connection to? I would guess this is either the switch or the router but don't know for sure


I have a menu strip with a dropdown in which the user can select (check/uncheck) from a list of 6 options. Slightly annoying feature is that after the user checks one item, the dropdown closes so they then have to click the menu to open the dropdown before they can make their next selection. I have got round this by setting menustrip1.dropdown.autoclose = false when the dropdown opens, so the user can check/uncheck from the list as required.
The next problem is that the menu dropdown now doesn't close at all once it has been opened.

I have been looking at the OptionToolStripMenuItem_MouseLeave event to either set menustrip1.dropdown.autoclose = true or to trigger menustrip1.dropdown.close() but neither close the dropdown.

Should I be triggering these commands from a different event, or am I using the wrong triggers?
Many thanks

sorted thank you. The other thing I was doing wrong, was to have one sub '... handles dgv.cellclick, dgv.selectionchanged' rather than have two separate subs - one to handle the cellclick and the other to handle the selectionchanged.

Thanks again

I have a dgv displaying records from an SQL database. On load, the dgv is filled, the dgv selection cleared and the 'action' buttons set to enabled=false. When the user selects a row (cellclick action) the 'action' buttons are enabled. When the action button is clicked the dgv is reloaded, the selection cleared and the action buttons are disabled. This all works fine.
I have been asked to allow 'multiselect' for certain actions. I have allowed multiselect on the dgv and ran a test.
The user selects multiple rows with either control or shift, multiselect works BUT

If the user clicks down on one row, drags down over several rows and then releases the mouse the rows are highlighted correctly in the dgv, but the 'cellclick' trigger does not fire so the 'action' buttons do not enable. If I use the 'dgv.selectionchanged' then this action triggers repeatedly as the dgv loads initially and the code crashes.

Is there another trigger I should check for, or is there a better solution.
Many thanks

Hi all,
As title, need to connect a home worker to our LAN in the office. We need to him to connect his PC (running Win 7) to the office File Server PC (folder shares on a windows 7 PC) and to a mySQL database running on a second Windows 7 PC. We do not have any server software running on the network. We currently have Hamachi running on the File Server, the SQL PC and the remote PC and this all runs fine, except it's a bit slow.
I am willing to look at hardware solutions, but I don't know enough about them to guarantee that this will give the increase in connection speed that we are looking for. Is a leased-line another solution? Again don't know enough to talk the boss into parting with cash!!!
Any pointers gratefully received,

Hi All,
I have a DOS batch script file that is scheduled to run hourly, to move any PDF files from a bunch of folders, and put them in one folder. When I view the target folder in Windows Explorer, all of the PDF files have a padlock icon on and are not visible over on the workgroup share.

The source folders are shared Dropbox folders (don't know if that makes a difference?). The target folder is on a local drive, but is shared across a workgroup, and the PDF's do not show up on other computers unless the padlock icon is removed. I eventually found that if I change the permissions to add user 'everyone' the padlock icon disappears and the files are visible again, although there are other PDF files in the target folder that have come from a different source, and these don't have the 'everyone' user set, but still show up correctly. If I drag and drop the files using Windows Explorer the same problem arises.

The batch consists of multiple 'move' commands:
move "c:\users\owner\Dropbox\User1\*.pdf" "c:\shares\IncomingPDFs\"
move "c:\users\owner\Dropbox\User2\*.pdf" "c:\shares\IncomingPDFs\"

So... is the batch file the best way of collecting all the PDFs into one folder? Is the 'permissions' thing the actual problem, or does this just get round it?
I could use copy or xcopy but then I would then need to delete the original files so wildcards are out in case the users have added any files between the processing of the copy command and ...

Hi All,
My boss has an Asus K53e laptop running pre-installed Windows 7 Home premium. This connects wirelessley to the router at work, and also to his router at home. When ever ANY USB device is plugged in (printer, iPhone, memory stick etc), or is unplugged from the laptop, a pop up appears saying 'wifi has been disabled'. To be clear, he doesn't just lose connection to the router, it becomes disabled. He has to go back into 'Intel my Wifi' utility and enable the device for it to reconnect. Same problems at home and at work, so this is not related to one specific network / router. He also reports that there are intermittent drop outs of the wifi - I dont know if this is related.
Any ideas?

Thanks for the idea rubberman. The drive is currently formatted NTFS as it also has to be accessed from a Windoze PC.

I have a hotswap sata drive that I use for backups on a PC running Ubuntu 12.04LTS. When I insert the drive it shows correctly on the desktop and I can double click the icon to show the contents of the device.
I want to write a script to copy certain files from the pc onto the removable drive, but I am having trouble mounting the hotswap drive as I never know what device id it will have allocated.
When I first insert the drive it allocates it as /dev/sdf1, but if I remove the drive and re-insert it, it allocates it as /dev/sdg1. How do I write the mount command (or copy command?) so I can find the drive id?
This is what I have:
sudo mount /dev/sdf1 /media/128GB_SSD cp /home/dfsql01/dumps/*.sql /media/128GB_SSD/SQL_Backups
`sudo umount /dev/sdf1

Many thanks,

Hi All,
Have written a script file as follows:

mysqldump -u xxx -pxxx dbase1 > backup.sql
DATETIME=`date +%Y-%m-%d--%H-%M-%S`
mv backup.sql /home/user01/dumps/Backup_${DATETIME}.sql
read -p "Backup Complete.  Press a Enter to exit"

If I run the script by typing it's name at a terminal prompt it runs fine, but if I use the gui and then double-click the icon for the script it runs, but doesn't pause for the user to see the 'Complete' message. I have tried clicking 'Run in Terminal' and 'Run' but neither pauses. The rest of the script runs correctly, as the backup file is created and renamed to current date/time - it's just the last line of the script that I am having problems with. Basically I want to re-create the old DOS 'pause' command at the end of the script.

Running Ubuntu 12.04 LTS


I have a PC running Windows 8. Every time it boots up it tries to 'Scan and repair disk errors on C:' but never gets above 0% - i.e. it hangs at the very start of the process. The 'circle' icon rotates so it is not that the whole PC has frozen - it's just that the progress never gets above 0%. If I reboot it and manage to 'press a key within one second' to skip the disk check, the PC boots up normally, and I can log in to W8 and everything appears to run properly. I can access emails, my documents, get on the internet, play games etc etc. PC remains on and stable for at least 2 hours. When I next turn on the computer it tries to run chkdsk again, and again hangs at 0%. I have left it scanning overnight, but it still doesn't progress passed 0%. I have tried running 'chkdsk /spotfix c:' and rebooting, but it doesn't appear to do anything different (still stops at 0%) but I don't know how to tell if it's doing the spotfix, or still trying to do the full scan

Is there a way to either a) stop it trying to run chkdsk every time, or b) get it further than 0%.

The PC isn't mine, it was brought to me for repair, so I don't have any background on what was happening when this first started. PC is a HP Pavillion and less than ...

Hi All,
I have a 128GB SSD that I use daily for off-site backups from our server. How many times can I expect to insert / remove it from the hot-swap drive bay before the connectors wear out? According to the SATA spec, the expected durability is 50 'matings' for a standard cable, but is it any different for a fixed connector in a drive bay. I currently insert / remove the SSD daily, 5 days a week.
Has anyone got any experience of them wearing out, and is there anything I can do to prolong life expetancy?
Many thanks,

Check with the manufacturer of your motherboard, as they will have set a limit on how much the board is capable of using. There is also a limit set by some operating systems - Windows XP for example can only see 3GB of RAM no matter how much you have installed. I would recommend using an online system scan (available at www.crucial.com for example) that checks your motherboard and lists what options you have. Once you have this info you can shop around for best value.

Begginnerdev commented: 32bit / 64bit address different amounts - but great post. +8

Hi All,
Adam K got it spot on with the first reply! Two team points to you. I converted the code to use parameters rather than just list the values of the field and this cured the problem. I am new to SQL (although have been programming in other languages for 30+ years) and only found out about the benefits of passing parameters to an insert or update statement well into my current project.
@radhakrishna.p - I have a database containing all of our current engineering jobs. I wanted users to be able to 'attach' or link a document to each job (e.g. a scan of the jobsheet, or a PDF of the invoice for example). Any reason? Have I missed a trick somewhere?

Thanks to all who replied.

Hi All,
I am trying to store a link to a document in a mysql database using VB.NET. I open a file browser for the user to select the file, and if I output the returned filename to a messagebox it looks fine, but when I write that filename string to the SQL database it removes all of the backslash characters.

The messagebox output shows my filename string to be: C:\Temp\EULA.TXT
The field in the SQL database is: C:TempEULA.TXT

Is there a special data type I need to use (either in VB.net or in mysql) to store the filepathname? How can I stop it stripping out the '\' characters. I am currently storing it as a String in VB and as varchar(255) in mysql. Please note I am not trying to upload a file into the database, just store the filename and path.


The drive bay can take up to 2 sata drives, and has two power leads and two sata header leads (and an e-sata lead). But the problem is that when I click on 'eject sata drive' it also loses the internal PATA drive

Hi All,
I have a home-built PC running W7 pro with a Sata drive as the primary drive, and a second PATA drive for general file storage. This has been running fine for a couple of years. I have recently installed a hot swap sata drive bay into the pc, so I can plug my new SSD drive in and make backups. When I click into the system tray / notification area to 'safely eject device' I select the SSD drive, but the system 'ejects' both the SSD drive and the PATA drive. The PATA drive no longer shows up in 'My Computer' and no longer shows up in Computer Management / Storage. I have to reboot the PC to get the PATA drive to show again.

Firstly - how do I only eject the SSD drive?
Secondly - do I need to 'safely eject' if I know my backup to the SSD has finished - can I just take it out?

Many thanks,

Am interested in developing a mobile app for work - want to send our engineers some job details to the calendar on their mobile device, then have them 'tick a box' when it is complete and log an entry back to the server in the office.
I've been doing some tinkering with my own android device, just to see what I need to learn, but before I get too far, are there any benefits to developing for Andriod over Blackberry or an Apple device?

I need to consider
a) cost (as far as I can see Andriod is free to publish apps, but need to pay to publish for BB?)
b) ease of distribution (can I just send the guys a weblink, or does it need to be published to an app store)
c) ease of programming (haven't done anything like this before, so steep learning curve expected whichever I choose)

I have been programming (mainly for pleasure) for 30+ years and have been taught Basic and Cobol, and then have self taught VB6 / VB.Net, SQL, Linux, Unix and a bit of C++ and have also tinkered with Arduino (makes it sound really geeky when I list it all like that!).

Any advice gratefully received

That's what I found - the resize is triggered first (see OP). The question was how do I stop it (or at least stop trying to resize the dgv columns).

HI poojavb,

        Private Sub frmProcessWorksheets_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            MsgBox("Load Event")
            ResizeScreen() 'redraws the screen
            RefreshWork() 'loads data into datagridview
            ResizeDGV() 'redraws datagridview columns
        End Sub
        Private Sub ResizeScreen()
            dgvJobList.Size = New System.Drawing.Size((Me.Width / 5) * 4, Me.Height - 130)
        End Sub
        Private Sub ResizeDGV()
            dgvJobList.Columns(0).Width = dgvJobList.width / 2
            dgvJobList.Columns(1).Width = dgvJobList.width / 2
        End Sub
            Private Sub frmProcessWorksheets_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
            MsgBox("Resize event")
        End Sub

Think that's all the relevant routines.

Following on from my post yesterday (how to anchor buttons/controls to various sides of the current form when the form is resized) I have run into another problem. I am setting the width of my datagrid to be 80% of the form width on a 'form resize' event with 10% of the width at either side so it remains centred in whatever size window is available. This works fine. (mydatagrid.width = me.width/5*4)

I then decided to dynamically set the width of the 2 columns in the datagrid each to 50% of the width of the datagrid. Again, this sub is called in the 'form resize' event. This fails because the datagrid hasn't loaded the data from my sql database when the first 'resize' event is triggered. I did a bit of testing (by placing a simple msgbox statement into the resize event and the load event) and it seems the 'resize' event is triggered three times before the form's load event.

So - my question is - how do I stop the resize event triggering when the form loads (or at least make the load event trigger first).


perfect - just what I was looking for.

Hi All,
I would like my 'quit' button to appear in the bottom right hand corner of my menu screen, but it seems that every computer in the office has a different sized screen, different size ration (some are widescreen), and different resolution. When I deploy my program, the quit button may appear off-screen (the user has to scroll down to find it) or it may appear half way across the screen on a widescreen laptop for example. If I set my form to 'maximised', is there a way to position a button relative to the bottom right hand corner of the form?

Also, on one maximised form I have two datagridview's side by side. Is there are way to automatically set each one to take up half of the available form width, so they fill the form nicely?

Many thanks,

did some more digging and eventually found the problem. In the /etc/mysql/my.cnf on the ubuntu server, the bind-address was set to by default, so was only looking for connections from itself. I amended the file to 'bind-address =' and all is fine and dandy! Thanks for the suggestions from those who contributed - don't think I would have got there without you.