|
how to create datalinklibraries in vb.net
|
|
|
|
|
That depends on what your definition of a "datalinklibrary" is? I assume your talking about a Data Layer for a n-tier application?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
how to create delegates in vb.net
|
|
|
|
|
If you're incapable of finding the answer to this question online, or in your books, then you really have no excuse to be using a computer. If you haven't bothered to look, then you need to realise these forums are a resource best used by people who are capable of doing some research. If you can't type 'VB.NET delegate' into google, what are the odds you can even understand any explanation I may offer you ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Sir,
I want to learn NTFS file Extentions I mean how to make programs and before that what are NTFS File Extentions .
Can u please help.
Thanks
|
|
|
|
|
A file extension is just the last part of the filename. Or are you asking about NTFS File SYSTEM extensions??
This is not something VB.NET and C# are suitable to write something in. You won't find any examples unless you write them in VC++.
You have to have at least a passing kowledge of NTFS internals just to get started. I suggest reading this[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Can anyone point me in the right direction to adding a checkbox to the ListView results that are generated using ExpTreeLib, what I would like to do is have the directory listing appear in the listview control and have a checkbox next to each entry that will add the path to an array if the checkbox is checked and remove it if it is unchecked.
Any ideas?
|
|
|
|
|
U can use foreach loop to loop over all the items of Grid Control and can find the Checked Items in the list. Or other way to of doing this is use Tree view control.
Regards,
Amit Kumar
HDISM, PGDCA, MCP, MCAD, MCSD
amit_chikara2002@hotmail.com
|
|
|
|
|
Is there a VB.NET equivalent syntax to this C# code?
public class FooBase
{
public FooBase ()
{
}
}
public class Foo : FooBase
{
public Foo () : base ()
{
}
}
Edit: So there's MyBase.New(), but is that it?
|
|
|
|
|
Public Class FooBase
Public Sub New()
' do something
End Sub
End Class
Public Class Foo
Inherits FooBase
Public Sub New()
' Call the base class constructor...
MyBase.New()
' do something
End Sub
End Class
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I was hoping there was something like the Constructor() : base () syntax, but I guess MyBase.New() will have to do.
Thanks for the response.
|
|
|
|
|
Hi All,
I wrote a program in vb.net and it runs perfectly on my local machine but not on network drives. The following is the error message I got when I run on network drive:
"Request for the permission of type 'System.Data.Odbc.Odbc:Permission, System.Data, Version=2.0, Culture=neutral,PublicKeyToken=b77a5c561934e089' failed"
After I make some research I found following link:
http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx[^]
Based on info at about link, I
1) run sn.exe in command prompt like : sn -k "r:\myprog\debug\mykey.snk"
2) opened AssemblyInfo.vb and added : <assembly: assemblykeyfile("r:\apps\tools\roscoe="" 4.0\subs\roscoekey.snk")="">
3) run progam and I got another error message saying "Unable to emit assembly: Referenced assembly 'MyLib' does not have a strong name"
MyLib is C-Sharp class library.
4) So i added AssemblyKeyFile: in AssemblyInfo.cs
5) when i run program I got other error messages saying
- "Assembly generation failed -- Referenced assembly 'Interop.Word' does not have a strong name"
- "Assembly generation failed -- Referenced assembly 'Interop.Excel' does not have a strong name"
- etc......
What do I need to do inorder to run my program on network drives like I could run on my local drives.
Thank You.
|
|
|
|
|
A network, any network, is not a trusted source for executable code. I suggest you read up on Code Access Security[^]. And, what's new[^] for CAS in the .NET Framework 2.0.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I would like to build a datagrid from a directory of text files. How do I get the files from the directory into the datagrid?
Thank you,
Silver-grey
silver-gray
|
|
|
|
|
Why would you want to use such a heavy-weight control to display a list of filenames?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Because that is the User Specs. If you don't know a way to get the files in the directory and write them to another file name, Please don't comment. I thought that this was to help!! with the question:
silver-gray
|
|
|
|
|
Silver-Grey wrote: If you don't know a way to get the files in the directory and write them to another file name, Please don't comment.
OK, smart-ass...I just thought I would find out why the heavy wieght control needs to be used before I put the effort into commenting. Normally, a ListView is used for showing a list of filenames. Using a DataGrid for this is pretty odd, customer spec or no. I thought, "maybe this guy is a noobie and doesn't know any better. Let's find out first..."
Well, here's one way to do it...
Dim files As String() = Directory.GetFiles(directoryPath)
DataGridView1.Columns.Add( New DataGridViewTextBoxColumn() )
For Each f As String in files
Dim fa As String() = {f}
DataGridView1.Rows.Add(fa)
Next
This is probably not the best way to do it, but hey. I work out the specs with the customer and don't let them make the mistake of dictating them to me. You're supposed to work with the customer to come up with a proper solution, not for the customer.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I don't have a datagridview in tool box. Using 2003 Visual Studio
silver-gray
|
|
|
|
|
Great! More stuff I'm supposed to know without you explaining...
Let's see, my old .NET 1.x DataGrid is a bit rusty, but...
Dim files As String() = Directory.GetFiles(directoryPath)
Dim fa As New ArrayList()
fa.AddRange(files)
DataGrid1.DataSource = fa
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
That didn't work. I guess I will have to use a listbox. I can get data inti it. Now trying to select data out of it and write a new file with a different name.
Silver-grey
silver-gray
|
|
|
|
|
Could somebody tell me how to convert a string (0 to 255 range) to a byte array?
William
|
|
|
|
|
Use the encoding of your choise and the GetBytes method:
messageArray = Encoding.ASCII.GetBytes("Hello world")
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Thank you very much for help. Your code just works for ASCII characters. What about the characters in the range from 0 to 255??
Thank you again,
William
William
|
|
|
|
|
That's why I said that you should choose an encoding. Use the encoding that was used to create the string.
---
b { font-weight: normal; }
|
|
|
|
|
Dim textConverter As New System.Text.UTF8Encoding
Dim bytes() As Byte = textConverter.GetBytes("Text to convert")
Alexei Rodriguez
|
|
|
|