|
hello all,
i want to create a crystal report with the help of ado.net how can i do this . pls help with code
thanks
vipin paliwal
|
|
|
|
|
How can i set value for Column1 when value of column2 changed on a row? . I need your help, Plz help me.
Thank you very much.
|
|
|
|
|
you need to utilize the after_Update event from the datagrid. The arguments taht are passed include the row and column as ordinals. Then all you have to do is access the information in column 2, manipulate it and change the info in column1.
One gotcha to watch out for is that you need to specify which columns you want the event to do work on. You can do this by adding a select...case liek this
select e.datagridcolumn (not sure if this is the actual name of the parameter passed)
case 2
Make changes to column 1
else
do nothing
end select
|
|
|
|
|
hello,
please can any one tell me how i can remove multiselection from this TreeListView control.
Regards
Irfan Siddiqui
programmer
|
|
|
|
|
Read this article[^], it might give you some idea to disable multi select in treeview.
|
|
|
|
|
Hi
I am using DataGridView of VS .NET 2005 to represent my data in a grid. In that I have configured the combo box to represent my data. My question is how can I browse thru the combo box content with the keyboard key strokes rather then the mouse? Basically to make more user friendly I have to allow my user to navigate the Data grid view with key board also. Presently when I click keyboard down arrow key over a combo box it is moving to the next cell in the grid rather then navigating the contents of the combo box.
Thanks & Regards
Arunagiri
|
|
|
|
|
I'm currently working on an application where I have about 4,000 files in a single folder. The files are text and are presented in a row-column format. Each file is about 1,000 to 4000 lines long. The format is laid out as follows:
A B C D
123 456 789 123
321 654 689 985
055 596 856 999
What I'm looking to do is read the file and determine if the value in the last row of column C is the highest value in the entire column. If so I'd like to perform a series of calculations, probably in excel and then close the file. If not I'd like to stop reading the file and proceed to the next file in the folder.
Is there a way I can read the files without opening them? Any reading on the subject would be appeciated. Thanks.
George
|
|
|
|
|
You always need to open a file before you can read its contents.
If your data is in a fixed format, then maybe a Random Access read will do the job to retrieve the last line of data. From that you can then determine whether or not to read then entire file sequentially or load it into Excel or whatever you want.
Search for "random access file vb" in Google and on the Code Project for more info on random files in VB.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
If I'm understanding this correctly, just reading the last line won't suffice. You need to actually go through the entire file just to see if you need to do work or not.
If that's the case, use streamreader to read each line individually and do a comparison each time.
*** Untested Code below ***
<br />
Private Sub ProcessFile(ByVal nameoffile as string)<br />
Dim filereader as IO.StreamReader<br />
Dim strLine as string<br />
Dim intColumnC as integer<br />
Dim intHighestNumber as integer<br />
filereader = new io.streamreader(nameoffile)<br />
Do<br />
strLine = filereader.readline<br />
intColumnC = (add formatting to meet your file's layout to get columnC)<br />
If intColumnC > intHighestNumber then<br />
intHighestnumber = intColumnC<br />
End If<br />
Until filereader.peek = -1<br />
<br />
If intColumnC = intHighestnumber then<br />
'Add code here to process the file<br />
End If<br />
End Sub<br />
If you need to loop through the files, then you'll need to add a IO.Directory item to parse then add something liek this:
<br />
Dim fileName As String<br />
Dim files As String()<br />
Dim dirApp As String = System.AppDomain.CurrentDomain.BaseDirectory()<br />
files = IO.Directory.GetFiles(dirApp, "*.sql")<br />
For Each fileName In files<br />
ProcessFile(fileName)<br />
Next<br />
HTH
|
|
|
|
|
Hi,
Please i want to play music in ma application i want this music play in the load of the app. the music have to be an .mp3 or .rm
is it an easy way to do that ?? even if it is diffecult i will understand with a little explanation
aaah , i forgot !! the music can play just in the load of ma application i mean when i see the first form loading i want to hear that music or beep or whatever it won't be long 3 seconds 2 i don't know something like that
thank you very much
try to be good if you can't be the best
|
|
|
|
|
|
|
hey thnx but this link drives me to how to get an answear to your question it doesn't give me what i need
i need to play music in ma window application & i want to know how
thank you
try to be good if you can't be the best
|
|
|
|
|
I found out that it is createObject("NovellGroupwareSession") However, the code still does not like
Set MItem = EmailApp.createitem(0) or
Set MItem = EmailApp.createitem(olmailitem)
ANyone?
My company uses Novell Groupwise. What should I use as server and class in the following statement (in this example it uses Outlook Express)?
Set EmailApp = createObject("Outlook.Application")
My code does not like "Outlook.Application".
Is there a reference to check where the code will thinnk it is outlook while still using Groupwise?
Thanks for your help and patience...I am new at this.
Nick Iracleous
-- modified at 11:57 Wednesday 24th May, 2006
|
|
|
|
|
|
hi..
i have a problem in vb, how can i use the printer to print a data grid in my form..
can some one please help me..
areon25
|
|
|
|
|
|
|
Is this something that can be done with vb.net
something similar to pivotpro (software)
how would you persue it if you had to do it?
|
|
|
|
|
crash893 wrote: something similar to pivotpro (software)
how would you persue it if you had to do it?
Please clarify your question again.
|
|
|
|
|
Hi ,
Please i have finished my application & now i need to deploy it i have read two documents abt that but the two were not precise so i need something more clear & more explicit i really need that to get better marks in ma stage better you do better you get so can you share my succeed with me please ???
thank you very much
try to be good if you can't be the best
|
|
|
|
|
|
What I like to know is what code would I need to have if when I press a button it will tell the system to scan for new hardware? Basically the same as going into Device manager and telling it to scan for new hardware. If you ask why I'll go into more detail what I wan't to do.
P.S It's been about two years since I've done VB so I'm more then rusty on it.
Thanks,
Pat
|
|
|
|
|
Pat,
Somthing like this: (In VB.Net.)
(Imports System.Runtime.InteropServices)
Public Const CM_LOCATE_DEVNODE_NORMAL = &H0
Public Const CR_SUCCESS = &H0
Public Const CR_OUT_OF_MEMORY = &H2
Public Const CR_INVALID_DATA = &H1F
Public Const CR_INVALID_MACHINENAME = &H2F
Public Const CR_ACCESS_DENIED = &H33
<DllImport("cfgmgr32.dll", SetLastError:=True)> _
Public Shared Function CM_Locate_DevNode( _
ByRef pdnDevInst As IntPtr, _
ByVal pDeviceID As String, _
ByVal ulFlags As Integer) _
As Integer
End Function
<DllImport("cfgmgr32.dll", SetLastError:=True)> _
Public Shared Function CM_Reenumerate_DevNode( _
ByVal dnDevInst As IntPtr, _
ByVal ulFlags As Integer) _
As Integer
End Function
Private Function ScanForHardwareChanges() As Boolean
Dim status As Integer
Dim hDevInst As IntPtr
status = CM_Locate_DevNode(hDevInst, vbNullString, CM_LOCATE_DEVNODE_NORMAL)
'Debug.WriteLine("CM_Locate Status: " & status)
If status <> CR_SUCCESS Then
Return False
End If
status = CM_Reenumerate_DevNode(hDevInst, 0)
'Debug.WriteLine("CM_Reenumerate Status: " & status)
If status <> CR_SUCCESS Then
Return False
End If
Return True
End Function
Progload
|
|
|
|
|
Thankyou very much. Now lets see if I can actually do something with this. =)
|
|
|
|