|
|
All of examples in Internet for c# only
I tried from searching
For example in vb.net
|
|
|
|
|
So? Convert the C# code to VB.NET. C# and VB.NET are not as different as you think they are.
|
|
|
|
|
Ahmedabdalla83 wrote: All of examples in Internet for c# only And now you know a reason why most of us use c#
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Ahmedabdalla83 wrote: All of examples in Internet for c# only Not all of the tutorials on CP on Drag&Drop are C#; there was one that allowed a custom picture while dragging.
..but you can search for that too, I'm not going to do that today. Might tomorrow, but SDV has new content
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I understand very good that you prefer VB instead of C# - for me it's the same - but I have learned how to make VB-Code from C#-Code. The easiest way is to use the (FREE) Telerik-Converter in the Internet. But Basicly : both languages are using the .Net-Framework and there is no real difference between the use of a Framework-method with C# or VB, If you once realize this you don't have much problems with the code-conversion ...
Give it a try ... 
|
|
|
|
|
OK man thanks for your time
I will try 😍
|
|
|
|
|
|
Hello there, I couldn't find a way to take screenshot on dell laptop. Do a reply if anyone of you guys know how can I take screenshot on my dell's laptop.
Thanks.....
|
|
|
|
|
This is not a technical support site for brand-specific hardware: contact Dell support (or your manual) and ask them!
But if it's Windows, there is normally a key sequence to do that PrtScn does the whole thing, ALT+PrtScn does the active window, and WINKEY+S allows you to specify an area ... all of these copy the screenshot to the clipboard and you can do what you want with it from there ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
Droidtips wrote: Hello there, I couldn't find a way to take screenshot on dell laptop Is the "print screen" button missing?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I've done this before, but can't find it in the project. Been a year since I've worked on this.
I have a list of invoices, and a list of strings. I want to remove all the invoice items where the name that has a match in the list of strings. I did some digging around, and could not find the nomenclature to get a match result on Google.
Dim exemptPrintItems = New List(Of String) From {
"delivery",
"dhl",
"freight",
"shipping",
"ups"
}
'Filter out the excluded print items
invoiceItems = invoiceItems.FindAll(Function(x) Not excludePrintItems.Contains(x.FITEMNO)).ToList()
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I didn't add toLower() on my previous attempts
invoiceItems = invoiceItems.Where(Function(x) Not excludePrintItems.Contains(x.FITEMNO.ToLower())).ToList()
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
|
I remember the Turkish problem, but I keep using lower case for some reason thinking the opposite.
And didn't know about Hashset, never heard of it. But just gave it a whirl and it solves my case/turkish issue.
I read the post in the lounge on the one liner, and was kind of surprised. I'm not really sure where I got it from. It was sort of Deja Vue in which I thought I wrote it a couple of days ago and was just trying to remember what I wrote.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I have used https://www.codeproject.com/Articles/1113626/Adding-the-Missing-Real-Time-Clock-to-Windows-IoT to get 2 functions to convert int to bcd and vice versa. As I use Visual Basic I converted them, but the functions don't seem to create the right output. Please advise.
static int BcdToInt(byte bcd)
{
int retVal = (bcd & 0xF) + ((bcd >> 4) * 10);
return retVal;
}
Private Shared Function bcdToInt(bcd As Byte)
Dim retVal As Integer = (bcd And &HF) + ((bcd >> 4) * 10)
Return retVal
End Function
static byte IntToBcd(int v)
{
var retVal =(byte)( (v % 10) | (v / 10) << 0x4);
return retVal;
}
Private Shared Function intToBcd(v As Integer)
Dim retVal As Byte = (v Mod 10) Or ((v / 10) << 4)
Return retVal
End Function
modified 16-Feb-21 5:27am.
|
|
|
|
|
It would help if you provided the details of the error you're getting.
Based on a quick test, you're getting an overflow exception when you call intToBcd(239) . Change the function to:
Private Shared Function intToBcd(v As Integer)
Dim retVal As Byte = ((v Mod 10) Or ((v \ 10) << 4)) And &HFF
Return retVal
End Function With that change in place, the C# and VB.NET functions appear to return the same values for the same inputs.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
There is no error. The data are just incorrect.
Your changes work beautifully. Thanks!
|
|
|
|
|
Incorrect results are an error.
In this case, since the input domain was small enough, it was fairly trivial to run through every possible input. But in future, you should provide an example of the input(s), expected output, and actual output where the results are wrong.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello, how do I delete a file from my computer that has already been sent to an email?
Imports System.IO
Imports System.Net.Mail
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim compInfo = "computerInfo.txt"
Try
Dim MailMessage As New MailMessage()
MailMessage.From = New MailAddress("@gmail.com")
MailMessage.To.Add("@gmail.com")
MailMessage.Attachments.Add(New System.Net.Mail.Attachment(compInfo))
Dim SMTPServer As New SmtpClient("smtp.gmail.com")
SMTPServer.Port = 587
SMTPServer.Credentials = New System.Net.NetworkCredential("@gmail.com", "pass")
SMTPServer.EnableSsl = True
Catch
End Try
If System.IO.File.Exists(compInfo) = True Then
System.IO.File.Delete(compInfo)
End If
End Sub
The problem appears in:
System.IO.File.Delete(compInfo)
"The process cannot access the C:\...\...\computerInfo.txt file because it is being used by another process"
|
|
|
|
|
The message you got says exactly what the problem is : another part of your Application or another Application is allready using the File you want to delete. In this case your OS itself prevents that you can delete this file.
So ... from where does this file come from and is it necessary that the file is still opened ?
This answer could not come from us - it must come from you ...!!!
|
|
|
|
|
Your code snippet doesn't send the email, but just adding the file as an attachment seems to keep the file locked until either the email and all attachments have been uploaded to the SmtpServer or the Attachment object has been Disposed.
|
|
|
|
|
As Dave said, you need to dispose of the message after you've sent it:
Using message As New MailMessage()
message.From = New MailAddress("@gmail.com")
message.To.Add("@gmail.com")
message.Attachments.Add(New System.Net.Mail.Attachment(compInfo))
Dim smtp As New SmtpClient("smtp.gmail.com")
smtp.Port = 587
smtp.Credentials = New System.Net.NetworkCredential("@gmail.com", "pass")
smtp.EnableSsl = True
smtp.Send(message)
End Using
If IO.File.Exists(compInfo) Then
IO.File.Delete(compInfo)
End If
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello!
I integrated wkhtmltopdf.exe into one of my projects which ist called via process.start(). I wrapped the VB.NET-Code into a DLL, which is configurated to do COM-Interop. The COM-Library is called from VBA-Code in Access.
If process.start() is called the .NET-Runtime causes Exception "Access denied".
If I debug program or execute it in an "only .NET Environment" the Exception is not raised.
Why? 
|
|
|
|