|
I tried refresh but the problem is this that it doesnt work and when it refreshes itself a neww root is made like the previos one i want that when i refresh it it only detects the added root in the XML file
SAS
|
|
|
|
|
I've got the width of the text in my combo from the textrenderer class and i'm trying to set the combobox so that all the text is visible no matter how long the text is and without having acres of whitespace if the text is short.
Is there a way of setting the size of this area or measuring how much of the control is not part of this area so that i can resize the control accordingly?
Thanks
Russell
PS I promise this is my last daft Q of the day.
I've been looking at this some more and it no longer seems that daft to me. I've found 2 properties: ClientSize and DropdownWidth. These looked to be just the tools i need but then I realised that ClientSize doesn't take into account the size of the arrow and DropDown Width doesn't include the scrollbar. Maybe I need to know how to measure the arrow / scrollbar instead?
|
|
|
|
|
Rather than lose track of what's been posted in what order in the above message I thought i'd post a reply.
I've just checked the value of ClientSize and it's identical to the width of the control. Is this usual? Does it work differently depending on which control you call it on?
Russell
|
|
|
|
|
You could always use the Graphics objects MeasureString method using the font of the combobox. Iterate through the various strings in the combo for the longest one and then measure it.
Finally you can calculate and set the new width of the combobox:
cmbbox.Width = stringsize.Width + (cmbbox.Width - cmbbox.ClientSize);
Think that should be sufficient.
Hope that might be of some help.
Best regards!
-Larantz-
|
|
|
|
|
hello,
I've linked a file to start my app when you open it (like .doc files open Word)
The problem is that the System.IO.Directory.GetCurrentDirectory() gives the path of the file instead of the path where my exe resides.
Is there a way to change this back? (without hardcoding it)
thanks.
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
Use Application.ExecutablePath
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
TNX !!
I used Application.StartupPath
|
|
|
|
|
You can get the path of your executable using this property:
System.Reflection.Assembly.GetExecutingAssembly().Location
Based on this, you can get the directory of the executable and make it the current working directory (by calling System.IO.Directory.SetCurrentDirectory with that path).
|
|
|
|
|
TNX ! I used Application.StartupPath
|
|
|
|
|
The System.Windows.Forms.Application.ExecutablePath property has the following comment:
Gets the path for the executable file that started the application, including the executable name.
You can then extract the path from here.
You could also use the executing assembly and work from there.
System.Reflection.Assembly.GetExecutingAssembly().Location
|
|
|
|
|
Tnx, I used Application.StartupPath
|
|
|
|
|
Did you use Application.StartupPath?
|
|
|
|
|
Was it wrong or did you just post this because I replied to all of them the same thing
|
|
|
|
|
V. wrote: or did you just post this because I replied to all of them the same thing
It seemed like a rubber stamp.
But seriously, if it works, great. But as a practice, use the other method. It covers you for all types.
|
|
|
|
|
What did you reply I missed it.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
As i want to add custom folder attributes in the root folder of namespace extension. While i am using the SFGAO_HASSUBFOLDER like wise , I am getting the system folder attributes only. Instead of that i want to add my own folder attribute in the root. Say " Login As" in the root of the virtual namespace extension.
As i am quite novice in shell programming, please help me to resolve the same.
Aruna
|
|
|
|
|
Try posting it again. Twice might not be enough.
|
|
|
|
|
Be nice now, its URGENT
Programmer: A biological machine designed to convert caffeine into code. * Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
As i want to add custom folder attributes in the root folder of namespace extension. While i am using the SFGAO_HASSUBFOLDER like wise , I am getting the system folder attributes only. Instead of that i want to add my own folder attribute in the root. Say " Login As" in the root of the virtual namespace extension.
As i am quite novice in shell programming, please help me to resolve the same.
Aruna
|
|
|
|
|
i am trying to read a memo field of database using oledb datareader after executing the query like below
datareader.GetValue(0).ToString() which only reading the first 255 chars in the memo field how could i read the whole contents at a time
please help.
|
|
|
|
|
What database are you using that has Memo fields?
|
|
|
|
|
Sounds like MS Access. If at first you don't succed give up go play XBox
Try something other than a datareader. Try a datatable or if you are only intrested in on field use a SQL statement and run a OleDbCommand.ExecuteScalar();
Programmer: A biological machine designed to convert caffeine into code. * Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
Try something like this:
dr.Read();
FieldLen = dr[MemoCol].Length;
char[] MemoBuffer = new char[FieldLen];
int startIndex = 0;
retVal = dr.GetChars(1, startIndex, MemoBuffer, 0, MemoBuffer.Length);
Console.WriteLine(MemoBuffer);
|
|
|
|
|
Hi,
My XML file contains Method List.
In my application contain 2 Threads.
First Thread reading Method from XML file and starting the 1st Thread.
Second Thread reading Method from XML file and starting the 2nd Thread.
Onec which ever thread complete method it's takes next method.
this process going until all the method over.
How to do this
it's arrgent.
Plz help me out.
|
|
|
|
|
If you're calling them sequentially, what's the point?
|
|
|
|