|
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
----
|
|
|
|
|
:-OHi - I have installed Visual Studio.net 2003 and it is working well with a few irratating exceptions that I cant solve - the books asume this knowledge so I I'm stuck.
First problem - in debug mode hovering the curser over a varable name in older versions gave the VALUE of the varable, in my setup I get a definition of the varable which is of no interest to me - how do I change the setup to get actual runtime values?
Second - There is no Draw toolbox - I have all the controls etc but I cant draw a line or a circle etc on a form - where is this hiding (its not in the available tools from the add dropdown).
H e l p! (please )
VB.net newbe
|
|
|
|
|
yorickthefirst wrote: First problem - in debug mode hovering the curser over a varable name in older versions gave the VALUE of the varable, in my setup I get a definition of the varable which is of no interest to me - how do I change the setup to get actual runtime values?
You don't change anything. You're getting the definition because the code either was not stopped (hit the pause button next to the run button), or your code was stopped and your trying to get the value of a variable that is no in scope. You code was stopped in one method (Sub or Function) and you're looking at a variable in another method.
yorickthefirst wrote: Second - There is no Draw toolbox - I have all the controls etc but I cant draw a line or a circle etc on a form - where is this hiding (its not in the available tools from the add dropdown).
It's not hiding anywhere. There are no such tools. You're expected to either draw these things yourself in code or use a PictureBox or some other control to load an image file.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Do you know how to get path to the CD drive? If there are two CD drives, and you have inserted a CD to a drive, how do you get path to that correct drive
Thank You,
Chatura
|
|
|
|
|
I also want to know the answer.
I know the follow code.
System.Environment.GetLogicalDrives()
Useing this code I'll get the all drives letters. But It does not provide which is CD drive and which is hard drive.
If you found the solution. Share me your solution.
Have a nice day.
!alien!
|
|
|
|
|
Thanks for your reply. When I was surfing the internet, I found some interesting tips.
Although they were in VB6 format, I converted them into VB.Net format and combined them together.
This program has,
A label “lblCDDrives”
Tow buttons “btnClose” & “btnOpen”
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer<br />
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Integer<br />
<br />
Private Const DRIVE_CDROM As Short = 5<br />
Const ASC_A As Short = 65<br />
Const ASC_Z As Integer = ASC_A + 25<br />
<br />
' Return the CD-ROM drive letters.<br />
Private Function SearchCDDrives() As String<br />
Dim i As Short<br />
<br />
For i = ASC_A To ASC_Z<br />
If GetDriveType(Chr(i) & ":\") = DRIVE_CDROM Then<br />
SearchCDDrives = SearchCDDrives & " " & Chr(i)<br />
End If<br />
Next i<br />
End Function<br />
<br />
Private Sub btnClose_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles btnClose.Click<br />
'Close CD Door<br />
mciSendString("Set CDAudio Door Closed Wait", CStr(0), 0, 0)<br />
End Sub<br />
<br />
Private Sub btnOpen_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles btnOpen.Click<br />
'Open CD Door<br />
mciSendString("Set CDAudio Door Open Wait", CStr(0), 0, 0)<br />
End Sub<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
lblCDDrives.Text = "CD drives are: "<br />
lblCDDrives.Text = lblCDDrives.Text & SearchCDDrives()<br />
End Sub
chatura
|
|
|
|
|
Thank you for your reply. Your code is helpful to me.
Have a nice Day.
!alien!
|
|
|
|
|
Hellow to all
how can i put a field in a crystal report , that i can contorl the text in it , from the code of the forum ..
that i can access it , and change it to what ever i wanna to from the code itself ?
thxx
-- modified at 4:32 Thursday 16th February, 2006
|
|
|
|
|
Hi
I have a form with 7 Datagrids. I populate DataTables from a database. I create a Dataview of the tables, and apply various filters based on user selections. I then use the DataVeiw as the Datagrid DataSource. I have also used Tablestyles to give the Datagrid Columns 'Readable' columnnames, and have adjusted the width of certain columns and set the columnwidth to 0 on some columns in order to hide them. This all works great.
Now I want to add the option to Export what displayed by the datgrids to Excel.
This is easy with a Datatable, since I can use the Column Names as headings, and then use a loop
For Each Col as Datacoumn in dtMyTable.Columns<br />
<br />
For each Row as datarow in dtMyTable.Rows<br />
cells(Row,Col) = ...<br />
Next 'Row<br />
<br />
Next 'Col
I'm battling to get the datagrid back into a table format - and cannot Ctype(Datagrid, DataTable) directly.
Any ideas how I can do this. (I'd like to be able to use the column headings and column widths of the datagrid to format the Excel sheet)
Thanx
Richard
|
|
|
|