Questions tagged [vb.net]

36233 questions
1

votes
1

answer
28

Views

Copying Clipboard text including tables to microsoft word (.docx) file

Dim objApp As Word.Application Dim objDoc As Word.Document objApp = New Word.Application() objDoc = objApp.Documents.Open('C:\Users\bn\Desktop\DCIM\lol.docx') objDoc.Activate() objApp.Selection.TypeText(My.Computer.Clipboard.GetText) objDoc.SaveAs('C:\Users\bn\Desktop\DCIM\lol2.docx') objDoc.Close()...
Kishan Gupta
1

votes
0

answer
254

Views

VB.net WPF and Win 10 Toast Notifications

I'm trying to show toast notifications in Win 10 from vb.net WPF app. 1. I added 10.0 to .vbproj file in the section. 2. I Added references to Windows.Data and Windows.UI 3. My code: Class MainWindow Private Sub BtnClick() Dim ToastN As ToastNotification = New ToastNotification('Test', 'This is tes...
RadiM
1

votes
0

answer
48

Views

To find what kind of usb is connected to the port using vb.net

I have a com port and i want to send messages to it. I want to be certain that is port is of the type RS 485. How can i do that. I have searched online and the only way i see is through the win32 dll. is there any other way and if there isnt could you please point me to the win32 method. I have the...
TheNoob
1

votes
1

answer
63

Views

Binded DataGridView only updating the currently selected row

I'm working on getting my DataGridView controls to auto update the values of my objects in my object model. I have object arrays that I'm binding to my DataGridView through the following code Dim bs As BindingSource = New BindingSource() bs.DataSource = aryJoints DataGridJoints.DataSource = bs I am...
RobotGuy
1

votes
1

answer
235

Views

how to download a file with its cookie and URL?

I have a big problem downloading .xlsx files from a site automatically. I have tried the following code and cookie is ready: Dim request As HttpWebRequest = CType(WebRequest.Create(('http://www.trademap.org/Country_SelProduct_TS.aspx?nvpm=1|||||0101|||4|1|1|1|2|1|2|1|1')), HttpWebRequest) request.Co...
Alireza Allahdadian
1

votes
1

answer
61

Views

Desktop admin panel for web app

I'm building a eCommerce web application for shops using Laravel/Foundation/PostgreSQL, and it will provide them (shop owners) with web based admin panel. My question is, can I make the super admin panel (the tool that I use to control everything) using desktop technology such as VB.net (or anything...
Ahmad Issa
1

votes
1

answer
73

Views

Calculating quantity of an item in each transaction in another table

I am working in a company in stock department Consider two table of Export and Stock which Export have following attributes: Export{ ExportDate Date not null, StockID int not null, Quantity decimal(10, 2), }; and Stock table has the following attributes: Stock{ ItemID int primary key, ItemName nvarc...
Ibrahim
1

votes
1

answer
96

Views

Passing quoted and unquoted arguments to ProcessStartInfo

I'm trying to turn a .lnk file and its arguments into a programmatically executed process using ProcessStartInfo. The .lnk file looks like this: Target: E:\Apps\RunAsDate\RunAsDate.exe 30\10\2017 00:00:00 'D:\MyTest\test.exe' Execute in: 'D:\MyTest' I have a function in test.exe that displays the...
tmighty
1

votes
2

answer
121

Views

Catch event thru interface with vb.net

I want to add a user control containing a simple button in a form and catch the button click event from the form. Here is my actual code : Interface : Public Interface IPlugInterface Event Test() End Interface UserControl : Public Class Plug Implements IPlugInterface Private Event Test() Implements...
kloug
1

votes
0

answer
42

Views

Preserving Form hierarchy when importing form into another project

I want to use the form of another VB.NET project in a new project. When I insert it as 'Import existing element' and choose the form's '.vb' file, only the .vb file is imported into the new project. When I add all three files (.vb, .Designer, and .resx), they are imported individually. The form hier...
tmighty
1

votes
0

answer
33

Views

Puzzling Output When Reading Memory Address In VB

So I have this code Imports System.Runtime.InteropServices Imports System.Text Public Class Form1 Const PROCESS_WM_READ As Integer = &H10 Public Shared Function OpenProcess(dwDesiredAccess As Integer, bInheritHandle As Boolean, dwProcessId As Integer) As IntPtr End Function Public Shared Function Re...
NexusEyes
1

votes
0

answer
101

Views

IdentityModel.OidcClient for VB.NET

Anybody know if there is a library to connect to OpenID from a application Winforms VB.NET ? I found exactly a library for my purpose IdentityModel.OidcClient but it's in .NET C#. I need a framework like that but in VB Thanks you so much for any suggestion.
Antoine V
1

votes
0

answer
60

Views

Selecting an Excel worksheet using a variable

I have a variable called content which contains a worksheets name. I want the program to be able to find this worksheet inside my Excel file. I would normally accomplish this by doing this: Dim xlapp As Excel.Application Dim xlworkbook As Excel.Workbook Dim xlworksheet As Excel.Worksheet xlapp = New...
jazzathecutts
1

votes
0

answer
36

Views

trigger Jquery in dynamic combobox

I have a .net form which opens a webpage in webbrowser and selects 2 Combobox where the first Combobox value changes the value of the second Combobox values. like if i select 'Assigned' in first Combobox , the second Combobox will have list of assigned reason, and similarly if i select 'Pending' in...
Ashok Kumar
1

votes
1

answer
53

Views

DropDownMenuItem check should uncheck other DropDownMenuItems

I'm creating a ToolStripMenuItem's DropDownItems at runtime. Me.mnuExtrasSecondaryLCID.DropDownItems.Clear() Dim iCount As Integer = -1 For Each nLang As clsLanguage In g_LCIDs If nLang.IsLeader Then iCount += 1 Dim n As New ToolStripMenuItem n.Name = 'mnuSecondaryLCID' & iCount.ToString() n.Text =...
tmighty
1

votes
3

answer
529

Views

Uncheck an item and “Select All” option from CheckedListBox on Windows Form

I have added a checkbox list with some names and a select all option. I am able to select all check boxes in checkbox list when I select (Select all) option. Problem here is, I am not able to uncheck (Select All) option whenever I uncheck any of the options from check box list. Below is the vb.net c...
RBK
1

votes
0

answer
77

Views

Issue dynamically Compiling VB code

When I compile VB code using CodeDom, I need not specify fully qualified path for system references. For example: Dim param As New CompilerParameters param.ReferencedAssemblies.Add('System.dll') works as expected. But when I do the same using roslyn, it is expecting me to give a fully qualified path...
Anoop
1

votes
1

answer
121

Views

Stopping Main Thread with MessageBox

I query the database on a separate thread and generate a MessageBox for the user. I want the user to stop what he's doing and respond to the MessageBox. With my code below, the message box doesnt even pop up over the current window. The user needs to click on the taskbar to see it. How can I get it...
user9199295
1

votes
1

answer
55

Views

SSIS Data Tools for SQL Server 2014 (none of vb.net script tasks are working, even with default code)

I have installed SQL Server 2014 Data Tools. When I add the script task and use C#, it work. But when I add script task and choose vb.net 2012, and then clicked on edit script and save. After that click ok and getting this error message for all scripts, please note that I have not even added vb.net...
user3577355
1

votes
0

answer
53

Views

Setting Secure Flag for windowsAuthentication Session Cookie

For some reasons, the secure flag for ASP.NET_SessionId on my development tool does not turn on. I have tried the following methods: I used windows authentication instead of form authentication. Are there a way for me to turn on the secure flag besides modify the web.config with the method above? e...
micheal_uci
1

votes
1

answer
37

Views

How to use the same itemssource in different methods

I fill a ListView in the initialize with data of a db (per LINQ) and use the ItemsSource to update the ListView. Then I wrote some other methods to filter the ListView. Everything works fine, because I only use one filtermethod at the same time. Now I want to use two or more methods at the same time...
Raizzen
1

votes
1

answer
70

Views

I can't get a Bluetrade API Private Function Call to Work

Here is their PHP Examaple. You can find the entire api at https://bleutrade.com/help/API $apikey = 'YOUR_API_KEY'; $apisecret = 'YOUR_API_SECRET'; $nonce = time(); $uri = 'https://bleutrade.com/api/v2/account/getbalances? apikey='.$apikey.'&nonce='.$nonce; $sign = hash_hmac(...
Shawn
1

votes
1

answer
19

Views

How to find blank value from all member of class in vb.net

I have third party object which contain so many member with integer, string and Boolean. I want to update that record whose value is not null or blank
PATEL
1

votes
1

answer
168

Views

SQL Queries and Threading

I have to execute several SQL queries and I want to use Threads for this, because this queries have to be executed every 1 second to update or get some different values of the database. When I try to execute my code, I get the following Error: WindowsApplication1.vshost.exe Error: 0 : There is alre...
Toberto
1

votes
0

answer
90

Views

OLEDB connection works in debug but not in browser - failure creating file

I am migrating a website from server 2003 to server 2012. One of the pages having problems works when I open it in debug via Visual Studios(2010) but doesn't work when I just access the page via browser (even locally through the server). Dim fileName As String Dim templateFileName As String Dim...
MADnoobie
1

votes
1

answer
36

Views

MySql - An unhandled exception of type 'System.InvalidOperationException' occurred in System.Data.dll

I am using MYSQL database for that...I get this following Error...Please anyone can help me? Imports System.Data Imports MySql.Data Imports MySql.Data.MySqlClient Public Class formLogin Dim connStr As String = 'server=localhost;user=root;database=ssknet;port=3306;password=;' Dim connection As New My...
ssk developer
1

votes
0

answer
81

Views

How to determine which columns to index in a SQL query

I have a program written in VB.NET with a SQL Server database, to manage my electric engines' system, where I have about 15000 records in my database till now and as I'm filling data more and more, my queries started to slow down exponentially. I decided to solve that issue by indexing, however I do...
Mohammad Fneish
1

votes
1

answer
879

Views

Creating Custom Form Template

I'm creating a vb.net project with over 20-30 forms. I want to apply same options for every form like 'no border,backcolor,picturebox at left bottom etc.'. and it takes much time to do these for ever form. Please tell me a shortcut :) (I've thinked about creating one form and duplicating it.)
dan dadadadan
1

votes
2

answer
271

Views

Connecting VB.NET to MySQL

I'm trying to use this statement Imports MySql.Data.MySqlClient in VB.NET to get the objects to work with a MySQL database. I get a build error because the MySQL package doesn't exist. However, I tried a couple different things to try to get it installed. I followed the instructions on the Oracle/M...
Michael T
1

votes
1

answer
96

Views

issue listing items from parent MenuStripItem from MenuStrip in VB Net

I have tried this code to list all SubItems from ToolStripMenuItem For Each x As ToolStripMenuItem In FileToolStripMenuItem.DropDownItems MsgBox(x.Text) Next but i get this error below Additional information: Unable to cast object of type 'System.Windows.Forms.ToolStripSeparator' to type 'System.Win...
yoss
1

votes
0

answer
50

Views

VS 2017 adding code incorrectly

I am working with VS 2017 - using VB.Net, my project will get damaged. When I review I see that there a several places where code in being inserted in the wrong places - the following code was placed after the final tag. When I delete it, it will be regenerated over and over. Any help would be appr...
oddball
1

votes
1

answer
95

Views

Paging in SharePoint with SPSiteDataQuery

I'm attempting to write a WebPart for SharePoint that will display a list of the most recent uploads and modifications to the Site (including all Document Lists) To that end I have created an SPGridView and I am using an SPSiteDataQuery to populate that with my (customisable) selected Lists. I'm awa...
J.C
1

votes
2

answer
40

Views

MySQL VB.Net Connection Problems

I have setup a MySQL database locally and using the MySQL Workbench, i have setup accounts on which i can access later but when i tried to connect using VB.Net, i have receive an error 'Access denied for user [email protected] (using password: YES)'. I have tried to grant all the privileges to root but...
batch 1999
1

votes
1

answer
59

Views

Regex taking too many characters

I need some help with building up my regex. What I am trying to do is match a specific part of text with unpredictable parts in between the fixed words. An example is the sentence one gets when replying to an email: On date at time person name has written: The cursive parts are variable, might conta...
Whitekang
1

votes
1

answer
349

Views

How to open form when specific cell on datagridview double clicked in visual basic?

i have a datagridview, more like this: +-------+-------+-------+-------+ | a | b | c | d | +-------+-------+-------+-------+ | 1. | asdf | sda | sdfs | +-------+-------+-------+-------+ the problem is how to make a cell ex: asdf click and a form will show? but when sda or sdfs...
Putri Alvionia
1

votes
1

answer
617

Views

Export data from Intouch to Excel

I'm programming an SCADA with Intouch R2 SP1. In this SCADA I have to make some reports in excel. The report it's simply writting 10 values into specific cells. The thing is that the code I'm using is working with Office 2010 which is the version I have in my computer, but when I installed the SCADA...
salonso
1

votes
1

answer
41

Views

After clicking backspace button text starts from the beginning of a textbox

The button works but after it is pressed the text needs to start when it was left off and not in the beginning. '' Button to remove 1 number Private Sub btnCE_Click(sender As Object, e As EventArgs) Handles btnCE.Click If pinbox.Text.Count > 0 Then '' Works if count is bigger then 0 pinbox.Text = pi...
Michalodzien
1

votes
0

answer
19

Views

How to work with data from excelfile that is crerated by another programm

How can I save an instance of excel (with vb.net) that is opened by another programm. example; I am making an export to an exelfile from pragram A. Programm A export the data to Book1.xlsx. At this moment i want to start working with this data with Program B If I open an excelfile with a code in v...
edwin
1

votes
0

answer
56

Views

How to use datatable for SSRS Report in SSRS Class Library?

Hi I created a simple Class in SSRS solution. Public Class Class1 Dim table As DataTable = GetTable() Function GetTable() As DataTable ' Create new DataTable instance. Dim table As New DataTable ' Create four typed columns in the DataTable. table.Columns.Add('Dosage', GetType(Integer)) table.Column...
BobNoobGuy
1

votes
0

answer
57

Views

comException is unhandled

Public Class Stock Dim a As New Module1 Dim rs As ADODB.Recordset Dim category, item As String Private Sub Stock_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load a.Connect() rs = New ADODB.Recordset rs.Open('SELECT * FROM Stock', a.cn)'this line show error' rs.Mov...
Vishal Rai

View additional questions