Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Please Help having problems with VB.net
New Posts  All Forums:Forum Nav:

Please Help having problems with VB.net - Page 2

post #11 of 13
I wish I had VS installed to just test this real quick. Two possible problems are 1) when you pass the path to check is it passing a string which means you need to check that the output of PictureBox.ImageLocation is also a string 2) the other problem may be that you can't make the PictureBox itself invisible but rather the controls within the PictureBox.

If it is the first problem that then the fix is simple. Create a string variable and set it equal to the file path. Then check if they are equal to one another.

If it is the second problem an easy solution would be to have a default image that appears rather than hiding the PictureBox.

Now to explain how to check on a change event. There are several ways to do this. If you have a button that changes the photo just create the If Loop within a function and call the function right after the button is clicked. Another way would be to use the SysEvent controls to detect the change. If you are new VB I wouldn't try the SysEvent controls just yet.
Red-Scout
(18 items)
 
Asus G53SX-TH71
(12 items)
 
Big Blue
(12 items)
 
CPUMotherboardGraphicsGraphics
AMD 8320 FX Asus Crosshair V Twin Frozr 6950 Twin Frozr 6950 
RAMHard DriveHard DriveHard Drive
Corsair Vengence Red Crucial M4 Western Digital Raptor 300gb Western Digital 1 TB Black 
Optical DriveCoolingOSMonitor
LG Blu-ray Corsair H80 Windows 7 Professional Asus VE248H x3 
KeyboardPowerCaseMouse
Logitech MX 5500 Revolution Black Thermaltake TR2 RX 750w CoolerMaster Storm Scout MX Revolution Cordless Laser Mouse 
AudioAudio
Logitech X-540 5.1 System Creative Sound Blaster X-Fi Titanium Fatal1ty 
CPUMotherboardGraphicsRAM
Intel Core i7 2670QM G53SX NVIDIA GeForce GTX 560M Samsung  
RAMRAMRAMHard Drive
Corsair  Samsung  Corsair  Corsair Force GT3 
Hard DriveOptical DriveOSMonitor
Hitachi Blu-Ray Drive Windows 7 Professional 15.4" 1080p 
CPUMotherboardGraphicsRAM
AMD FX 8120 Asus M5A99FX Pro R2.0 MSI Windforce 6850 Kingston Hyper-Blue 16Gb 
Hard DriveHard DriveHard DriveCooling
3x Seagate Barracuda 3Tb OCZ Agility 2 64Gb 3x OCZ Vertex 2 Plus 32 Gb Cooler Master Seidon 120mm 
OSOSPowerCase
Windows Server 2012 Standard VMs (Server 2012, Windows 7, Windows 8, Ubuntu,... PC Power and Cooling 500w Silencer NXZT Switch 810 
  hide details  
Reply
Red-Scout
(18 items)
 
Asus G53SX-TH71
(12 items)
 
Big Blue
(12 items)
 
CPUMotherboardGraphicsGraphics
AMD 8320 FX Asus Crosshair V Twin Frozr 6950 Twin Frozr 6950 
RAMHard DriveHard DriveHard Drive
Corsair Vengence Red Crucial M4 Western Digital Raptor 300gb Western Digital 1 TB Black 
Optical DriveCoolingOSMonitor
LG Blu-ray Corsair H80 Windows 7 Professional Asus VE248H x3 
KeyboardPowerCaseMouse
Logitech MX 5500 Revolution Black Thermaltake TR2 RX 750w CoolerMaster Storm Scout MX Revolution Cordless Laser Mouse 
AudioAudio
Logitech X-540 5.1 System Creative Sound Blaster X-Fi Titanium Fatal1ty 
CPUMotherboardGraphicsRAM
Intel Core i7 2670QM G53SX NVIDIA GeForce GTX 560M Samsung  
RAMRAMRAMHard Drive
Corsair  Samsung  Corsair  Corsair Force GT3 
Hard DriveOptical DriveOSMonitor
Hitachi Blu-Ray Drive Windows 7 Professional 15.4" 1080p 
CPUMotherboardGraphicsRAM
AMD FX 8120 Asus M5A99FX Pro R2.0 MSI Windforce 6850 Kingston Hyper-Blue 16Gb 
Hard DriveHard DriveHard DriveCooling
3x Seagate Barracuda 3Tb OCZ Agility 2 64Gb 3x OCZ Vertex 2 Plus 32 Gb Cooler Master Seidon 120mm 
OSOSPowerCase
Windows Server 2012 Standard VMs (Server 2012, Windows 7, Windows 8, Ubuntu,... PC Power and Cooling 500w Silencer NXZT Switch 810 
  hide details  
Reply
post #12 of 13
Thread Starter 
i tried the first one and it still had the same problem so i deffo think that it is the second problem, how would i make it so that a default image would come up? and thanks to you guys for helping i have been trying for days now to get this thing working.
post #13 of 13
if there's no picture then the value might be vbnothing (or whatever VB.NET's null value is - it's been a long time since I've done anything in VB.NET). So you could say:
Code:
IF picturebox.picture = vbnothing THEN
    'no image
END IF
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Please Help having problems with VB.net