|
I have a form with a datagrid. I am setting the datasource of the grid and with query that returns 4 columns. How can I control the datagrid column widths so that I can fill the entire datagrid region instead of having a large blank space at the right of the columns due to their widths are less than the datagrid width?
|
|
|
|
|
You will have to redesign the TableStyles for the datagrid and re-apply them... Check for TableStyle related examples
"He that is good with a hammer tends to think everything is a nail." - Abraham Maslow
|
|
|
|
|
I want to create error logger file which will contain every error message, file name, method name and line number this is first
Second I want to categorized this errors, E.x (High, Low ..and so on) so if any one have any idea please help me
i want to know also microsoft error categories
|
|
|
|
|
You could start off with coding all of your functions with try{} catch{} statements. Then, each time an error occours you can write the error to a file.
|
|
|
|
|
rmedo wrote:
I want to create error logger file which will contain every error message, file name, method name and line number this is first
In debug or release mode?
rmedo wrote:
Second I want to categorized this errors, E.x (High, Low ..and so on) so if any one have any idea please help me
i want to know also microsoft error categories
I don't know if Microsoft has "error categories". I'd let it to user of your error logger to decide which thrown exception has High category or something. e.g. myLogger.Log(Exception ex, Category c). I've done something similar, you can take a look here[^].
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
|
Hi ,
I need to insert multiple rows in a database table.
Is there any way out in c# using oracleConnection.
Thanks
Mohit
|
|
|
|
|
I know it is possible to send mail through the CDONTS API - which sends mail through the Outlook Express account configured in the PC.
Similarly can I send the mail using the account configured in the Microsoft Outlook of the PC??? (which connects me through the Exchange Server)
"He that is good with a hammer tends to think everything is a nail." - Abraham Maslow
|
|
|
|
|
S P S wrote:
I know it is possible to send mail through the CDONTS API - which sends mail through the Outlook Express account configured in the PC.
Are you sure? Generally CDONTS is used to send mails using the SMTP server installed on the server.
If you actually can use an account from Outlook Express, you should be able to use an account from Outlook the same way. They are just different mail programs.
---
b { font-weight: normal; }
|
|
|
|
|
hi dudes;
iam building chat application and i want to add voice conferencing !
i need to get audio data instantly from my microfone and converts these data to array of bytes or get it as packets to encode it and then write them to a network stream any body can help me about this topic please iam in bad need for help about this.
If you can help me please refer to me with an article or code about this
Thanks
Miss With The Best And Die Like The Rest
|
|
|
|
|
I was making a metronome program, which was intended to merely draw a line with the top point moving back and forth, but i can not get it to work.
I have tryed a number of methods, which will
1: cause the program to crash (the line also moves to fast or
2: the line merely goes one was
If anyone has any ideas please help.
Thank you, Maxwell.
|
|
|
|
|
Use a timer to keep the pace. That will keep your program from using 100% cpu.
If you want a nice realistic movement, use a sinus function to calculate the position of the pendulum.
---
b { font-weight: normal; }
|
|
|
|
|
thank you for your help Guffa, it works find now.
|
|
|
|
|
I have a program that behaves differently when running it from inside Visual Studio and running the exe file. I am calling the ftp program to transfer a file, and when I run the exe file, the ftp program hardly provides any output at all. The file is transferred all right, but I get no response at all from the ftp progam that it did.
This is what the output looks like when I run the program from inside Visual Studio:
-----
ftp> Connected to photo.guffa.com.
open photo.guffa.com
220 Microsoft FTP Service
User (photo.guffa.com:(none)):
331 Password required for guffa.
230 User guffa logged in.
ftp> cd UnusedPhotos/large
250 CWD command successful.
ftp> put G:\TRIPPER\large\991-11895.jpg
200 PORT command successful.
150 Opening ASCII mode data connection for 991-11895.jpg.
226 Transfer complete.
ftp: 257154 bytes sent in 0,25Seconds 1028,62Kbytes/sec.
ftp> ftp> close
quit
-----
This is how it looks when I run the exe file:
----
User (photo.guffa.com:(none)): open photo.guffa.com
cd UnusedPhotos/large
put G:\TRIPPER\large\991-11895.jpg
close
quit
-----
I built the code from reading the MSDN documentation, then I saw this article: C# corner: Redirecting Standard Input/Output using the Process Class[^], and it doesn't seem like I have forgotten anything.
Here is the code that I use to call the ftp program. The tempName string contains the full path of a text file with the commands for the ftp program.
info = new ProcessStartInfo("ftp", "-s:\"" + tempName + "\"");<br />
info.UseShellExecute = false;<br />
info.RedirectStandardOutput = true;<br />
info.RedirectStandardError = true;<br />
info.CreateNoWindow = true;<br />
process = Process.Start(info);<br />
output = process.StandardOutput.ReadToEnd();<br />
error = process.StandardError.ReadToEnd();<br />
process.Dispose();
I display both the output and error strings, so I see that there are no error output from the program either.
Anyone got a clue why the program only works when run from inside Visual Studio?
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I would like to describe two way of declaring properties
(1)
public string Get_Set<br />
{<br />
get<br />
{<br />
return get_set;<br />
}<br />
set<br />
{<br />
get_set=value;<br />
}<br />
}
(2)
public string Get_Set<br />
{<br />
get<br />
{<br />
return get_set;<br />
}<br />
set<br />
{<br />
if(get_set!=value) <br />
get_set=value;<br />
}<br />
}
I would like to clear few things in property declaration.
a) From the above two property declaration , which one is best while considering efficient resource utilization.
b) If the above given examples are not good enough , then which one is best way of declaring a property.
Comment with detailed description will be highly appreciable.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Hello,
For simplicity, if it's only setting a variable and not doing something else, I'd use the first case:
public string MyProperty
{
get { return myProperty; }
set { myProperty = value; }
} If setting the property implies other operations, then, depending on them, I would check the previous value. For example, if when a property is set to false I need to remove an event handler, I would check before that the property was not already false , so I don't remove the handler twice. But for simple properties that only set variables, no need to check.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
Hi,
Does anyone know how to load an assembly without locking the file?
Let's say after a dll file is loaded, that dll is locked until
the client application is closed. What I'm looking for is even after
that dll file is loaded, I can still delete that dll from its folder.
The code I'm using is:
Assembly assembly = Assembly.LoadFrom(filename);
Thanks in advance.
|
|
|
|
|
Hi!
What you're looking for is called "Shadow Copy".
This blog[^] tells you everything you need.
Regards,
mav
|
|
|
|
|
what is the correct way to write this???
SetValue("something", 00 00 00 00, Microsoft.Win32.RegistryValueKind.Binary);
|
|
|
|
|
Hi Could you please tell how we create DWORD registry value by C#.Net Programm. In C# we have only one method to set key value:
reg.setValue("","");// It has only two paraments.
How can we provide type and hex or binary data.
Muhamad Waqas Butt
waqasb4all@yahoo.com
|
|
|
|
|
SetValue("something", 0);
will set dword values
|
|
|
|
|
i have a really noobie question... i have a form and when i click a button it opens another form, but how do i make it hide the first form?
|
|
|
|
|
|
yes that worked =)... hmm i would have sworn i had tried that and it hid both of the forms. lmfao well thanks for the help
|
|
|
|
|
LOL if i kept the first form visible while the second form was visible also, how could i hide the first form from the second form?
|
|
|
|