|
Nope
I want to have the possibility to select a time from a drawlist, but I want to have the possibility to modify the date in the same control.
|
|
|
|
|
what is the criteria for modification..........
If this is not a frequent action then you can simply remove and add new items using DataTime variables.................
but still ur question is not clear
My small attempt...
|
|
|
|
|
Hi,
I want to send an email with C# over a Smtp server. I can send a E-Mail, but I've got problems with the Proxy-Server.
Is there any possibility to authenticate me with C# at the proxy?
regards
spotl
|
|
|
|
|
All I could find was this, Someone with the same/similar issue, who was redirected to using WebServices.
How to send email through http proxy [Firewall] [^]
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
System.Drawing.StringFormat class allows you to justify a text to left, right, top, bottom, center and middle of the clip rect. But I saw in Microsoft Word an option to justify text to both margin, so every line of text has the same width.
I checked the System.Drawing.StringFormat properties and didn't find out how to do this.
Please help me, thanks alot.
|
|
|
|
|
I've done a quick lookup, and you're right, it doesn't work, not for textbox, not for richtextbox. I read on a forum that it was just not possible at all, without using custom controls that you can buy/make.
Although I would hope that Framework 3.0 or GDI+ has this functionality somewhere. I can't help you with that, but you could point your question towards them (also).
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
I got the problem when using Graphics object to draw text, like this
Graphics g;<br />
g.DrawString("Text", font, brush, rect, format);
with format is an instance of System.Drawing.StringFormat
No way to strect the text lines to have the same width
Thanks for your answer anyway.
|
|
|
|
|
Hello All,
How can I edit a datagrid item faster. I have the following approach.
string LocalTimeToStore = null;<br />
DateTime dt;<br />
DateTime local;<br />
string LocalDateTime = null;<br />
<br />
for (int i = 0; i < LoggerDatagrid.Rows.Count - 1; i++)<br />
{<br />
LocalTimeToStore = LoggerDatagrid.Rows[i].Cells[1].Value.ToString();<br />
dt = Convert.ToDateTime(LocalTimeToStore);<br />
local = dt.ToLocalTime();<br />
LocalDateTime = string.Format("{0}/{1}/{2} {3}", local.Month, local.Day, local.Year, local.TimeOfDay);<br />
LoggerDatagrid.Rows[i].Cells[1].Value = LocalDateTime;<br />
}
Is there a method to edit the data grid cells and repopulate the same back? please help me
Keshav Kamat
India
|
|
|
|
|
Are you asking for better performance or less Lines of Code (shorter code)?
For the performance, I think it is best to just change the format, and not the actual value of the cells. This can be done by editing the CellStyle, either via the IDE (Datagridview > edit columns > DefaultCellStyle > CellStyle Builder > Format) or via code:
dgv1.Columns[0].DefaultCellStyle.Format = ...
Hope this helps...
Here an MSDN link to Formatting types[^]
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
hi
ok can u tell me a way, where in I can populate a dataset from a datagrid.
that would be helpful.
Keshav Kamat
India
|
|
|
|
|
If it is a bound datagrid, you just have to cast the datasource property into a dataset or datatable.
DataTable dt = (DataTable)dgv.DataSource;
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
thanks. i will try it.
Keshav Kamat
India
|
|
|
|
|
by the way,
how do I access a cell of this table that is created.
I need to modify the contents of this table. How do I do it?
Keshav Kamat
India
|
|
|
|
|
look up DataTable in Object Browser.
You can use DataTable.Rows[x].Cells[y].Value or something of the likes.
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
Hi i developed a windows application, after completion of the processing it has to write the results in to a file. I wrote code for this form_closing event. It is working fine when i closes the application. My problem is
If the system is shutting down with out closing the application it is not writing data in to the file. I dont know what event is fired when the application is closed by shutdown.
It is very important to store the results into the file.
Please Help me.
Thanks in Advance.
Ramu
|
|
|
|
|
|
Thank You Very Much.
This helps a lot for me.
Thank You
Ramu
|
|
|
|
|
just use the form closing event and use the FormCloseEventArgs object
and check if( e.Closereason == CloseReason.WindowsShutDown)
hope that is useful for u...
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Thank You very Much.
This helps me a lot.
Thank You
Ramu.
|
|
|
|
|
Hi,
I want to save/upload a file in sql database BUT WITHOUT using the upload object from c#, just a straight forward code. I already have the path of the file itself with fuill permission. Does anybody know how to do it?
Thanks
Dabsukol
|
|
|
|
|
Will this do the trick?
Adding binary data to a table[^]
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
Code is simple as below:
Process process = Process.Start("MSBUILD.EXE", "D:\\Common\\Common.sln /p:Configuration=Debug");
process.WaitForExit();
When I ran above code in C#, I got "ExitCode = 1" error, couldn't figure out why. Anybody please help?
Thanks a bunch.
Hazy
|
|
|
|
|
Hi.
I need to write a large text file from my application. Large means something like 200+ Megabytes.
What is the fastest way to do it? Using the static methods of the "File" class or using streams?? I am aware that either way, it'll take a long, long tine, but ...time is precious.
And another related question. It helps in terms of performance to write as much data as possible at a time, doesn't it?
Thanks.
|
|
|
|
|
blackjack2150 wrote:
And another related question. It helps in terms of performance to write as much data as possible at a time, doesn't it?
kind of depends what you mean by performance. but often yes.
1. The user starts the file save procedure and starts looking at email. The PC will look faster if your process is slightly less fast so smaller packets that don't block the disk queue might help.
2. The hard disk has issues. The program continually tries to write and fails. Because your packets are huge it fails more often as it's hard to find unbroken space that big and it has to attempt each write many times. (This would more likely be a problem on a network share for instance).
3. The hard disk is fast, is 0% fragmented and there's more ram and CPU power in the box than you could shake a stick at. This machine isn't going to slow down for anything so you might as well max the packet size and get the job done fast.
Do you need this file save to complete before the user continues? If not i would suggest sticking the save process in a background thread and maybe put a progress bar in the UI.
Russ
|
|
|
|
|
User interaction is not important for me. In fact is almost absent. I've converted my program to a console application, as I noticed that during the execution the UI got blocked. I know there are ways to avoid this, but I decided that it's not worth the effort.
If it helps I'll briefly describe what the program does:
I have a folder containing more than 7000 xml files which are news articles. I must read everyone of them and write to a file every distinct word in these xmls. It adds up to about 42000 words. I another file I must write the frequency of appearance of every word in every xml file, so there are 42000*7000 = a s...load of numbers to be written.
So, the user just starts the program, sits back and begins to read a book on programming.
It takes about 5 minutes to read the files and store the words in memory, another 5 to write the 42000 words to the first file, and writing the last file....well God knows, as I never had the patience to wait that much.
This file should have: (7000 * 42000 * 2) / 1024 /1024 ~= 560 MB.
The data structures I use are just basic arrays and matrixes. Does the word "matrixes" exist? Or should it be matrices?
So, what do you suggest?
|
|
|
|