# Visual Basic.NET

93K

Solutions

24K

Contributors

Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to  Visual Basic pre-2002, it is not the same technology,

In ADUC (and VB.NET) I can use a LDAP query to return objects using GUID

e.g.

(&(objectclass=*)(ObjectGuid=\8E\C5\9A\CE\F7\43\3F\43\A3\C9\93\4A\EB\42\20\51))

And this works well for objects which exist

But can't get it to work for deleted objects

Tried

(&(objectclass=*)(isDeleted=*)(ObjectGuid=\0b\99\33\ea\56\73\e4\48\b6\3a\a3\1a\3b\0b\38\09))

and

(&(objectclass=*)(isDeleted=True)(ObjectGuid=\0b\99\33\ea\56\73\e4\48\b6\3a\a3\1a\3b\0b\38\09))

But doesn't show any result, where if I used the same GUID in powershell e.g.

it returns:-

Deleted           : True
Objects,CN=Configuration,DC=domain,DC=local
Name             : LXXX64
DEL:ea33990b-7356-48e4-b63a-a31a3b0b3809
ObjectClass       : nTDSConnection
ObjectGUID       : ea33990b-7356-48e4-b63a-a31a3b0b3809

Any ideas why the LDAP query is not working for deleted items but the powershell one is?

I need to convert get name of an object from its object GUID in my VB app and currently best way I know in VB.NET is using System.DirectoryServices and a LDAP query
0
Can a VB.net expert explain to me about itemtype in VB.net? For example I am seeing the following class declaration. I searched online, and in MSDN, but nothing meaningful came back.

Public Class Singleton(Of itemtype As {New})

Public Sub New()
0
can someone tell me what is wrong with this query in vb.net   im trying to use wmic to get file information
dim num as string = "001" ' used to test
querys = "Select * from cim_datafile where drive=''C:'' AND Path = ''\\usr\\comm\\upload\\to_central\\'' AND filename =''invoice.''" & num.ToString()

0
We are creating hundreds of C#.NET forms by reading the VFP source and writing the .cs code.

The height, width, top, and bottom of all objects are identical.  The font is identical (exception MS Sans Serif is changed to Microsoft Sans Serif.  Also same font size.

The spacing and size of the objects are slightly different.  Enough to make a mess when the objects(labels, textboxes) are close together.

We need them to be identical. Any suggestions?
0
On a build of my solution I am getting the message below
It shows as succeeded but what does the message mean?

Error occurred while restoring NuGet packages: System.ArgumentException: The path is not of a legal form.
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetDirectoryName(String path)
at NuGet.VisualStudio.VsUtility.GetNuGetSolutionFolder(Solution solution)
at NuGet.VsEvents.PackageRestorer.UsingOldPackageRestore(Solution solution)
at NuGet.VsEvents.PackageRestorer.BuildEvents_OnBuildBegin(vsBuildScope Scope, vsBuildAction Action).
------ Build started: Project: wsClientAPI-Prod, Configuration: Debug Any CPU ------
Warning: Unable to update auto-refresh reference 'restsharp.dll'. Cannot find assembly 'C:\Webs\wsClientAPI-LarryT\packages\RestSharp.105.2.3\lib\net4\RestSharp.dll'.
Warning: Unable to update auto-refresh reference 'stripe.net.dll'. Cannot find assembly 'C:\Webs\wsClientAPI-Prod\packages\Stripe.net.4.2.1\lib\net40\Stripe.net.dll'.
Validating Web Site
Building directory '/'.

Validation Complete
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

0
Hi.  I'm using VB.net and Visual Studio 2008 and Windows Forms.

QUESTION:
1 WIth the datepicker object, I've blanked out the value initially then I let the user choose a date from the popup calendar.
After a user chooses a date from the popup calendar, then their date is populated into the form's field; however, if they change their mind and want it to go back to blank, it doesn't let them do that -- How do I allow a user to choose a blank option?

2. In a different datepicker field, I want it to be readonly so I've set the property to enabled=false.  Problem is it doesn't look greyed out (it's still white) so user thinks it's a field they're supposed to enter.   How do I make a disabled datepicker field greyed out?
0
I have main form which has a menu(toolstrip) and after the menu i have put a panel.From this menu a user selects an option lets say forexample,customers another form is displayed with list of customers but inside the panel.Am using listview to display a list of customers.When user double clicks on one of customers another form is displayed with form fields filled with customer details ready to be edited.When user finishes editing he saves the details and records are saved without a problem.Now what i want is to refresh the list on form within the panel.I have tried "frmCustomers.pull_customers_List" but it doesn't work.What could be the solution?

NOTE:pull_customers_List is the function used to query cutomers from the DB and display on listview.

CODE USED TO DISPLAY CUTOMERS FORM IN PANEL
Dim frm As New frmCustomers
frm.TopLevel = False
frm.Parent = Me.Panel1
frm.Show()
refresh---details.PNG
0
I have a process that sends email campaigns to our customers.

The send part is using multi-threading

But we are getting as many as 650 open SQL Connections and that is slowing down our server dramatically

Is there a way to limit the number of threads or slow things down a bit?
0
How can I delete the control when I move off the mouse hover over if a label. The code is below:

  Private UserControl As UcGauges = New UcGauges
Private Sub lblGaugeID_EditScreenDescription_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles lblGaugeID_EditScreenDescription.MouseHover
Using tempUcGauges As Form = New Form
tempUcGauges.Location = New Point(300, 300)
tempUcGauges.TopMost = True
tempUcGauges.ShowDialog()
End Using
End Sub

Private Sub lblGaugeID_EditScreenDescription_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles lblGaugeID_EditScreenDescription.MouseLeave

End Sub
End Class

0
*Using Telerik controls here..

I am having problems trying to get a radAsyncUpload control to show up in a row of a radGrid when the row is selected by clicking anyplace on that row.  I am guessing I need to toggle the radGrid into Edit mode once a row is selected?  I have the radAsyncUpload control in the EditItemTemplate of the radGrid for the "Upload" column.  I would then like for the single upload be performed before any other row may be selected to upload another file.

RadPageView4 is the section in question.

.aspx
<telerik:RadTabStrip RenderMode="Lightweight" ID="rdTab" runat="server" Orientation="HorizontalTop" Align="Left" MultiPageID="RadMultiPage2" SelectedIndex="0">
<Tabs>
</Tabs>

<br/>
Approved: <asp:Label ID="lblApproved" runat="server" Text="False"></asp:Label>
<br/><br/>
<asp:Button ID="btnApproval" runat="server" Text="Submit Approval" Enabled="False"/>

<asp:DetailsView

0
VB.net and SQL Server 2005:

On a master detail form I need to be able to have a DGV that that is pre - populated with a checklist that can be edited and contains checkboxes that can be checked.

Every instance of the master form will have a DGV with exclusive data

Thanks!
0
We have a VB.NET application that displays customer records from SQL 2016 database. We can edit or delete the customer records from there. About 50 users use that application. When a user has one customer record open, I do not want any other user to be able to access it. Instead a message should be displayed that another user is accessing this record.

What is the best way to do this? Does SQL have something on a locking record?
0
Hi I am sending an email blast and on email I am connecting each button with userid so if any user who get email click that email then  his click can be recorded. For eg Button click is like this:
http://www.Testweb.com/Pages/EmailBlast/Email.aspx?Id=1&page=www.Testweb.com/Pharmaceutical_Packaging__Details.aspx

previously I was using 3.5 framework and it was working fine there but now after switching to framework 4.0, instead of going to page Email.aspx
its trying to go to www.Testweb.com/Pharmaceutical_Packaging__Details.aspx, FYI I am doing URL rewriting also.

How I can fix this problem. For fixing issue I had to remove http tag so when I call page like below then its working
http://www.Testweb.com/Pages/EmailBlast/Email.aspx?Id=1&page=Pharmaceutical_Packaging__Details.aspx

0
I'm getting the following error message when setting the value to a DateTime Picker using VB.NET.

'Value of '4/15/0218 12:00:00 AM' is not valid for 'Value'. 'Value' should be between 'MinDate' and 'MaxDate'.
Parameter name: Value'

The date is definitely between the MinDate and MaxDate so I am not understanding the issue.  It's not a Null so many of the items I have read don't seem to apply.

When I type the following code

dtpDateStart.Value = "4/15/2018"  <-- This works

dtpDateStart.Value - MyProto.StartDate  <-- This Fails.  Where MyProto is a Class and StartDate is a Date in the class,

I think that should be everything unless you want the Exception Text.

Thank you,

dbote
0
I would like to extract the value for:  b.supplier_name.
Not sure how to accomplish this...
thanks much,
Rich

                Dim queryString As String =
"SELECT a.SupplierID,a.Supplier,a.Col1,a.Col2,a.Col3,b.supplier_id,b.supplier_name
FROM ReportServer.dbo.supplier_pricing a
INNER JOIN P21.dbo.supplier b
ON a.SupplierID = b.supplier_id
WHERE a.SupplierID = @supplierID"

Dim command As New SqlCommand(queryString, connection)
command.CommandText = queryString
command.CommandType = CommandType.Text

0
I want to add a label into my Splitter Container that is on a form and the splitter is dock full to the form. What is happening is that the label does not appear on the scplitter control panel 1.

How can I get the label to appear on splitter control panel 1?
0
I would like to get a list of available domains from my office 365 account and push them into a dropdown list.  Anyone know how to get this done in vb.net?  Does anyone know of a good way to do this?

0
Hi,
I am trying to call the method

I get an error : addressof operand must be the name of a method+vb.net

Thanks
0
I have a vb.net string for RevNo
I need a function that splits the numeric and alpha

For example  1A should be split as  1   A  ( split as Major and minor)
10A should be             10  A
0
Hi,

Currently I'm trying to imitate on how to export data from access 2000 to a fixed width text file, and so far i have successfully exports data to text file only with fixed width.
So when I try to upload the file to a third party software that we use it says invalid format.
When this error occurs i suspect it is because i don't have a start position.

I would like to ask question on how create  and format a text file with fixed width and start position in vb.net .

This is the initial tutorial i've followed: http://www.vbforums.com/showthread.php?530270-Formatting-Fixed-width-Text-Output
0
Is there a way I can create my own API to eDrawings for solidworks? There is one out there, but it requires an AutoCAD license.

Basically a client is giving us dwg files, we use eDrawings to view and print them.

So I would rather batch print them. Hence an API in visual studio to eDrawings would be nice. From there I could do the rest.
I haven't really created API's before, so I'll take any available advice.

Would anyone be able to set me on the right path?
0
WHEN I USED THIS CODE
       ElseIf operation = 8 Then
TextBox1.Text = Math.Cos(fo)

"FO "IS THE FRIST NUMPER TO WRITE
AND THIS ELSE IF IS IN EQUAL BUTTON FUNCTION
AND WHN I WRITE NUMBER 30 AND PRESS ON COS BUTTON IT GIVE ME 0.154251449887584
0
I am sending a table by email from vb.net, with html format, how can I add the style sheet?
0
My Problem is:
In VB.Net, How to fix a foreign   key column that is null (see attached)Null-Column.pdf
0
Hi,

I have this json coming from an REST api. I now want to make a representaion of it in my asp.net site (I use vb.net for the moment). But I don't fully get it to work when I create the classes representing the json and deserialize it. This is how the json looks like when I copy it form Postman:
{
"data": {
"type": "vehicle",
"attributes": {
"regno": "HCA015",
"vin": "WF0MXXGBWMDP17671"
},
{
"rel": "self",
"uri": "vehicle/vin/WF0MXXGBWMDP17671"
},
{
}
],
"basic": {
"data": {
"make": "Ford",
"model": "GALAXY 2.0 TDCi",
"status": 2,
"color": "Svart",
"type": "PB",
"vehicle_year": 2013,
"model_year": 2013
}
},
"inspection": {
"data": {
"latest_inspection": "2016-09-19T00:00:00+02:00",
"inspection_valid_until": "2018-09-30T00:00:00+02:00",
"meter": 38650,
"next_inspection_range": [
"2018-05-01T00:00:00+02:00",
"2018-09-30T00:00:00+02:00"
]
}
},
"status": {
"data": {


0

# Visual Basic.NET

93K

Solutions

24K

Contributors

Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to  Visual Basic pre-2002, it is not the same technology,