|
you just go to the properties of the form and set the localize = true with the location 0,0 .
Assaf
|
|
|
|
|
Hi assaf,
Actually i didn't explained my question clearly.I have display a form from a specified pt lets say(x1+width,y1) to(x1,y1).
|
|
|
|
|
write the code in ur form
this.location = new point(x1+width,y1)
Is it solve ur issue?
Thanks
|
|
|
|
|
It is not correct solution to my issue.Otherwise is it possible to display a form in reverse co-ordinates interms of its width? Lets say it starting location is (x1,y1) and its end pt should be (x1-width,y1-height).
|
|
|
|
|
I am not clear abt ur issue.I think u want to reverse the form.If u put a control at position (0,10) when u reverse it should display at (width,10). Is it?
Can I know why u want to reverse the form?I think it is not possible..not sure.
Thanks
|
|
|
|
|
I will give a brief about my requirement i have to expand a child window form to the left or right side of the parent window depending on the parent window location when i click on a button. And there should be more button on the child form when clicked ,then that window should be collapsed.
Thanks for your assistance.
|
|
|
|
|
Now much clear I think.You can do this from your parent form.In parent (let assume form1)form's button (btnForm) click event call the form2
btnForm_Click()
**********************
form2 f = new form2()
f.size = new Size(100, 100); //set the size of ur form2
f.location= new point(this.Location.X + this.Width -100 , this.Location.Y ); // here 100 is width of form2
f.Show();
hope this will work for u ...
if not pls let me know.Thanks
-- modified at 4:51 Friday 17th August, 2007
|
|
|
|
|
I am sorry to say this is not exactly wat i am looking for.It can display the form2 on the right hand side of the form1.But my requirment is to expand the form2 from its extream right to its staring location with the help of a timer control.
Thanks
|
|
|
|
|
If i want to search for sentence in a whole string
how i can do?
Ex:
str ="SELECT Currency.CurrCode, Currency.CurrName FROM CurRate INNER JOIN Currency ON CurRate.Code = Currency.CurrCode"
I want to check if CurrCode exist or not ?
and how to check from the case sensitive
Thanks a lot
Assaf
|
|
|
|
|
There are few methods to case sensative searches
convert or cast the search field to varbinary
Decalre @Code varchar(50)
set @Code = 'A22'
SELECT Currency.CurrCode, Currency.CurrName FROM CurRate INNER JOIN Currency ON CurRate.Code = Currency.CurrCode where CAST(CurRate.Code as varbinary(50)) = CAST(@Code as varbinary(50))
points to note:- @Code type & size (here varchar(50) should be same as CurRate.Code
Hope this will solve your issue.
Thanks
|
|
|
|
|
Use the IndexOf method of the string class. There are overloads where you specify a StringComparison value that determines how the comparison is done.
---
single minded; short sighted; long gone;
|
|
|
|
|
// Trying to Save uploaded file to server using the file base name
FileUpload1.PostedFile.SaveAs(strPath + "\\" + strFilename);----This is my code
I get this error to the above code "Could not find the path to the file"
Any suggestions to fix my code??
|
|
|
|
|
Did you set a breakpoint on that line? Did you see what the path evaluates to? Did you check if it's valid?
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
Well the FileUpload Control---used to Browse and select the file works.
Another Button adjacent to the FileUpload button is used to save the file selected by the Browse button inside the server and that does not work. My browse button code is:
private void FileUpload_Click(object sender, System.EventArgs e)
{
string strFilename;
{
// Get the file name
strFilename = FileUpload1.PostedFile.FileName;
// Exit if no file name was entered
if (strFilename == "") return;
}
}
|
|
|
|
|
Hi,
Use Server.MapPath("yourFileName")
Naresh Patel
|
|
|
|
|
I entered:
protected void butUpload_Click(object sender, EventArgs e)
{
Server.MapPath("Contacts.xls");
}
So, Thank You Naresh. I entered the above code and it worked(sense that I did not get any error this time.
So, now I think I should see in my SQL Server if that file is loaded there???
|
|
|
|
|
Ok...I did not receive any errors on it. However, I checked SQL Server and the Excel file that I uploaded was not saved on it.
What else do I need to do inorder to save the uploaded Excel file on the SQL Server??
|
|
|
|
|
Hello !
1-I try to write the message i got in the catch block in a label but i don't know how ?
2-How i can go to a new line when i assign a string to a label ?
Thanks in advance ?
Assaf
|
|
|
|
|
Assaf82 wrote: I try to write the message i got in the catch block in a label but i don't know how
catch(Exception ex)
{
yourLabel.Text = ex.Message;
}
Assaf82 wrote: How i can go to a new line when i assign a string to a label ?
You want a line break inside label text? Just use Environment.NewLine where you want a break.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
Thanks very much
Assaf
|
|
|
|
|
Hi,
Thank you for considering my query.
MS VS 2005 .NET installed and using the Microsoft online Help example: 'Walkthrough: Creating a User Control that Supports Lookup Databinding' I have encountered a problem with step 6. using the Data Source Window to set a column to use the new control. Steps 4,5,6 are unclear is this a .NET 2003 example ? and if so how do I continue?
During this walkthrough, you will learn how to:
1. Create a new Windows Application.
2. Add a new User Control to your project.
3. Visually design the user control.
4. Implement the LookupBindingProperty attribute.
5. Create a dataset with the Data Source Configuration Wizard.
6. Set the CustomerID column on the Orders table in the Data Sources window to use the new control.
Step 6 Setting the CustomerID Column of the Orders Table To Use the LookupBox Control
Within the Data Sources window you can set the control to be created prior to dragging items onto your form.
1. To set the CustomerID column to bind to the LookupBox control Open Form1 in the designer.
2. Expand the Customers node in the Data Sources window.
3. Expand the Orders node (the one in the Customers node below the Fax column).
4. Click the drop-down arrow on the Orders node and choose Details from the control list.
5. Click the drop-down arrow on the CustomerID column (in the Orders node) and choose Customize.
6. Select the LookupBox from the list of Associated Controls in the Data UI Customization Options dialog box.
7. Click OK.
8. Click the drop-down arrow on the CustomerID column and choose LookupBox.
Regards
dotman1
|
|
|
|
|
i need to convert a string to an array.
ex:
"Code Project"
i want the result to be split and converted to an array
str(0) = "C"
str(1) = "o"
str(2) = "d"
str(3) = "e"
str(4) = " "
str(5) = "P"
str(6) = "r"
str(7) = "o"
...
etc
the problem is how to split the string to make it into an array?
-TheCardinal
|
|
|
|
|
|
Just what i wanted.
thanks Mark
TheCardinal
|
|
|
|
|
Now a days this forum of Code project has disappointed me quiet often. It seems like people on this forum are busy replying some tutorial questions or busy elaborating stupid questions like difference between string and String etc. But when it comes to the question which involes bit of technicality query will remain unanswered eventhough you post it multiple time. I am sure the idea behind floating this forum was definitely not to answer the school project questions.
I feel quiet disappointed....
|
|
|
|