|
how can i change textbox width at runtime. I want to drag the textbox like v do while designing.
AjayO@PMAM.com
|
|
|
|
|
ajayo wrote: how can i change textbox width at runtime
I would guess you could use the Size property.
|
|
|
|
|
thanks but as i mentioned I want to be able to drag right side of the textbox and change size like v do it in designer.
|
|
|
|
|
Hi Ajay,
did u got the solution for ur problem?
we can write the code to change the textbox width at runtime, but i don't know how to write the code to allow the user to drag the textbox. please whenever u find the solution, try to post the code here.
thanks,
Rahi
|
|
|
|
|
Hi, I know that it's possible to set the ProcessorAffinity in Diagnostics.Process to use only one processor, but how can I do this for a forms application?
|
|
|
|
|
Get a process object for your form and use the ProcessorAffinity member.
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
Thanks for the suggestion, it sounds logical and I was figuring the same. I haven't found a way to retrieve a process object from a form, however. There's no property or method that lets me fetch it. Would anyone happen to know how this is done?
|
|
|
|
|
There's a static method Process.GetCurrentProcess() you can use.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Found it, thanks a bunch!
|
|
|
|
|
I have a requirement in one of our project, we will upload high resolution files to server, but when rendering/downloading the file, user may not require that much high resolution file which takes much time in downloading. For this we have download options,where user can select download size, resolution, after applying this size and resolution to the actual file we have to download the file. can any one please tell me in .Net required code to apply this size and resolution to an image?
|
|
|
|
|
I am running the application using app domain and get the updated version of the current running application using app updater.dll.
The application updated successfully but it not show properly, it closed immediately after updated?
Why the application close immediately.? I want display the updated application.
Please give solution for this problem.
Thanks
|
|
|
|
|
Hi I am trying to get a list of all dates that are between 2 dates so if the dates are
01/08/06 to 06/08/06
the result that I would hope to get is something like this
02/08/06
03/08/06
04/08/06
05/08/06
But my main problem is that I need to count amount of days a player has missed through injury but if the player has 2 injuries at the same time then certain overlapping days are counted twice like these dates here
08/01/2006 to 08/15/2006 14 days
08/01/2006 to 08/25/2006 24 days
I am trying to fill a table with all days and then remove duplicates but I would appreciate any help thanks in advance
Tim
|
|
|
|
|
This sounds suspiciously like a homework question to me.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
have not done homework in a few years now but ill freely admit its work for college and is a bit of a struggle
|
|
|
|
|
Why dont you show us what you've already tried, and specifically what problems you are experiencing, and im sure someone will help you out with your homecollege work.
|
|
|
|
|
well my main problem is i dont know if its possible and whether i shud use sql or c#
i can get a count of days between the datesin sql but thats not much good to me really as it doesnt take care of the duplicate days problem
|
|
|
|
|
There are so many ways to do this. Without knowing the full problem, you could use something like this (pseudo):
Add Injury (passing in start date and end date)<br />
if start date = end date then<br />
Check to see if the start date has already been added into your collection.<br />
If not, add it in and exit routine<br />
<br />
set date = start date<br />
while date is less than or equal to end date<br />
Check to see if the date has already been added into your collection.<br />
If not, add it in.<br />
date = date + 1 (hint - you need to use AddDays for this).<br />
end while
By doing this, you can easily track the dates that the player has been injured.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
would it be ok to use a DataTable as the collection of dates and if so then is it as simple as compare each date to each cell in datatable to see if it is already in there
|
|
|
|
|
It would probably easier to use something like a Hashtable
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i have never worked with hashtables before do they have some advantage over a datatables
|
|
|
|
|
Well, they do have a key that you can look up.
For instance:
private Hashtable _myTable = new Hashtable();<br />
<br />
public void AddItem(string value)<br />
{<br />
if (_myTable.Count > 0 && !_myTable.ContainsKey(value))<br />
_myTable.Add(value, value);<br />
}
Then, in your code you could do:
AddItem("Hello");<br />
AddItem("Hello 2");<br />
AddItem("Hello");
The list will only contain Hello and Hello 2. The last item will not be added.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
thanks alot for the help its appreciated i ended up using an arrayList to store the dates for each injury but ill def have a look at the hashtables
thanks again
private ArrayList AddDaysInjuredToArray(DateTime startDate, DateTime endDate, ArrayList dateList)
{
//*** set arraylist = to arraylist of days returned
dateList = AddDatesInBetween(startDate, endDate, dateList);
//*** sort arraylist making it easier to find duplicates
dateList.Sort();
//*** remove duplicates
for (int i = dateList.Count - 2; i >= 0; i--)
{
if ((DateTime)dateList[i] == (DateTime)dateList[i+1])
dateList.RemoveAt(i+1);
}
//*** return arrayList containing list of days injured with no duplicates
return dateList;
}
private ArrayList AddDatesInBetween(DateTime startDate, DateTime endDate, ArrayList dateList)
{
//*** start with day after startDate as startDate is not to be counted
DateTime newDate = startDate.AddDays(1);
//*** while newDate before endDate
while (newDate < endDate)
{
//*** add newDate to arraylist
dateList.Add(newDate);
//*** set newDate to next date
newDate = newDate.AddDays(1);
}
//*** return arrayList containing list of days injured
return dateList;
}
|
|
|
|
|
Hello All.
Some of you may have come across the problem when you have folder and file names in hebrew.
the problem is that the hebrew file name is replaced with it's parent folder when reading it into a string.
for example:
let's say i have a folder called c:\temp\סתם
and under this folder i have a file called משה.txt
when i read (using FileOpenDialog or any other technique) this full path into a string i expect to get:
c:\temp followed by a folder named סתם and a file named משה.txt but what you get is c:\temp\סתם\משה.txt
Does anyone know how to handle this?
Cheers
|
|
|
|
|
hi friends,
in my project i have to display a set of photos stored in a folder dynamically to the web page,
wat we did is that we have stored the path of a destination folder into a single column in SQL server and then we have to retrive all the photos stored in that specifeid folder to the web page....
i'm able to get the photos stored in it,
so can anyone help me out
thank you,
|
|
|
|
|
so what is the problem if you use the image control and
change the ImageUrl Property ??
Tamimi - Code
|
|
|
|