|
thnx but my rguments r little bit different
i m trying to change the parent of a toolstrip to form2 to form1 the code is
Private Sub toolstrip1move_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.TopMost = False
Dim tools1 As ToolStrip = CType(sender, ToolStrip)
tools1.Parent = Form1
tools1.Hide()
End Sub
but the tools1.parent = form1 causing the error
|
|
|
|
|
first of all:
eyes2007 wrote: Dim tools1 As ToolStrip = CType(sender, ToolStrip)
will not work
sender is of the type Form
second: I'm not really shure what will happen if you just change the parent of a control
my sugestion would be that you call a function on form1 wich dynamicly recreates the tools1 that way you'r form2 can shut down whitout any problems (but like I said don't know if it is needed)
perhaps something like this would be better:
form1.controls.add(tools1.clone) (don't know if possible didn't test it)
|
|
|
|
|
its not doing the work needed
the only option is that
i creat a button that exactly lools like the close botton on form place exactly on that close button and write the click event of that one
but i don't like to use this
|
|
|
|
|
what exactly do you want to do??
if you want to catch the 'X'button click event you need to use the formclosing/formclosed event of the form (best to use the formclosing that way everything is still on the form)
|
|
|
|
|
Hi all,
Iam getting error when exporting asp.net webpage contents into pdf file.If u have any idea plz revert me.The error is "The file couldn't open because the file not supported/it was damaged.
Thanks,
Aswath
|
|
|
|
|
I try to fill a datagridview from a datareder,and assign each value in the reader to a column
but i don't know
can someone help me ?
Thank you
Assaf
|
|
|
|
|
hi assaf,
i think DataReader is a forward only stream, you should use a DataApdater and
a DataSet for you to be able to display the data in the DataGridView
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Thanks Rupesh
But i don't know how to let the DataGridView show the result in the DataSet
I use DataAdapter and A DataSet!
If Someone can help me ?
Thanks in advance
Assaf
|
|
|
|
|
i want to store data in bengali into SQL server and when i would retrieve the data it will come to the text box in bengali.pls help .
I want know more about .net
|
|
|
|
|
Use nvarchar columns to store the data.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
On the taskbar, the buttons representing each open program resize themsleves between two boundaries, generally betwwen the quick launch bar and the notification area. Is it possible, and if so how, to change these boundaries so that taskbar item boundaries will reduce the space items occupy.
|
|
|
|
|
Hi,
I am using a datagrid view to display table data via dataset.
additionally I have a number of text and combo boxes where the user can enter filter information
so for example the data grid has 2 columns a product and a price.
The product filter is a combo box and the the price filter is a textbox.
acceptable filters would be
for the product:
a selected product ( phillips screwdriver)
a wildcard entered directely into the combo ( *screwdriver* )
for the price:
> 50 And < 300
<= 20
What I am looking for is an easy parsing technique that would convert the user entry into something an SQL where clause (or even a dataset select ) would understand
ie
Where [Product] = "phillips screwdriver" and [Price] > 50 and [Price] < 300
does anyone have an example algorythim for this kind of thing so that I can build code (or indeed any code to do this would be greatfully received - I can always build an algorythim from it)
Thanks
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|
|
Actually what I want to do is pass a dataset to the GUI holding say
Select * from Customers.
then use the User input and build a Dataset/DataView Filter on the returned dataset
so no SQL injection
but its a good warning.
thanks
also in this app , some data will come from SQL DB and other data from Oracle DB
so I have written a middleware layer which will retrieve the data but I dont want to use stored procedures at the DB level when my middleware is currently generic enough to handle both DB's via "standard" SQL.
thanks
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|
i am writing a program to get processes from the task manager to a text box. i managed to get the processes to an variabel,but when i try to send the data to a string variable...... it does not work.
i want to know how to change data from an array to a string....
shiran
|
|
|
|
|
sixecho wrote: i want to know how to change data from an array to a string.
Loop through your array contents and append them in a string.
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
|
Have a look at String.Join() !
|
|
|
|
|
Hi,
In an attempt to simplify the debugging process, I wrote a public sub EC (ErrorCatcher), that I can call from anywhere in my app, which writes all necessary information to a text file. Something like:
Public Sub EC(Byval err As Exception)<br />
dim line as string = Now & " - Error: " & Err.TargetSite.Name & " - " & Err.Message<br />
'write line to file, etc.<br />
End Sub<br />
<br />
Private Sub MyCode()<br />
Try<br />
'some error happens here<br />
Catch ex As Exception<br />
EC(ex)<br />
End Try<br />
End Sub
This Err.TargetSite.Name is just my latest attempt, but it does not tell me that the error took place in Private Sub MyCode.
Is there any way (other than passing it to the EC sub as a handwritten string) at all to find out in what part of the code the exception occurred, at runtime, and if yes then how?
Any help or suggestions appreciated.
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Yes, you can get the stack trace from the exception object and print it, it will tell you what method threw the exception, and a call stack down from there.
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 )
|
|
|
|
|
Thanks Christian, Steve also suggested this, and according to Luc I can get even more information out of an exception by simply using Exception.ToString().
Thank all you guys, this really helps.
My advice is free, and you may get what you paid for.
|
|
|
|
|
I believe you need to check the StackTrace property.
err.StackTrace
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Thanks Steve, I will try this.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi,
rather than using Exception.Message and/or Exception.StackTrace
you really should use Exception.ToString()
it will show you at least the Message and the StackTrace
but also:
- additional information (e.g. the filepath on a File Not Found)
- information about "inner exceptions"
|
|
|
|
|
Thanks Luc, I'll definitely give this a try.
My advice is free, and you may get what you paid for.
|
|
|
|