How can I get internal HDD_DETLAIS = SerialNumber, Model, Manufacturer,TotalHeads ...... etc. Please help me.. Now my problem is my code run ok, but when I insert external HDD or pen drive then showing the last counting device Details please help .... i want to show only internal HHD device means OS loaded disk "C" drive Thanks Dim HDD_DETLAIS As String Dim HDD As New ManagementObjectSearcher("select * from Win32_DiskDrive") For Each HDDDET In HDD.Get HDD_DETLAIS = HDDDET("SerialNumber") + " Model-" + HDDDET("Model") + " Manufacturer-- " + HDDDET("Manufacturer") ' + " TotalHeads - " + hd("TotalHeads") '+ " Signature - …

Member Avatar
Member Avatar
+0 forum 3

** Cannot open MSSQLSSQLEXPRESS service on computer'.'. ** **What I have tried:** Dim myController As New System.ServiceProcess.ServiceController("SQL Server (SQLEXPRESS)") ------------------------------------------------------------------------------------------------------------ Private Sub Service_status() If myController.Status = ServiceProcess.ServiceControllerStatus.Running Then TextBox1.Text = "Started" ElseIf myController.Status = ServiceProcess.ServiceControllerStatus.Stopped Then TextBox1.Text = "Stopped" End If End Sub ------------------------------------------------------------------------------------------------------------ Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Service_status() End Sub ------------------------------------------------------------------------------------------------------------ Private Sub BtnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnStop.Click ProgressBar1.Value = 0 Try myController.Stop() Catch ex As Exception MsgBox(ex.Message) Finally ProgressBar1.Value = 100 myController.WaitForStatus(ServiceProcess.ServiceControllerStatus.Stopped) '//Add Service_status() End Try End Sub ------------------------------------------------------------------------------------------------------------ Private Sub BtnStart_Click(ByVal sender As System.Object, …

Member Avatar
+0 forum 0

hello sir getting error when run the loop and going to last value of row count please help and i can not use the 2nd loop in the place of cells(?????) number how can i use this **Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index** *** What I have tried:*** Dim aa As Integer For Z1 = 0 To DataGridView1.RowCount If Me.DataGridView1.Rows(Z1).Cells(2).Value = True Then aa = 1 Else aa = 0 End If Me.DataGridView1.Rows(Z1).Cells(7).Value = aa If Me.DataGridView1.Rows(Z1).Cells(3).Value = True Then aa = aa & 1 Else aa …

Member Avatar
Member Avatar
+0 forum 1

Getting error when showing data in list view, please help me..... Error :* Cannot add or insert the item '10-07-2018' in more than one place. You must first remove it from its current location or clone it. Parameter name: item* I use Vb.net 2010 visual basic sql server 2008 r2 stored procedure one listview I want this type of structure (example) id date item_name qty. amount 1 1/1/2019 a 2 10 B 1 12 x 14 100 zz 4 52 2 4/1/2019 M 5 80 N 4 50 But when I showing to the data 1st item show on list …

Member Avatar
Member Avatar
+0 forum 4

I create a project on vb.net 2010 and SQL server 2008r2 I showing a report in listview report am show fine and error free. But now I want to add a sub total column every end of the category. How it is possible please help me sir Please see the attachment picture https://ibb.co/tZ86Hvb https://ibb.co/V22d4Sk I try many coding, but not work, because i have no more knowledge about this. And search on google but many example are on Datagridview, but I used Listview please help me sir.......

Member Avatar
Member Avatar
+0 forum 1

How to change the color of a cell(back or fore color) of listview item according to item value with if condition. I do it but it is not work and show no error Please help me...... For k = 0 To ListView1.Items.Count - 1 If ListView1.Items(k).SubItems(6).Text > 100 Then ListView1.Items(k).SubItems(6).ForeColor = System.Drawing.Color.Red MsgBox("hi test code yes") Else MsgBox("hi test code no") End If Next k

Member Avatar
Member Avatar
+0 forum 1

Vshost.exe has stopped working... Posted A minute ago vshost.exe has stopped working this error showing after using the Crystal Report. The error show when I closed the application. If I not use the crystal report then the error not showing. I am creating a program in vb with visual studio 2010 ultimate and crystal report Please help me..... -------------- For view a report Public Sub PrintSaleRInvoice() Dim PrintSale As New DataSet objsale.saleinvid = txtSaleInvid.Text PrintSale = objsale.PrintSaleInvoice() ' Procedure name PrintSale.Tables(0).TableName = "DataTable1" Dim rpt As New SaleInv rpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait rpt.PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.Middle rpt.SetDataSource(PrintSale) SaleRInvPrint.CrystalReportViewer1.ReportSource = rpt SaleRInvPrint.ShowDialog() End …

Member Avatar
Member Avatar
+0 forum 1

Visual Basic 2010 and Microsoft Access 2013 I have a product table in MS with fields : fld_id,fld_name,fld_img,fld_price,fld_type fld_img i set it as attachment and of course attached the corresponding image to it - is this wrong? this is my code to get the data into the datagridview. my form uses combobox to select the type of product to display. right now the image column just displays the file name of image. how to display the image instead? Public Class frm_pl Private Sub frm_pl_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim getProducts As String = "SELECT FLD_TYPE …

Member Avatar
+0 forum 0

Hi, I want to create a Alternate Coloring in MsFlexGrid that using the Visual Basic Programming. Here I attach a source code : MsFlexGrid I give name : Flex If Wt <= RsParts.Fields!Lowerlimit Then '*********************************************************** '2. Section for create Color at 1 Column under REMARK Dim lngRow As Long Dim lngBack As Long Dim lngMax As Long Dim lngMin As Long For lngRow = 1 To .Rows - 1 'default background color LowerUpper = "This Part Weight is Less Than LowerLimit" 'check for important values If Val(.TextMatrix(lngRow, 1)) >= lngMax Then 'important color lngBack = vbRed 'Backolor lngMin = vbYellow …

Member Avatar
Member Avatar
+0 forum 1

write a programme in visual basic to create anarray of size 5 to store any 5 names and display them

Member Avatar
Member Avatar
+0 forum 2

I'll try to be brief in this post. I'm working on a cave generation program that will implement cell automata and marching squares. I'm new to Visual Basic and am wondering if the Canvas class is the best way to draw these black & white squares. For a reference the goal is something similar to this: https://unity3d.com/learn/tutorials/modules/advanced/scripting/procedural-cave-generation-pt1?playlist=17153 Let me know what you think the best graphical option would be for this. I'm looking for something simple and easy to learn!

Member Avatar
+0 forum 0

I have 3 table which are ![zz.PNG](/attachments/large/3/f81c645612d06529dba9af30a4a314ac.PNG "align-center") I want to duplicate a record from the master table in the same time it will duplicate all children table. I will assign new primary key to the new duplicate record. For the tbl_System and tbl_MainComp work fine. But when i have 2 record in tbl_MainComp and each of them contain 1 record in tbl_SubComp, it just copy all the record in tbl_SubComp to each tbl_MainComp record. cmd.CommandText = "INSERT INTO tbl_System (EquipTag, S_Name, S_Function, S_Failure) " & " SELECT '" & TextBox1.Text & "', S_Name, S_Function, S_Failure FROM tbl_System WHERE EquipTag …

Member Avatar
+0 forum 0

Dear all I have combox accumated with 3 perameter Grid Connected PV-SYS- Full Feed In Grid Connected PV-SYS with Electrical Appliance -Net Metering Grid Connected PV-SYS with Electrical appliance ,battery system -Net Metering Each combobox value contain images.I used picture box to dispaly images. How to display the image based on Selction of sting from Combobox I have attached image for reference Public Class Climate_Form Private Sub Climate_Form_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim selectedItem As String selectedItem = ComboBox_TypeOfSys.SelectedItem() If selectedItem = "Grid Connected PV-SYS- Full Feed In" Then PictureBox_FullFeed.Show() PictureBox_NetMeter.Hide() End If If selectedItem = "Grid …

Member Avatar
Member Avatar
+0 forum 1

Dear all, Here i have attached form window.I wanted to update form with relative data How to refresh the single form. When New project detail is clicked from loaded with project data , when panel button clicked form loaded with panel data. 1)I tried this method. I created a group box for indivual button ,Show & hide when particular button being pressed. for example below . When new button pressed only display groupBox_new, Or any other method available. Private Sub Button_New_Click(sender As Object, e As EventArgs) Handles Button_New.Click GroupBox_New.Show() GroupBox_Panel.Hide() GroupBox_inverter.hide() so on....... End Sub 2) If you have checked …

Member Avatar
+0 forum 0

Hello, I am trying to create a simple application for personal use for Twitter marketing. This is my first time trying to interact with REST APIs through VB and I have been going around and round getting various different errors. Here is my current code and I get a '401 Unauthorised' error; '--------------------------- TwitterApp --------------------------- System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.HttpWebRequest.GetResponse() at TwitterApp.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\User\AppData\Local\Temporary Projects\TwitterApp\Form1.vb:line 50 --------------------------- OK --------------------------- ' Here's my code, no idea how right it is... `Imports System.Net Imports System.IO Imports System.Text Public Class Form1 Private Sub Form1_Load(sender …

Member Avatar
+0 forum 0

How do I detect left mouse button down and up events on the 'Close' option of the system menu that appears when the mouse is clicked on the top left corner of a form?

Member Avatar
Member Avatar
+0 forum 6

hi I want to make a query that first find the sum of two columns of different table then subtract it Example it is a visual basic program Dim large_tbl As String Dim sell_large As String large_tbl = "SELECT Sum(No_Of_Bottle) FROM add_cotton where Cateogry='Large'" sell_large = "SELECT Sum(Quantity) FROM Sell_Detail where Cateogry='Large'" Adodc2.RecordSource = large_tbl - sell_large Please help it shows an error type miss match

Member Avatar
Member Avatar
+0 forum 2

i have a program relate to account which subtract value of a Customer but problem is when the user amount is same mean ================ ============ Customer Name Amount ================ ============== John 200 Max 100 John 200 if i input 100 the result will be ================ ============ Customer Name Amount ================ ============== John 100 Max 100 John 100 but i want the answer ================ ============ Customer Name Amount ================ ============== John 100 Max 100 John 200 hope you get idea if you want then i show my code Thanks in advance

Member Avatar
+0 forum 0

Hi, I am using VB6 and phpMyAdmin connected by WAMPServer for my system. I am new in this language. Here's the code in my that seems to be wrong: Private Sub cmdsubmit_Click() Dim rs As ADODB.Recordset Dim strsql As String strsql = "insert into table1 ( surname, firstname, middlename, house, street, village, brgy, city, gender, kind, birthday) values (" _ & "'" & txtsurname.Text & "'," _ & "'" & txtfirstname.Text & "'," _ & "'" & txtmiddlename.Text & "'," _ & "'" & txthouse.Text & "'," _ & "'" & txtstreet.Text & "'," _ & "'" & txtvillage.Text & …

Member Avatar
Member Avatar
+0 forum 6

i am using employee table to test if i am doing the whole program correct. I have 5 buttons. one is to add records and another to save(commit), to update, to delete and to clear. I am having trouble with the code to save the record to the data set. when i click add, it lets me add the new name but when i press save(commit), it wont save. i already added the data adapeter. this is my code: Public Class Form1 Dim inc As Integer Dim MaxRows As Integer Dim con As New OleDb.OleDbConnection Dim dbProvider As String Dim …

Member Avatar
Member Avatar
+0 forum 2

Hello, I have been using StreamWriters for a long and time and it has always worked but now I seem to be getting an Access Denied error while trying to save to the current users Desktop... Dim savePath As String = "C:\Users\Josh\Desktop\EpiPhone\029.csv" Using sw As New StreamWriter(savePath) '...Rest of code... End Using What are the most common problems with Access Denied while writing to the Desktop?

Member Avatar
Member Avatar
+0 forum 4

I have an MDI application containing an MdiParent form and few MdiChild forms. The MdiParent has a fixed MenuStrip, a fixed ToolStrip and a fixed StatusStrip. The MdiChild forms have one or more ToolStrips and a StatusStrip along with other controls in them. The ToolStrips and the StatusStrip of the MdiChild are generally hidden and are only shown when the form is opened in the MdiParent. Based on this scenario I have the following objectives: 1) When an MdiChild is opened in the parent, its ToolStrip(s) should be shown along with the fixed Menu and ToolStrip of the parent. Please …

Member Avatar
+0 forum 0

I am in wonder. I just make a slideshow form and add the context menu strip as when the user click on download image then current image get copy and paste on the desktop. I use path and destination method in this but they say bitmap cannot be converted into the string. Original Code: Dim Path as string = "Path directory" } `my.resources._1` Dim destination as string = "Detination Directory" If File.Exists(path) And Not File.Exists(destination) Then File.Copy(path, destination) Replace code (try): Dim Path as bitmap = "Path directory" } `my.resources._1` Dim destination as string = "Detination Directory" If File.Exists(path) And …

Member Avatar
Member Avatar
+0 forum 4

hi, i have a datagrid which looks like: subject students eg1001 182737H 29837B 29837C 19282W eg1002 192837C 32810H so on and so forth. how can i do a counter and put into a column between subject and students? like: subject numberofstudent students eg1001 4 182737H 29837B 29837C 192823W eg1002 2 192837C 32810H my codes are as follows: Dim connect As String connect = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\segdata.accdb" Dim conn As New OleDbConnection(connect) Dim cmd As OleDbCommand = New OleDbCommand cmd.Connection = conn conn.Open() cmd.CommandText = "SELECT DISTINCT ModuleCode, AdminNo FROM(SEGDATA)ORDER BY ModuleCode ASC, AdminNo ASC" Dim dt …

Member Avatar
Member Avatar
+0 forum 6

Hello I am trying to display an ID which is a primary key in my table by selecting the corresponding name in my table. the names have been saved in a combo box and depending on the name selected the textbox will display that Id. the code I have so far only gets the names from sql server but doesnt show the id in the textbox. can you guide me on this please.. this is the code for combobox. i placed it in the formload [CODE] Public Sub RtnCmbVal() Dim conn As SqlConnection Dim str As String = "select ConsultantId, …

Member Avatar
Member Avatar
+0 forum 8

what is the code to make a timer to my program that basically times how long it takes students to complete a quiz, the timer starts and stops once the 15 questions in the quiz are answered twice , Thank You

Member Avatar
Member Avatar
+0 forum 1

Hello Community, I would like to know if there is a way to use augmentations on a visual basic.net program? Eg. "ProgramName.exe Command" And i mean on my vb program so i could use a commandline using cmd to do something on my program. Please Help.

Member Avatar
Member Avatar
+0 forum 3

Hello Community, I was wondering if there is a way to replace a cell value from one excel spreadsheet and save it as another spreadsheet but with the replaced cell value. Please Help

Member Avatar
Member Avatar
+0 forum 2

Hello Community, I was wondering if there is a way to make grid transition in visual studio using the language visual basic. Please help...

Member Avatar
Member Avatar
+0 forum 3

Hello Community, I was making my own custom window and i need help with making it in wpf, i am new to wpf so i don't know much XAML so i was wondering if you can help?, this is what i wan't. In the example i'm using the minimize button. ![ex_1](/attachments/small/3/ex_1.png) ![ex_2](/attachments/small/3/ex_2.png) I hope i made this clear enough. Please help...

Member Avatar
Member Avatar
+0 forum 2

The End.