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.
I am currently writing a business application which is a collaborative tools (e.g. messaging, file sharing, reminders, etc.) which uses a client/server model. One thing I'm currently stuck on is how the client application can locate the server without requiring each user to enter the IP address in their own application. From research I've done, it appears that there are two ways this can be accomplished.
1. I can require that the system admin (who installs the server application) to create an A record for the server and then create an SRV record which would list the port and the hostname (from the A record). However this would require the network to have a DNS server.
2. I can use IP multicasting. On a predefined port, the server can send out a message at regular intervals which contains its IP address and the port to connect on. When the client application starts up, and during login, the client application can listen for this message to determine where the server is located.
If the second option is viable, any suggestion on how often the multicast message should be sent out? It should be often enough that by the time the client application has finished loading, and the user has begun the login process, it has already identified the local server. However, I'm worried about sending it too often and causing network congestion.
I am leaning towards option two as it doesn't require any DNS records to be updated and seems to be easier for whoever installs the server application. I was wondering if anyone else has had to do something similar and had any suggestions on either of these two methods, or any other method that may work better.
Please note that I am using .NET 4.6, server application is a windows forms application, and the client application is being designed with WPF; WCF is not being used for this project. Any comments or suggestions would be greatly appreciated. Thank you in advance for any help in this matter.
A black hole is where God tried to divide by zero.
There are 10 kinds of people in the world; those who understand binary and those who don't.
Are you sure? Really sure? That means that someone has to log in to that server and start that application in his user session. It cannot be run as a Windows Service anymore. And just imagine the server being re-started (e.g. because of updates): your server application won't be restarted. Or: the user in whose session the application is running logs off (instead off disconnects the RDP session), or ....
No matter what, you're going to have to do some setup on the server side. There are going to be clients who don't want your "here I am!" packets polluting their network every 10 seconds or so. These can also be spoofed by the way which is a security risk.
There are also clients who are going to want that method for ease of configuration.
You can also support the DNS approach but you're still going to have to support manual entry of the address the user wants to use, such as in a situation where they have more than one server up and running, possible one for production use and another for testing.
Now you've got to let the users choose which server. Possibly limiting that the admin setting only, ...
There's a LOT more to this than what you're thinking about in your question.
facing a strange problem where a device, normally seen by the system as a serial port and mapped to a COM port, does not behave in same way when connected to a USB3.0 port.
Them COM port is activated, same way as when using USB2.0 and it is initialized exactly in same way (115200, 8N1) but data coming trough are not readable, corrupted or at a different speed (?). Haven't went deeper for the moment.
Does anyone know something basic remarkable rule about such behaviour/application? Should a USB3.0 port act exactly same as a USB2.0 port when a serial device is attached (and correctly recognized) to it? Or is there something extra to be done/known when working through USB3.0?
We are not here to do your homework for you! It is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think! Start by reading the values into an array, then write a method to do the sort. That's not difficult, the algorithm is pretty basic and freely available: Bubble sort - Wikipedia[^]
If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
We do not do your HomeWork. HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them. Any failure of you will help your teacher spot your weaknesses and set remedial actions. So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better. When you just ask for the solution, it is like trying to learn to drive a car by having someone else training. Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem.
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
Hi, I have written a surveying program for a ppc 2003 device using VB 2005. I need the code to make it search for a Bluetooth instrument and pair with it. It has to send a command for that instrument to take measurements and then receive the measurements and populate text boxes in my program. Can someone help please.. Many thanks
Thanks Richard, For now I just need the code for my program to discover and pair with other devices. I will contact the manufacturer to see if he is willing to help. Instrument documents don't show anything like that. Regards
i used keyboard shortcuts to windows form application... but when i minimize the form application key shortcuts what i used for form applies on other applications also ... need help....plz ... send me solution
Keyboard input is send to the active window. If you have minimized your application it does not have an active window anymore and the input is send to the window which is then active (the desktop if there is no application window).
The system posts keyboard messages to the message queue of the foreground thread that created the window with the keyboard focus. The keyboard focus is a temporary property of a window. The system shares the keyboard among all windows on the display by shifting the keyboard focus, at the user's direction, from one window to another. The window that has the keyboard focus receives (from the message queue of the thread that created it) all keyboard messages until the focus changes to a different window. ... The concept of keyboard focus is related to that of the active window. The active window is the top-level window the user is currently working with. The window with the keyboard focus is either the active window, or a child window of the active window. To help the user identify the active window, the system places it at the top of the Z order and highlights its title bar (if it has one) and border.
So there is no solution. Your form must be the active window to receive keyboard messages.
Hello everyone, I'm new here.
I am desperate for a solution to my problem in the visual basic code.
With the library TagLib I can write ID3v2 tags on mp3. I'm having trouble seeing the text Lyrics on Android devices and I realized that the problem is the text encoding (by TagLib).
With an encoding in ISO-8859-1 or UTF16 everything works good, but with UTF8 encoding will not work.
What I would know is how can I set the encoding TagLib write ISO-8859-1.
I do not know how, but it is the library that selects and applies automatic text encoding even if I have encode the text before in ISO-8859-1.
How can I fix?
Here's the code:
Dim Testo AsString = "Text Lyrics"Dim mp3 As TagLib.File = TagLib.File.Create("C:\Music.mp3")
'convertion in iso-8859-1'Dim byText() As Byte = System.Text.Encoding.Unicode.GetBytes(Testo)'Dim strTemp As Byte() = Encoding.Convert(Encoding.UTF8, Encoding.GetEncoding("iso-8859-1"), byText)
mp3.Tag.Lyrics = Testo
Here[^] is the proper forum for your question. You could also ask in "Quick Answers" which is on the banner at the top. You're more likely to get positive responses in one of those two As Tim said, this forum is for casual conversation not questions.