|
while loading From dataset to Datagrid itself u can assign that certain column
in readonly mode
e.g
with mydataset.tables(0)
.columns(0).readonly = True
end With
Reply How It,helped.
Prabumj@gmail.com
|
|
|
|
|
Thanks man
WHAT IF I HAVE ONLY ONE TABLE?
mydataset.tables(?)
Vuyiswa Maseko
|
|
|
|
|
hi all,
i want to add some text to AVI file . everything is complete except one. when we exract frames( as bitmap) from avi file then size of file is too much .Presently for 1.29 MB file there are 257 frames and total size of all BMP images is 15 MB. after that i write some text to BMP & once again merge them to create modify AVI files. now this modify avi file size is approximately 15 Mb while original size is 1.29 MB.how can reduce this AVI file ?
i create some class on the basis of following article. i convert it in vb.net and use only three class avi.cs(in my application avi.vb),aviReader.cs(aviReader.vb), aviWriter.cs(aviWriter.vb)
http://www.codeproject.com/csharp/steganodotnet4.asp
following is the code that i use for extract from and mege BMP to AVI files
Dim a As New PictureKey.AviReader<br />
Dim b As New PictureKey.AviWriter<br />
Dim DestPath As String = TextBox1.Text & "\MyAVI.avi"<br />
Dim TempPath As String = TextBox2.Text & "\"<br />
<br />
<br />
Dim dir_info As New DirectoryInfo(TextBox2.Text)<br />
Dim file_infos() As FileInfo<br />
file_infos = dir_info.GetFiles<br />
For Each file_info As FileInfo In file_infos<br />
file_info.Delete()<br />
Next file_info<br />
<br />
<br />
a.Open(txtAviFile.Text)<br />
b.Open(DestPath, 10)<br />
<br />
Dim i As Integer<br />
ProgressBar1.Minimum = 0<br />
ProgressBar1.Value = 0<br />
ProgressBar1.Maximum = a.CountFrames<br />
For i = a.FirstFramesNo To a.CountFrames - 1<br />
a.ExportBitmap(i, "C:\AVI\" & i & ".bmp")<br />
AddTextToBMP.ExtractMetaData("Rupesh", Nothing, 50, 50, "C:\AVI\" & i & ".bmp", TempPath & i & ".bmp")<br />
Dim aa As Bitmap = Image.FromFile(TempPath & i & ".bmp")<br />
b.AddFrame(aa)<br />
ProgressBar1.Value = ProgressBar1.Value + 1<br />
Application.DoEvents()<br />
Next<br />
a.Close()<br />
b.Close()
can anybody guide me that how can i reduce the size of avi files ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
A file which is raw has the same extension as a file that is compressed using a codec such as DivX. Usage of such a codec is the only way to reduce the size of an AVI file.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
HELP - SIMPLE MATH PROBLEM
Hey people!
Have what should be a simple math problem, but its driving me absolutely buggy!
Something ridiculously obvious is escaping me and I can't for the life of me figure out
what the heck it is.
So, I describe what Im trying to do in this email and have also included what I think are the most
important code snips below, where I think the error is occuring.
So here is the description of the problem.
A series of numbers are provided by the user. The series is a sequence that is variable in
length and variable in size per number. For example
23 1 899 72 11 02
or
1 7 8 19 2
or
233 455 23 24 29 12 14 16 17 91 92 94 98 57 34
so any number can be any size, and there can be any number within the sequence
The numbers are entered by the user into a text box
The user clicks a command button
A routine enumerates the total number of individual numbers in the sequence and
creates an array having the same number of elements that will correspond to the
math we will perform, and that follows the following parameter of;
(Code shown that creates the proper number of array elements)
Where "prefix_number" = the total number of numbers in the sequence, i.e. for the second
example above ( 1 7 8 19 2), prefix_number = 5
'this line determines the total number of array elements required
array_total_elements = (prefix_number + 1) * ((prefix_number + 1) + 1) / 2
'--------------------
'april 19 - 06 - ReDim adding_array(numchars) 'array with the number of elements of the same amount as the number of chars
'this array forms the needed structure of the conic, creating all positions for number placement within the cone
ReDim adding_array(array_total_elements)
'--------------------
So now we have an array with a total number of elements that will accomodate the math we want to perform
on the sequence, and that math operation is this;
Take the given sequence, i.e.
1 7 8 19 2
where each number in the sequence is stored individually in an array element, and subtract it from its neighbor to its immediate
left and starting from the left hand side, take the resultant of that value and place it in the appropriate array element not as yet occupied
and continue the process.
So here we have the following
1 7 8 19 2 is processed as;
where
1 is stored in array element 0
7 is stored in array element 1
8 is stored in array element 2
19 is stored in array element 3
2 is stored in array element 4
2-19 = -17
19-8 = 11
8-7 = 1
7-1 = 6
so now we have ;
1 7 8 19 2
6 1 11 -17
and 6, 1, 11, -17 are stored in array elements
6 is stored in array element 5
1 is stored in array element 6
11 is stored in array element 7
-17 is stored in array element 8
we continue as;
6 1 11 -17
-17-11 = -28
11-1 = 10
1-6 = -5
and -28,10,-5 are stored in array elements
-5 is stored in array element 9
10 is stored in array element 10
-28 is stored in array element 11
And so on, the process continuing until we cant do it any more and we arrive at the last
array element result.
Then, we simply dump all the array values in proper sequence to a text box, perhaps a rich text box
and we place a hard return CHR(13) after each sub sequence so we can view the proper order of
computation.
So the box shows something like;
1 7 8 19 2
6 1 11 -17
-28,10,-5
....and so on.
Seems simple enough to me, but for some reason the whole backwards processing thing has stumped me,
working from left to right, subtractively, especially with properly populating and working with the arrays
that way, sounds silly I know, but I can't get this to work.
My code snippets follow below, can anyone whip this together simply, quickly?
Thanks for any feedback!
Cyndy
'====================================='May 12 - 07
'this line modified to cause backwards subtractive process in line
'LAST CODED
check_what_it_is = Val(adding_array(adding_element))
check_what_it_is2 = Val(adding_array(adding_element - 1))
adding_var = Val(adding_array(adding_element)) - Val(adding_array(adding_element - 1))
'====================================='May 12 - 07
DoEvents
'=======================
' may 12 07
'===================
'value placement
adding_array(adding_element + array_pos_update) = adding_var
adding_element = adding_element - 1
'--------------
'may 29-07
'bug occurs here, adding element gets reduce to zero and it needs to
'go back up to the rung down
Debug.Print "adding_array(6) ;"; adding_array(6)
'here is where it breaks down, at the row switcher
Debug.Print "adding_array(12) ;"; adding_array(12)
'=======================
'======for display to text boxes only, captures data stream for display
string_result = text_trans & " " & string_result
text_trans = CStr(adding_var) & " " & text_trans
'======for display to text boxes only, captures data stream for display
'bug occuring here, may 29-07, its not switching to the next row properly
If row_switch_counter = switch_to_new_row Then
array_pos_update = array_pos_update + times_through_the_loop 'APRIL 18-06, does this var need to be reset to zero
adding_element = times_through_the_loop '- 1 'array_pos_update 'moves array position pointer ahead two, jumping to next line
Debug.Print "adding_element ;"; adding_element
'may 28 - 7 ===============
'may 28 - 7 switch_to_new_row = switch_to_new_row - 1
row_switch_counter = times_through_the_loop
text_trans = text_trans & Chr(13)
times_through_the_loop = 0
End If
End If
Next q 'steps through for loop
'===============================
'===============================
'=== ADDING ARRAY ENDS
'===============================
'==============================
'-----------
ctr_transfer = 0
RichTextBox3.Text = display_first_Line & Chr(13) & text_trans
'-------- send array info to text box
set_carriage_returns = prefix_number + 1
check_for_carriage_returns = 0
feedtextbox_ctr = 0
adding_element = 0
display_result = "" 'var to hold looped array numbers
Do Until feedtextbox_ctr = numchars
DoEvents
display_result = display_result & adding_array(adding_element)
If check_for_carriage_returns = set_carriage_returns Then
display_result = display_result & Chr(13)
set_carriage_returns = set_carriage_returns - 1
check_for_carriage_returns = 0
End If
check_for_carriage_returns = check_for_carriage_returns + 1
feedtextbox_ctr = feedtextbox_ctr + 1
adding_element = adding_element + 1
Loop
'-------- send array info to text box
Text2.Text = display_result
'Text2.Text = text_trans
|
|
|
|
|
Code looks messy. As I understand it, your new array contains a value in position n that corresponds to a(n) - a(n+1). So, you just need to create a new array, and run a loop that goes up to one less than the length of the first array, and insert the values using the formula above.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi Cyndy,
you said you are troubled by the requirement to work right-to-left,
but there actually is no such requirement.
You can do the subtractions from left to right, that would yield the same result.
Furthermore you are trying to do everything in a single array; it would be easier
to use a two-dimensional array; granted it would waste almost half of that array,
but it would be simpler.
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
i have three fields in the database table and all are numeric, so according to their value , can i show their value in graphs in crystal reports.I mean
example there exist there rows , having two columns
a 10
b 20
c 30
no i want to show the percentage of a , b , c in the graphs using crystal reports.a is 10% , b is 20% , c is 30% further in graps a block shows emerges in red color , b which is 20% is coming out to be in green , and c which is 30% , appears in yellow color.
How can i do it
Please help.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
yes! u can certainly do that in vb.net itself i hav done that
U just click the graph button in u r crystal report u will be popped up
with a window there u can select u r fields to "Show Value(s)" which is to be shown in Graph, But don't Forget to select the Field to "On change of"
b,coz based on this field u r graph are being displayed.
how it helped , reply !
prabumj@gmail.com
-- modified at 5:23 Monday 13th August, 2007
|
|
|
|
|
I writing a program in VB.Net for my project and trying to write and read data to and from the serial port (COM ports) but does not work. The code I am using is shown below.
I would be glad if any body can provide me with assistance.
Thanks
Regards
Eric
The only permanent situation is change
|
|
|
|
|
Try to write a better subject. Almost everyone posting here needs help, so your subject does absolutely nothing to distinguish it from other threads.
Agbe wrote: but does not work
What does that mean? What happens? Does it compile or not? Do you get a runtime error? What does the code do? How does that differ from what you expect?
Agbe wrote: The code I am using is shown below.
Where?
---
single minded; short sighted; long gone;
|
|
|
|
|
I am trying to programmatically show the My Computer Icon (as well as the My documents icon) on the desk-top. I don’t seem to be able to find a registry key. Any ideas how I would accomplish this?
Thanks,
dave
|
|
|
|
|
What do you by "show the My Computer icon"?? Are you talking about the policies that can be turned on to turn them off?
|
|
|
|
|
Exactly, sorry I should have been more thorough in my explanation. In windows xp professional, after installation of the OS, you can go to the start menu and right click the "My Computer" Icon and choose "show my computer on the desktop". I assume that is a policy stored in the registry somewhere. I just cannot seem to find it anywhere.
|
|
|
|
|
i need to send mail from my application it's windows application vb.net 2005
i need to know what to pass to SmtpCtlient is it take parameters
this is my code i need to know why it's doesn't send mail
i have that error "the smpt was not specified "
this is my code
*****************************
Try
Dim objmessage As New MailMessage("md@gmail.com", "md@gmail.com")
objmessage.Body = "test"
objmessage.Subject = "test"
Dim t As New SmtpClient
t.Send(objmessage)
Catch ex As Exception
MsgBox(ex.Message)
End Try
md_refay
|
|
|
|
|
You have to set the Host property of SmtpClient (use the correct IP ot name,
something like "relay.skynet.be"); you can do this also thru one of the
SmtpClient constructors.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
would like to connect my computer with another on lan and perform a voice call using vb.net
|
|
|
|
|
Google for "voice chat vb.net" and you'll find a bunch of examples. Or, use something off-the-shelf, like Yahoo Messenger.
|
|
|
|
|
would like to connect my computer with another on lan and perform a voice call using vb.net
|
|
|
|
|
Not sure if this is any use but Microsoft Netmeeting SDK allowed me to do this with C++.
It is a COM object so have a look at this.
Hope this helps
Dan
|
|
|
|
|
Hello
I tried to assign the value of a formula in crystal report from vb form.
but i don't know how to do it?
So any help will be usefull
Thanks in advance
Assaf
|
|
|
|
|
Hi
can i prevent user from left the current row before check some values ..
this is a so important optoin for me ..
jooooo
|
|
|
|
|
hi
i need the code which turns back the windows speed when it changed. programs like Speeder Xp. For example when speeder xp changes the speed,the code will turn it bak.
thanks
signature
|
|
|
|
|
You have to provide a little more information about what the program actually does. What "speed" is it that it's changing, and how does it do that?
---
single minded; short sighted; long gone;
|
|
|
|
|
http://en.speederxp.com/download/speeder.exe that is program. Examine this program and understand how it works. this program changes the system speed.
|
|
|
|