|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
Please help me I want while runtime add button, can drag it by mouse and resize it From edge when mousemove
In visual basic. Net
In visual Basic. Net
In visual Basic. Net
|
|
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|