|
You can use the VB.NET function as follows:
Dim sDate = My.Computer.Clock.LocalTime.Date
That will format the date exactly as you are trying to get.
|
|
|
|
|
Standard question #2:
What error message do you get?
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
im trying to open a exe with vb net but i got a problem, im using the process class and the exe aplication opens as a process but i cant see the aplication.... this is the code i use
Public p As New System.Diagnostics.Process
Public si As New System.Diagnostics.ProcessStartInfo
si.FileName = "calc.exe"
si.WorkingDirectory = "C:\"
si.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p.StartInfo = si
p.StartInfo.Arguments = ""
p.Start()
please help me
pd: sorry for my english...
Luis
|
|
|
|
|
The code looks right, but will NOT work in an ASP.NET page. VB.NET code runs server-side and will launch this calculator on the server, NOT the client side. The calculator will also NOT show on the servers desktop because it's being launched from a Service.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I used to be able to set DirectoryInfo to a path greater than 256 characters in VS2003 by using the GetShortPathName functuon but since I updated my code in VS2005 DirectoryInfo sees the path as the full length not the short path. It throws a PathTooLongException.
Does anyone know how I can get around this?
Example:
'ReallyLongPath is over 300 charactes long.
Dim ReallyLongPath as string = "D:\LongFolder\LogSubFolder\etc..."
Dim di As DirectoryInfo = New DirectoryInfo(GetShortPathName(ReallyLongPath))
|
|
|
|
|
That trick isn't going to work. One of the first things the constructor for the DirectoryInfo object does, in .NET 2.0, is convert the path you give it to a normalized form. That means converting it to it's Full Path specification. The limit on that returned (internally used) path is 260 characters.
No matter what, it's NEVER a good idea to use paths that long, for any reason. Not because of compatibility issues with the .NET Framework, but because of the same issues with other software, like BackupExec. Keep your paths under 260 characters if you want to avoid future problems.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I understand the reasons for keeping the paths to a decent lenth but I currently have a machine that has paths that go much deeper than 260 characters and the shortpath trick used to work fine with the drirectoryinfo object in .Net 1.x. Is there no way around this in .Net 2.0?
Thanks.
|
|
|
|
|
Nope. Like I said, the first thing the DirectoryInfo object does is normalize the path to its full length, so you can't use it for what you're doing.
You can try to use the the static methods (Directory class, not DirectoryInfo) and try to use the return path from GetShortPathName as the directory to search. But, I'm seeing code in there that looks like it might also normalize the path too, though it might not.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
Hi everybody,
I am creating a small website, in which i want to use windows media player's video file. I am providing a navigation button to go through the website. But i want to keep disable that button untill the video is finished. Once the video is completed then button shuold be enable.
If any one can help me for this problem, please do my favour.
Thank you.
Best Regards,
Ahmad Tasnim Siddiqui
Mail id: tasnim5@yahoo.com
Tasnim
|
|
|
|
|
You'll have to ask this in the ASP.NET or Web Development Forums. THis will require client-side JavaScript. You can't do it using VB.NET on the server-side.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave,
Thank you for your valuable suggession.
Take Care,
Regards,
Ahmad
|
|
|
|
|
hi,
i have added a button in windows datagrid. it works fine when i load the grid first time and click the button. but if i reload the datagrid again on some event and i click the button, its click handler is called twice.
if i again load the grid then the click handler is called thrice.
how can i correct this ?
i want to call the button's click handler only once like in normal application.
Regards,
Kapil Thakur
(Where's there is Kapil , there is a way) - thakur.kapil@gmail.com
|
|
|
|
|
Somewhere in your code you used AddHandler to wire up the Click events of the button. Before you reload the data into the grid, use RemoveHandler to unwire those buttons before you destroy them.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
or you can use module level boolean variable to check wether the button is already clicked
|
|
|
|
|
I am using visual studio .net 2002.
I have created windows application using vb.net.Created one form and
I am opening one crystal report using that form.I have used CrystalReportViewer.
When I was design application, it was asking for Crystal report Registration.
I was allways cancelling this and was able to work on application/crystal report.
Note : I don't have internet connection.
One day I have entered following ,in the registration window.
Registration number : 8013180283
Key code : A5S50-81C0000-5X00027.
when I wanted to run that an error occured.
An unhandled exception of type
'CrystalDecisions.CrystalReports.Engine.OutOfLicenceException' occured
in CrystalDecisions.CrystalReports.engine.dll
version : 9.1.3300.0
Next day when I opened the application,it doesn't opened and there is continous
error "invalid KeyCode"
pls help me out ,what may be the reason.
s.Radhakrishna
|
|
|
|
|
|
hi ..
can anyone give me msgrNL32.dll or msgr3NL.dll..its the one used to check spelling in word for dutch language..
thanx in advance..
|
|
|
|
|
BINO VARGHESE wrote: hi ..
can anyone give me msgrNL32.dll or msgr3NL.dll..its the one used to check spelling in word for dutch language..
thanx in advance..
Clickety[^]
|
|
|
|
|
thank you very much
|
|
|
|
|
the DLL in that website is corrupted my dear friend...so can u plz send me someother link..
awaiting reply..
|
|
|
|
|
BINO VARGHESE wrote: the DLL in that website is corrupted my dear friend...so can u plz send me someother link..
awaiting reply..
Well, I just googled for the file name and found some sites...
|
|
|
|
|
can u send me if u get any free sites for the DDL...me too searched but itz all paid sites
|
|
|
|
|
|
thanx dude vl try using it....
|
|
|
|