|
I am assuming you have code that executes after the close call and you want to prevent this code from executing. I believe you have 2 options:
1. You can count the number of Mdi child forms that are being displayed before and after you call to AcitveMDIChild.Close. If the count changes you know the form closed otehrwise something has prevented to from closing.
2. Move all the code after the call to Me.ActiveMdiForm.Close to a different function that handles an event from the MDIChild when the form actually closes.
Hope that helps.
Mike Lasseter
|
|
|
|
|
Is there a property to allow the last column in a datagrid to be dragged, and hence expanded, past the bounds of the datagrid?
The issue is that the user has to double click the last column to resize it past the bounds of the datagrid.
I would like the column resizing to work in the same manner as windows explorer.
I have googled but to no avail.
Any help appreciated.
Guy
You always pass failure on the way to success.
|
|
|
|
|
how can i connect visual basics with oracle8.0
prashanna
|
|
|
|
|
|
Sql = "select * from tblSipFatMal where [SIP_TARIH] between DateSipTarBul1 and DateSipTarBul2"
Me.tblSipFatMal.FillSort = "[SIP_TARIH] DESC"
Me.tblSipFatMal.FillFilter = ""
this my prepare code.i have got two datetimepicker.i want between filter this datetimepicker..
can i help me?
|
|
|
|
|
shapinuva wrote: can i help me?
Doesn't look like it.
shapinuva wrote: DateSipTarBul1 and DateSipTarBul2"
This is never going to work. SQL is a different language to VB, your code needs to build valid SQL, the database cannot tell that these are variables within your VB code. So, your best bet is to write a stored proc, but if you want quick and dirty, just concatenate a string which includes the values of the dates in those controls/variables, instead of the names.
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 )
|
|
|
|
|
How can I convert the keyboard layout to arabic? I could covert the characters using the API 'LoadKeyboardLayout'. But the digits are not converting to arabic. I searched in the net for the API I understand the digits can convert with the function 'SetLocaleInfo'. This function receives 3 arguments but i don't know the value should be passed to this funtions. Please help to find the values of the arguments.
Thanks and Regards,
Mic
|
|
|
|
|
Dear all,
I would like to write a vb.net program that connect to LDAP and search the users from LDAP and display in text box or listbox. Thanks in advance.
RB
|
|
|
|
|
Use the ADSI[^] interface. Plenty of examples within that link.
|
|
|
|
|
Dear Craster,
Thanks for your help. But, what I have to implement is with LDAP. Could you please help with that ? If possible, I would like to get the sample coding.
Regards,
RB
|
|
|
|
|
ADSI supports LDAP, and there is plenty of sample code in the link I gave you.
|
|
|
|
|
Hi there
(vb.net)
I need to add drag/drop functionality to the webbrowser control. In vb6 it exposes a DragDrop event, it seems MS has made it redundant. I am now looking for another way to do this....by placing a transparent panel/usercontrol over the webbrowser control, and capture the drapdrop event in the panel. I have tried using a picture box, panel, as well as blank usercontrol with background set to Transparent, and I cannot get it to be transparent as run time.
1. Anyone know how I could implement a dragdrop event on the webbrowser control in vb.net?
2. If the above is not possible, how do I make a panel (or usercontrol) transparent?
Thank you
Regards
Dale
|
|
|
|
|
I don't think making a panel or uc transparent will work
if you put them transparent the events of the control will probably no longer fire (I'm not sure about it dough)
for drag and drop there are normally property's on the form and on the control for that:
allowdrop
and events:
dragdrop
dragenter
dragleave
dragover
I suggest u look at these
If you don't find it I have some code that does this but not with me at the moment (I'm at work) and I'm not sure I'll find it again (been a while since I wrote it back in my school days)
|
|
|
|
|
Transparent is not transparent. I know, just bear with me.
When you tell the BackColor of a control to be transparent, you're not telling the control to be transparent. You're actually telling it to take on the background properties of the controls parent container, in your case, the background of the form. That's why, by default, the background of the control turns gray, not "see through". This is why you can't see other controls between the form and the "transparent" control.
There's no way to "force" this to work using any property. You'd have to make your own version of the control you want to be "transparent" and render it, ALL OF IT, yourself. You'd have to provide all the drawing code to draw the entire control!
This also introduces a problem. Since in order to get an updated view of the "background" of your transparnet control, all the other controls under your will have to redraw themselves. This results in a performance problem because your redrawing just about the entire form to redraw your control.
|
|
|
|
|
Dear All,
I am using server/Client application which will communicate through winsock Control. Coding for all the database transactions done in the server application. Only the data is passed to Client. For each transaction client will request the Server to do the transaction.
Here my problem is between the transaction if Database is down/Network is down I am getting "End of communication channel/Oracle not available/TNS-packet failure" errors. I am using ADO connectivity for database transactions.
I tried by checking the socket.state, On Error goto. But nothing seems to be helpful. Any suggetions/Solutions are welcome
Thanks in advance
Regards
N.Surendran
|
|
|
|
|
In our project we have rich text format (RTF) report template files with bookmark fields.
what we required is to read that file in background replace templates bookmark fields with DB field values (may be in iteration) and save this report file as .rtf but without using any rich* controls....
basically we are looking for a library or api already doing the same thing ... (since we follow the rule ... NEVER RE-INVENT THE WHEEL)
we also do not want to use MS word automation. since it has some issues...
Any help would be appreciated... either by code example or by guided links on net
thanks in advance
Misaw75
"Power without control is nothing."
|
|
|
|
|
hi All
i have a Grid, that is Binded from a Dataset that has a table with 15 Fields. So in my Datagrid i only want to update only one Column. How do i make other Colimns readonly
Please tell me,how do i achieve this
Thanks
Vuyiswa Maseko
|
|
|
|
|
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....
|
|
|
|
|