|
yes you have to define an array. and you will get the file name as parameter. and the first one is by default the path of the running Exe ( shortcut you created) so if the length of array is more then one then it means the application has some input. put this code in the load of startup form of your exe project.
Dim strArray() As String
strArray = System.Environment.GetCommandLineArgs
If strArray.Length > 1 Then
Dim count As Integer
For count = 1 To strArray.Length - 1
msgbox strArray(count)
Next
End If
this will prompt you one or more files/folder path selected.
|
|
|
|
|
hi ,
Any one please tell me
How to populate combobox form database using
1)datareader and 2)dataset,
I'm using mysql database.
|
|
|
|
|
Anyone have an Idea on how to program VB6 to have a Visualisation of the sound
like the one in Winaamp ( Those little green bar that move up and down according to the frequency of the sound) I'd like to build one that have a lower frequency than Winamp cause it start a 1000Hz and each bar have 1000 hz)
Thanks a lot to all.
Men1999
|
|
|
|
|
This is done using a FFT (Fast Fourier Transform) algorithm. Warning! This is a VERY CPU intensive operation. The more bars you want, the more CPU horsepower you're going to need to calculate the spectrum.
The web is full of examples. Just Google for "vb6 FFT". You can probably get some good ideas out of this[^] sample on PlanetSourceCode.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am pretty new at this, so how would I link the SQL Connection with the Datagrid so that when I want to search for say, a part number, it will bring back all the parts with that number?
|
|
|
|
|
This would normally be done in your SQL statement, something like
SELECT field list FROM table WHERE PartID = @PartID
You'd have to pass the ID that your looking for to the SQL stored procedure using a parameterized query. You can read up more on this and why it's a good idea in Colin Mackay's article, SQL Injection Attacks and Some Tips on How to Prevent Them[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am trying to get the LDAP root from a domain..
LDAP://DC=Company,DC=Com,DC=au
Found many apps that let me browse a LDAP structure but i want the root DC from the domain.
Can get the domain and was going to load into array and pull out each value building a string but this is not really the best and I hope someone has a better solution using the directory service .dll.
Dim mydomain as string()
'Get domain fill mydomain
'Loop through mydomain
Dim LDAPString as string
LDAPString = "LDAP://DC=" & Array1 & ",DC=" & Array2 & ",DC=" & Array3
Hope this makes sense.....
When people make you see red, be thankful you're not colour blind.'Get
|
|
|
|
|
'// I don't have AD Running here at the moment
'// to test this, but it should be
'// something like this:
Imports System.Runtime.InteropServices
Public Shared Sub dsRootPath()
Dim dsbi As New LibWrap.DSBrowseInfo
Dim return As Integer = LibWrap.DsBrowseForContainerW(dsbi)
' see DSBrowseInfo structure
Debug.WriteLine("Root Path: " & dsbi.rootPath)
End Sub
Public Class LibWrap
' Declares a managed prototype for the unmanaged function.
Public Shared DSBI_ENTIREDIRECTORY As Integer = &H90000
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _
Public Structure DSBrowseInfo
Public structSize As Integer
Public dlgOwner As IntPtr
Public dlgCaption As String
Public treeViewTitle As String
Public rootPath As String
Public path As String
Public pathSize As Integer
Public flags As Integer
Public callback As IntPtr
Public lParam As IntPtr
Public returnFormat As Integer
Public userName As String
Public password As String
Public objectClass As String
Public objectClassSize As Integer
End Structure
Declare Unicode Function DsBrowseForContainerW Lib "dsuiext.dll" ( _
ByRef info As DSBrowseInfo) As Integer
End Class 'LibWrap
Hope that helps
|
|
|
|
|
Thanks for this but I have some questions...
Created a new project and added a class where I placed your class code.
I put this code in the main form and called it on load. I had to change return to my return as it was not a valid identifier.
Public Shared Sub dsRootPath()
Dim dsbi As New LibWrap.DSBrowseInfo
Dim return As Integer = LibWrap.DsBrowseForContainerW(dsbi)
' see DSBrowseInfo structure
Debug.WriteLine("Root Path: " & dsbi.rootPath)
End Sub
In the class code the
<structlayout(layoutkind.sequential, charset:="CharSet.Unicode)"> _
Public Structure DSBrowseInfo
tells me the
|
|
|
|
|
Japel,
You'll need to add the line:
Imports System.Runtime.InteropServices
To the top of the class file also.
Hope this helps
|
|
|
|
|
I am trying to make an application that uses an array of dates. I used the following line to declare the array:
Dim List() As Date
However, when I add the dates to the array, time is also included e.g. 09/06/2005 12:00:00 AM
I need only the date part(i.e. 09/06/2005) to be added into the array, NOT TOGETHER with the time(i.e.09/06/2005 12:00:00 AM) .Someone please help me with a code example of how this can be achieved.
Thanks in Advance!
-- modified at 8:56 Monday 17th October, 2005
|
|
|
|
|
You can't really. The DateTime is a serial number that counts the number of ticks (100-nanosecond interval) from Midnight, Jan 1, 0001 to whatever the DateTime structure represents. What your seeing is the full string representation of that number. The number itself (see the Ticks property[^]) doesn't have seperate date and time components.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I should have added to my previous post that there are various methods to convert the DateTime structure to any format of Date and/OR Time. Checkout the .ToShortDateString() method of your DateTime object.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have tried that .ToShortDateString() method in the code below:
List(Index) = CDate(InputBox("Enter Date:")).ToShortDateString
lstDisplay.Items.Add(List(Index))
When I displayed the list(index) in a list box, it comes out as :e.g. 5/2/2005 12:00:00 AM.
NB/ The List array is declared as a date type variable.
I really need to omit the time part, however I am glad for at least getting a reply. I am still looking forward for a reply.
P.S. I can send the source code and a short description of what I am trying to achieve to anyone who needs a closer look at my problem.
Thanks in advance.
|
|
|
|
|
Instead of waiting, just play with the oject. Look at the documentation on MSDN, especially the formatting strings for the .ToString() method.
You might want to try something like this:
Dim myDateString As String = myDateObject.ToString("mm/dd/yyyy")
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
is there a simpler object than the windows.forms.label that supports OnResize, OnPaint and Region?
I need to work with about 5000 instance of a class, i'm currently using label and its pretty - sloWW.
ThankS!
Marvin N. Guerrero
- Taje Kage_bunshinNunJutsU
|
|
|
|
|
No, that's pretty much as simple as it gets. You could always just write your own control from scratch though. But, when you have that many controls on a form it's just going to be slow, period. Try, resizing the form with that many controls.
You might want to rethink your interface...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thanks.
I'm using the labels to draw vectors over a map. I used to to overlay building footprints on a jpeg within a picturebox. I used labels instead of drawing polygons (graphics.drawing) because i need to interact with the footprints - they must be clickable.
I guess i have to turn to some primitive datatype's because .net's Integers are too heavy.
Anyboy know how to use DirectX 9sdk? for vb.net.
thanks again.
Marvin N. Guerrero
- Taje Kage_bunshinNunJutsU
|
|
|
|
|
Guerven wrote: I guess i have to turn to some primitive datatype's because .net's Integers are too heavy.
WHAT?? .NET Integer's are 32-bit (processor width), just like any other integer. What are you talking about?????????????????????????
Guerven wrote: I'm using the labels to draw vectors over a map.
Not a good idea. You'd be much better off tracking the points you need to draw in something, like an array of objects, then drawing them with the Graphics primitives. These objects can be controls of their own, inherit from Control or UserControl. You can still make them "interactable" if you supply the OnClick code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how to use paramarray in vb.net. Pls tell me good site for vb.net only
himanshu
|
|
|
|
|
It's usually used to pass an array of parameters to a Sub or Function. It's useful when you're method doesn't know the number of parameters will vary from call to call. You can find more information here[^] on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
what is paramArray.how to use in vb.net.pls give me good site to find everything (vb.net only)
himanshu
|
|
|
|
|
Hello Friends,
I am currently developing one application using VB.NET & Access + Oracle as a databases, and I want to install it on client machine. Since, we can not say for sure, whether .NET Framework is already installed on clients machine. I don't want my client to install it manually/separately, instead the framework (if required) should get installed automatically. I want to make setup of my application in such a way that it will determine immidiately that .NET Framework should be installed before proceding to its own installation. (and obviously it shoud install it... )
Can anyone please suggest me how i should go about it???
Thannks in advance....
|
|
|
|
|
|
Hey Kalyan,
Thanks a lot.....
You have helped me exactly when I wanted....
Thanx once again....
Regards,
Rohan...
|
|
|
|