|
i am trying to get the number of files returned when you use the getfiles function so i dont have to run through them first. the getlegth part accepts a parameter called dimension which is a zero based array but i dont know what to give it any help would be much appreciated
|
|
|
|
|
System.IO.DirectoryInfo.GetFiles() returns an array of FileInfo. You should be able to use the Length property of the array to find out how many there are.
GetLength() is for multi-dimensional arrays; you can specify 0 for the dimension to get the length of a single-dimension array.
--
Mike Dimmick
|
|
|
|
|
Hi, Can anyone tell me if it's possible to set the foreground and/or background colors of individual cells in the Window Forms DataGrid control ? Also, is it possible to allow the user to select more than one cell at a time ? If so, some example code (ideally VB.NET) would be brilliant
I have to create a 'booking calendar' type grid showing provisional and confirmed bookings in different colours and I'd like to allow the user to click & hold and move (drag) the mouse to book a week or a variable number of days.
Alternatively, does anyone know of a better suited grid control that could handle such a use ? Previously (in VB6) I Used the FlexGrid control for vaguely similar uses, but that control doesn't seem to exist in .NET.
Many thanks.
Iain.
|
|
|
|
|
you can still use a flexigrid in .net , just right click on your toolbox and click "Customise toolbox" , on the window that opens, choose "COMM" and then you will find the flexigrid control in that list, it will be added to your toolbox and you can then use it as before in vb6.
Vb:
<font color="blue">Public Function</font> TwinsOnWay(<font color="blue">ByVal</font> twins <font color="blue">As String</font>) <font color="blue">As String <br> Select Case</font> twins<br> <font color="blue">Case</font> "Gender" <br> <font color="blue">Return</font> "Two Girls" <br> <font color="blue">End Select <br> End Function</font> <br>
|
|
|
|
|
I have a project in VB6, an accounting package, that is so far working perfectly. The only problem now is deployment
In a nutshell: at the moment I'm using NSIS[^], which (I thought) was working fine for me. The only problem is that when the program is installed on a machine that doesn't have VS installed, it refuses to work. The reason for this is that it's missing runtimes. I've tried packaging the VBRun60sp4.exe[^] file, but that also doesn't seem to help. As a last resort I've tried using the P&D Wizard, which auto-updates system files, but all it does is updates the files, asks for a reboot, when rebooted I try it again, and the same thing happens: it 'installs' system files and asks for a reboot again
Please help
Paul
Live in such a way that you would not be ashamed to sell your parrot to the town gossip. - Will Rogers
modified 18-Jul-18 11:59am.
|
|
|
|
|
Solved.
Paul
Live in such a way that you would not be ashamed to sell your parrot to the town gossip. - Will Rogers
modified 18-Jul-18 11:59am.
|
|
|
|
|
how do i read xml files using adodb
is there any odbc-driver available
can someone direct me to some samples
thanx
rIsHaBH
|
|
|
|
|
rs.Open "FilePath",con,,,adCmdFile
where:
rs:the name of the recordset object
con:active connection
|
|
|
|
|
Hi,
I have a very "simple" problem, but i dont know how to sove it. I want to show a contextmenu, where one menu item is a textbox (ex. Right click on a cell of a open access table in access).
Can anyone help me?
almigrp (Misel)
|
|
|
|
|
Hello,
how can I create a VB.NET project who add features (as add-in for example) to Excel ?
Best Regards
Alfredo DS
Alfredo DS
|
|
|
|
|
For Office 10 use the Office Primary Interop Assemblies provided by Microsoft.
|
|
|
|
|
I am trying to call a VB dll from ASP.net code behind. This is fine.
Then, this DLL calls a function of VB ActiveX exe. This is where application breaks. It says some "Security Exception" issue.
Have any one faced this issue? Please suggest what should be done to resolve this. Thanks
~~~~Pankaj~~~~
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
dear all,
seems i'm stuck.......i want to sort a string array of file names (full paths with extension) based on file extension
any ideas what i gotta do?
thanx and regards
rIsHaBH
|
|
|
|
|
Just an idea, but not necesserily the solution: what about sorting based on
Right(strString(i), 3)
Paul
Live in such a way that you would not be ashamed to sell your parrot to the town gossip. - Will Rogers
modified 18-Jul-18 11:59am.
|
|
|
|
|
Hello!
I'm trying to find a way to create several instances of a module class that represents for example a shape, then setting a variable to that module class i could change its properties and so on..
Is this possible in Vb6?
Thank you in advance
|
|
|
|
|
I could be wrong but I thought that a module was like a class where all the members and properties were shared. If this is correct then any instances would have the same properties, change the value of one and the property changes in them all.
I think you should just use a normal Class and create multiple instances. This way the properties and members are not shared by instances.
Hope this helps.
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
LearnVisualStudio.Net
|
|
|
|
|
how to get sounds effects to my programin VB6
example : when i press a button a song plays and so on
BUT without running its program(winamp,windows media player,...etc)
please reply to me
ahmed
|
|
|
|
|
Try the sndPlaySound()[^] API.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
i can't seem to find this on the web. How do you not only connect to a sql database with vb.net but i need to know how to execute sql statements. Some return values other do not(like a select and a delete for instance)
|
|
|
|
|
|
I am trying to build a web service that downloads a file to my local directory.
I have the basics here but I just cannot get it to work, anybody know of any examples on this. Here is my code so far.
<br />
Dim l_oWR As WebRequest<br />
Dim l_oWebResp As WebResponse<br />
Dim l_oBR As BinaryReader<br />
Dim l_oBW As BinaryWriter<br />
Dim l_oStream As Stream<br />
Dim bFile() As Byte<br />
Dim l_iCnt As Long<br />
Dim l_dtNow As DateTime = DateTime.Now<br />
Dim l_sDir As String = l_dtNow.ToString("MMddyyyy")<br />
Dim l_oDir As Directory<br />
Dim l_sFile As String<br />
Dim l_sCnnStr As String<br />
<br />
Try<br />
<br />
'download file<br />
l_oWR = HttpWebRequest.Create("http://www.abc.com/abc.exe")<br />
l_oWebResp = l_oWR.GetResponse()<br />
l_oBR = New BinaryReader(l_oWebResp.GetResponseStream(), Encoding.ASCII)<br />
l_iCnt = l_oWebResp.ContentLength<br />
bFile = l_oBR.ReadBytes(CType(l_iCnt, Integer))<br />
If Not System.IO.Directory.Exists("C:\ofac") Then<br />
System.IO.Directory.CreateDirectory("C:\ofac")<br />
End If<br />
l_oStream = New FileStream("C:\ofac\t11sdall.exe", FileMode.Create, FileAccess.Write)<br />
l_oBW = New BinaryWriter(l_oStream)<br />
l_oBW.Write(bFile)<br />
Thanks for any help here!
Jordan
|
|
|
|
|
i have a problem in the moment execut my program after installing my setup, say Registered JIT Debugger is not Available,Cordbg,exe, i use crystal report in my porgram, when I don't use, works well, any personsa that I can help.
Tanks
|
|
|
|
|
Hi
Anyone used the DataGridEx control (Article here)? I've formatted a column with a style, and the print facility ignores the style.
Any advice? Thanks
Bernhard
Don't worry, nobody lives forever.
|
|
|
|
|
In my program I want the user to write in a TextBox. Then I want to check if the input contains only a numerical value. How can I do this?
//OT
|
|
|
|
|
If you want to convert a string to an int use Int32.Parse(mystring). If you want to validate input (requiring numeric values only, for instance) use regular expressions.
|
|
|
|