|
|
i have tried this. but always showing invalid.
what change i am supposed to do for making the system date format to dd-mmm-yyyy
Dim reg As RegistryKey
reg = Registry.Users.OpenSubKey("S-1-5-21-1757981266-861567501-682003330-500\Control Panel\International", True)
If Convert.ToString(reg).Trim = String.Empty Then
MsgBox("Invalid")
Else
reg.SetValue("sShortDate", "dd/MM/yyyy")
reg.SetValue("sLongDate", "dd/MM/yyyy")
End If
|
|
|
|
|
|
I'd try Registry.CurrentUser.OpenSubKey("Control Panel\International", True)
|
|
|
|
|
Just Replace this line:
reg = Registry.Users.OpenSubKey("S-1-5-21-1757981266-861567501-682003330-500\Control Panel\International", True) TO
reg = Registry.CurrentUser.OpenSubKey("Control Panel\International", True)
"S-1-5-21-1757981266-861567501-682003330-500" is not a valid reg key.
|
|
|
|
|
How does repeating the same information given by an earlier response help anyone?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Quick background: I'm a former C++/STL/MFC programmer, now working as a veterinary practice manager. My 10+ daily hours of hardcore programming have been replaced by a once-a-month opportunity to debug an Excel macro, or write some VBScript.
Anyway - we are using Windows Terminal Services in the clinic. We'd like to be able to send a message to our reception terminals when someone is ready to go home. We've been using Net Send, but security issues asides, the message often goes to the wrong person.
Msg.exe seems to work better, however rather than sending the message to a person (specific user account), I'd like it to go to specific terminals (which could be in use by anyone.) Msg allows me to send to a session by name or ID - but how to determine the session info for a specific terminal? I have been looking at WMI but cannot find any class or set of classes that ties all this together.
Thx
Jim Johnson
Practice Manager
Animal Health Associates
http://www.animalhealthassociates.org
modified on Friday, December 31, 2010 8:14 PM
|
|
|
|
|
I cannot help you with your problem but I will offer a word of advice.
It is a very bad idea to post an Email address on a public forum like this one. I know that it might be good advertising but don't be surprised if your spam count goes up dramatically.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
ouch. of course. Thx for the reminder.
|
|
|
|
|
How about writing a program that always runs in the background (or as a service) that waits for a connection and then displays messages that were sent to it?
See if you can crack this: fb29a481781fe9b3fb8de57cda45fbef
The unofficial awesome history of Code Project's Bob!
"People demand freedom of speech to make up for the freedom of thought which they avoid."
|
|
|
|
|
No, I'm looking for the simple solution. All I need is a bit of code to determine session name or ID given some way to identify the terminal - either the tcp/ip addy or the terminal name.
|
|
|
|
|
Your problem seemed interesting to me so I did a bit of research and came across a product called "WinSent".
This product is not free, but seems fairly priced.
Check it out ...
http://www.winsentmessenger.com/[^]
|
|
|
|
|
Thx, but I need to roll this one myself. The staff needs a simple function that they can tie to a single keystroke, enter a short message ("Fluffy RTG") and then get back to work. All the shareware solutions I have tried either don't work correctly (Fomine), or are overfeatured.
|
|
|
|
|
Salam Dears
This is Fida, I have Recently Joined in. I Have a Problem and confusion In how to write MySQl Queries in Vb.NET For My Data Base.
and Also How Can I got a Connection to My Database Through Code.
Thnks
|
|
|
|
|
|
He's probably playing with us.
|
|
|
|
|
Fida_Bhittani wrote: MySQl Queries in Vb.NET For My Data Base.
There is no difference in terms of writing queries - you need to know the difference between the database you were already using and mySql but writing queries in terms of VB.Net remains fairly the same.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
Walaiku-mussalam.
Before you execute any query, u have to connect with that database from VB.NET. u can use ODBC, OLEDB or anything depending upon your database server. After that u can execute any query that is supported by database server. Any farther Question please mention your database server name.
|
|
|
|
|
Aslam_Iqbal wrote: Any farther Question please mention your database server name.
The OP has already mentioned that it is a MySQL database. Do pay attention.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hello,
I’m new to this so my apologies up front for either too much information – or not enough.
I’ve been creating a VB program, with 2010 Express, that reads positional information from an accelerometer and plots the data with Zedgraphs – wonderful stuff.
I’ve added audio playback with 5 different .wav files so you can hear the movement, rather than just look at the graph. It works great most of the time but pretty consistently crashes the program when I cycle thru the .wav files too quickly (multiple times per second). I’ve added them as a resource to the build which seemed to help some – but still not good enough.
I’m now thinking it’s because the program is reading the .wav files from disk and I now need to have them in system memory for quicker access…
Am I thinking about this the right way? If I’m not, any direction would be appreciated. If I am, then is DirectX the best path or is there some other way?
Thank you in advance.
|
|
|
|
|
JKenny76 wrote: Am I thinking about this the right way?
No, you're not. If you added the sounds as resources, they're already in memory.
Without knowing what your code looks like that is playing these sounds, it's very difficult to tell you what's wrong.
I can take an educated guess though. If you're switching sounds as fast as you say you are, you might have to look into using DirectSound to play your sounds.
There's lot's of examples on the web. All you have to do is Google for "VB.NET play sound DirectSound".
|
|
|
|
|
Dave,
You're a gentleman and I thank you for your advise. When you said that the resource was already in memory it started me thinking - sometimes a painful event...
Anyway, all of my testing was in the debugging mode. Once I compiled the program everything worked as expected and there was no crashing!
I thank you for your time and patience.
Joe
|
|
|
|
|
- I have an application that is developed using VBA for automating excel spreadsheets to create and accounting system. Is it advisable to migrate the code to VB.NET going foward, e.g. for consideration of continuity will VBA continue to be as is, backward compatible or is vb.net going to be language of choice with applications?
|
|
|
|
|
Microsoft has announced no plans to replace VBA with VB.NET. So, for at least the next version of Office, VBA is still going to be what's built into it.
|
|
|
|
|
VBA will continue to work. Corporations won't upgrade Excel if Microsoft killed VBA since so many macros have been written.
Upgrading Visual Basic (not VBA for Excel) to VB .NET is a nuisance. If you had to port a significant amount of code, you also could consider C#.
I personally prefer to use Excel C API as much as possible, and a minimal amount of VBA.
|
|
|
|