|
I don't think you can see them using public methods. At least I've never found anything in the VisualBasic classes that exposes it.
But, using Reflection, you might be able look inside the Microsoft.VisualBasic.VBCodeGenerator class, which is a Friend class in the Microsoft.VisualBasic namespace, and see the Private Shared ReadOnly member field keywords . This is an array of String arrays, but is not filled in until an instance of the VBCodeGenerator class is instantiated.
I'm short on time right now, so I can't build an example, but I've given you some hints of what to search for.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello again..
Need help if there is another way on how to display the day of the week using a variable that has a datatype of intger...
this is how i get the integer value...
intmonth = cdDateTime.picker.value.year
intday = cdDateTimePicker.value.year
intYear = cdDateTimePicker.Value.Year
and i have to use the integer value to get the day of the week...
cddate = Cdate( cstr(intmonth) + cstr(intday) + cstr(intyear).DayofWeek).ToString
this produce an error....nid healp ... thank you:->
|
|
|
|
|
Here is the simple way.
Dim objDate as Date
objDate=New Date(intYear,intMonth,intDay)
Messagebox.Show(objDate.DayOfWeek.ToString)
!alien!
|
|
|
|
|
welbert wrote: how to display the day of the week using a variable that has a datatype of intger
Dim DayOfTheWeek As Integer
DayOfTheWeek = Now.DayOfWeek
Or
you want to get it from the DateTimePicker
Dim DayOfTheWeek As Integer
DayOfTheWeek = cdDateTimePicker.Value.DayOfWeek
chatura
|
|
|
|
|
Hi everyone ,
How do I get the all sql server names using vb.net code? I would like to fill it into combobox. Thank in advance.
!alien!
|
|
|
|
|
hello everybody:
i am new to VB.net I have to design a custom web server control which validates itself on client side and server-side. which means that i would not use a seperate custom validator for validation, but it should be a part of the custom control itself.and this validation would be done on clientside first, and incase javascript is off in browser then validation is done on server side.
The description of the custom control is as follows:
its a date control which has 3 dropdowns(dds).one for month, second for days and third for days.it has two properties isDOB(boolean) and getDate which returns the date in the format mm/dd/yyyy.
one method setDate which takes the string inn the format mm/dd/yyyy.This will set date according to the input string.
can somebody point me to the rite direction.any help would be deeply appreciated.
Thanks
Cheers!
AB
Aamir Babar
|
|
|
|
|
Anyone using the free add-in for VB 2005? Very slick!
Kevin
|
|
|
|
|
Kevin McFarlane wrote: Anyone using the free add-in for VB 2005?
Can you provide a link?
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Can you can give us a quick opinion of what you like most and least about it?
I haven't tried it yet, so I'm very interested in hearing your opinion.
|
|
|
|
|
I've used and most of the time it works and has some nice features such as when you extract a method, you get to select where in your code you want it to to instead of the IDE deciding as C# does. The link for those who want it is http://msdn.microsoft.com/vbasic/downloads/tools/refactor/[^].
Warning though sometimes I rename a variable ( a private or protected one) and let the refactor happen and VS blows up or hangs.. forever. But it's not bad enough for me to uninstall so it's well worth the price - free. )
Al
|
|
|
|
|
Al Ortega wrote: Warning though sometimes I rename a variable ( a private or protected one) and let the refactor happen and VS blows up or hangs.. forever.
That's a bummer. The renaming variables part was the feature that I most wanted.
|
|
|
|
|
It doesn't happen all the time, it's strange. If I had it renaming public property that was used throughout a very large program, I would understand it taking a while, but on private/protected class level ones...?
I think they (DevExpress) give it away to entice you into purchasing their pro version.
Still the alternative is doing it by hand or if your brave (I'm not) Find and Replace. Does anyone know of any other free ones (serious question)?
|
|
|
|
|
Well, I've only played with it a bit, rather than used it in anger. But it's very "visual."
See this short video:
http://msdn.microsoft.com/VBasic/Downloads/Tools/Refactor/3MinDemo.Aspx[^]
Main reason I tried it is because I just started a contract in VB .NET (2003). My main language thus far has been C#, so I thought I'd better get a bit of VB practice before starting the contract, and thought I'd use the new IDE, even though the contract is 2003.
Kevin
|
|
|
|
|
Wow! Very cool video. Thanks for the link Kevin.
|
|
|
|
|
I wonder if anyone can point me in the correct direction. I am going to have to run a crystal report via VB.Net for the first time. Can anyone give me any ideas or good pointers or even any articles to view. Any help would be greatly appreciated.
|
|
|
|
|
http://www.vbdotnetheaven.com/UploadFile/sushmita_kumari/Report201242006041121AM/Report2.aspx?ArticleID=d6184a33-ee75-495d-9ef3-1fe3e9a24632
!alien!
|
|
|
|
|
|
Hi,
I am trying to move a bunch of Folders, subfolders and files in the sub folders to a different location on the server for maintainance purpose. And my code should check if the folder exists and if not it should create one.
here is my code
Imports System.IO
Dim OriginalImagesSource As String() = Directory.GetDirectories("C:\Inetpub\wwwroot\images\")
Dim SourceDirectory as string() = Directory.GetDirectories("C:\Images\")
For Each directory in Directory.Getdirectory
For each file in Director
... check if folder exists in SourceDirectory else create the folder
and move the files...
next
Next
But not sure how to proceed from this point.
could some one please help me here?
Thanks
-L
|
|
|
|
|
|
Hi!! Im trying to debug my Project and i need Net access. But I'm getting Net access via a Proxy Server which is on my LAN. How do i get VB.NET 2005 to use the Proxy Server which debugging the Project or also while Running a Project which needs Net Access. Plz someone Help. Thanx. Bye!!
Devraj Raut!!!
|
|
|
|
|
How do I reset the active directory to the directory where I started the program from without using relative or absolute paths? Is it possible? Thanks in advance
edit: The reason I need this is that I use openfiledialogs and savefiledialogs which changes the current directory, and I have stored help files relative to the program path.
----
Dim Sleepy as Boolean = True
If Me.Sleepy = True Then
Goto Sleep
End If
----
-- modified at 8:45 Thursday 16th February, 2006
|
|
|
|
|
There is a property on the Dialogbox which you can specify to restore the location to the original value.
- Malhar
|
|
|
|
|
Set...
myOpenFileDialog.RestoreDirectory = True<br />
mySaveFileDialog.RestoreDirectory = True
This will prevent the app's current directory from changing and allow these dialogs to still remember the last selected path.
DJLarZ wrote: The reason I need this is that I use openfiledialogs and savefiledialogs which changes the current directory, and I have stored help files relative to the program path.
It sounds like you are accessing your help files via relative paths. If so, then I strongly recommend that you access them via absolute paths, which can be built based on Application.StartupPath.
The reason is if someone makes a shortcut to your app but forgets to set the working directory to the app's path, this will break all of the relative paths to your files.
|
|
|
|
|
DJLarZ wrote: The reason I need this is that I use openfiledialogs and savefiledialogs which changes the current directory, and I have stored help files relative to the program path.
You should not be worrying about what the current directory is. You should be using absolute paths ALWAYS when dealing with files. You can always get the applications directory by using:
Dim appDirectory As String = Application.StartupPath
You can make a fully qualified path name by using something like this:
Imports System.Io
.
.
.
Dim myHelpFilePath As String = Path.Combine(Application.StartupPath, "myHelpFile.hlp")
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you very much, all of you, it solved my problem.
----
Dim Sleepy as Boolean = True
If Me.Sleepy = True Then
Goto Sleep
End If
----
|
|
|
|