|
david bagaturia wrote: I need to get current itemIndex from DataRow.
From the DataTable you have a collection of Rows (DataRowCollection [^]) which has an IndexOf [^] method. Pass the relevant DataRow in to the IndexOf method to get the result you want.
|
|
|
|
|
It help me thanks, but I need some littel Example to see how it works.
Can you write or tell ware I get littel code to find how it work.
Tanks again for you reply.
|
|
|
|
|
david bagaturia wrote: I need some littel Example to see how it works.
Dim theIndex as Integer
theIndex = myDataTable.Rows.IndexOf(someRow)
|
|
|
|
|
GIven the text file path.
on find button click it should prompt to find what in the text file ,and then a replace option to replace this foundd item with specified replace string in the text file
thanks
|
|
|
|
|
|
i need to more data by using Crystal Reports.
so that i changed
portrait to landscape in my class.
(objReport.PrintOptions.PaperOrientation = CrystalDecisions.[Shared].PaperOrientation.portrait
to
objReport.PrintOptions.PaperOrientation = CrystalDecisions.[Shared].PaperOrientation.landscape)
now i am getting larger screen.
SUB: My doubt is how to increase width( direct view ) of reprot in report project.
|
|
|
|
|
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef hpDest As any, ByVal hpSource As any, ByVal nBytes As integer)
I am converted the vb code into vb.net in this the copy memory function does not work it seems.
I am calling the function in the form
Call CopyMemory(arrBarCodeInformation(0), ptrBarCodeInfo, size_Renamed)
but is showing some error .How to use the copy memory in vb,net here arrBarCodeInformation(0) is an structure value.slove the above problem and also give me the code for the same.
pls help me to slove the problem..
|
|
|
|
|
|
I have tryied but i need to copy the integer value into the structure variable .how can i do that.pls give me the code .its very difficult for me to convert.pls help me its very urgent....
|
|
|
|
|
I love how many people post 'it's very urgent' but don't give anything resembling the info that people need to help.
sundar_mca wrote: i need to copy the integer value into the structure variable
Assuming that you have a block of memory that represents the struct, you can presumably use marshalling to copy the block of memory across. Or, you can cast that memory location to BE the struct, and copy them manually.
sundar_mca wrote: .pls give me the code
That you would even ask this, based on the info you've provided ( nearly none ), tells me that you're in over your head. Try posting the information that describes the problem, then perhaps we can help.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
sorry for sending such messages.i hav etryied the marshaling function muct i want to copy the integer value to structure how can i do it using marshal function
|
|
|
|
|
If all you're doing is marshalling a structure back and forth to unmanaged code, you DO NOT NEED the CopyMemory function. Post more of this code that your trying to translate so we can help. If you don't, there's nothing we can do to help!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Why does the Return statement of a VB function return a 0 or -1 when we assign a value to the variable being returned?
For eg:
Module Module1
Sub Main()
Dim i As Integer = 3
i = square(i)
Console.WriteLine(i)
Console.Read()
End Sub
Private Function square(ByVal i As Integer) As Integer
i = 6
Return i = 6
End Function
End Module
O/P: -1
|
|
|
|
|
You are not assigning a value to i. Rather you are comparing if i = 6 which is a boolean value that the system is converting to an int.
Turn option strict to on in the the application properties (compile tab) and you will get a compiler error telling you implicit conversion from Boolean to Integer is not allowed.
Mike Lasseter
|
|
|
|
|
You re right. Thankyou Lasseter
|
|
|
|
|
I'm trying to search my hard drive for all of my .mp3 files. If anyone could help me and guide me with some sample code i would greatly appreciate it. Thanks.
CALVIN Muller
|
|
|
|
|
You'll need a recursive function to traverse through all the directories. Actually getting mp3 files in the directory is easy.
IO.Directory.GetFiles("c:\songs", "*.mp3") This will return a string array of each mp3 file located DIRECTLY under the directory c:\songs. In other words it won't find files in any subdirectories. To do that you would create a method that takes a path as a paramater. The method would get all the .mp3 files under the path and then loop through all the subdirectories. For each directory it finds it will call itself passing in the directory to search. io.Directory.GetDirectories(path) will return all the directories under the given path. I'm sure you can find examples using google to traverse a directory tree.
|
|
|
|
|
Thank you very much. Greatly appreciated
CALVIN Muller
|
|
|
|
|
Hey there, i am looking for a way to be able to filter a ListView with a TextBox where i can insert a few characters, say "CA" and ii will filter the ListView across multiple columns. eg. If i have a ListView with Artist and Title. i want to type in "Hello" and it will display whatever matches that Pattern in the "Artist" column and "Title" column.
If anyone could help i'd appreciate it. Thanks.
CALVIN Muller
|
|
|
|
|
The ListView can't turn on and off the visibility of individual items, so you have two choices:
1) (Harder, but more useful) Implement your own version of the ListView and ListViewItem classes to provide this ability. It will require you to ownerdraw each ListViewItem when called upon.
2) (Easier, but slower) Dump the contents of the ListView and repopulate it with filtered values from your data store each time the filter textbox changes.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
How to create aspx pages with top part of the page constant accross multiple pages. Is there anything like frames in vb.net or any other way of implementing this. I have some drop down lists and a button control, on top of multiple pages. Selection of the drop down list values and button click event should trigger a resulting page in the bottom part. Appreciate all the help
Raj D
|
|
|
|
|
There is nothing about web pages in VB.NET. You're talking about ASP.NET, which is a framework for web-based applications. VB.NET is a language used to write applications using that framework.
And yes, there are ways of doing what you want. Ask your question in the ASP.NET forum for more details.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am trying to insert some date columns into a MySQL database using vb.net. MySQL has a date format like YYYY-MM-DD. I am inserting text files and the date columns are formatted like MM/DD/YYYY. Is there any way to format the date using vb.net so I can insert the files?
jds1207
|
|
|
|
|
Did you try to insert data as it is (MM/DD/YYYY)? I've noticed that SQL Server does the same thing. Some time ago I created parser to get customers info from flat file and didn't have to change anything. Try it first if it doesn't work you can use Format function of String class to convert your date.
Make sure your date first converted to String. You can do this by using Date.ToShortDateString().
Alex.
|
|
|
|
|
Here's the code that will help you to convert your date to String. This is just example of todays date to format you need (YYYY-MM-dd). So all you need is to get your dates and change them to this format by using ToSting function I'm giving you.
Dim MyDate As New DateTime<br />
MyDate.Now.ToString("yyyy-MM-dd")
Good luck.
Alex.
|
|
|
|