|
acodman wrote: javascript that can disable or hide address bar on browsers on page_load.
See this[^] link.
Imho, you're better off asking this question in the Web Development[^] forum.
/ravi
|
|
|
|
|
Or even better not trying to control the users web browser - its their browser let them decide what they see!
|
|
|
|
|
CurrentCell.ColumnNumber and CurrentCell.RowNumber are read-only properties and can not be changed. So, how can any cell from grid be set as current cell (selected and focused).
thanks.
|
|
|
|
|
are you using Not net 2.0? if so have you tried the following?
this.dataGridView1.CurrentCell = this.dataGridView1[2, 0];
|
|
|
|
|
i'm using Net2.0 but this is not working
grid.CurrentCell = (DataGridCell)grid[3, 3];
InvalidCastException
the control is not DataGridView but DataGrid
|
|
|
|
|
Hi.
How can I read command line parameters used to call a Windows Form Application?
I use VS2005 to create a new Windows application. The autogenerated Program.cs fle looks like this:
....<br />
static class Program<br />
{ <br />
[STAThread]<br />
static void Main()<br />
{<br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
Application.Run(new MainFrm());<br />
}<br />
}<br />
....
Shouldn't the Main method header include a parameter for arguments?
Can I add it by hand? Are there any other options?
Thanks.
|
|
|
|
|
feel free to add the arguments to Main function. This wil stil work with windows forms
eg. static void Main(string[] args)
|
|
|
|
|
You don't need to do that, you can just call:
string[] args = Environment.GetCommandLineArgs();
FYI, args[0] is the app file name.
|
|
|
|
|
|
I created a Report using CR in .NET. The report has a couple of decimal fields .I want the output to look like : $55,345.06. I formatted the the fields by right clicking it, selecting the Number Tab and selecting the "Custom Style" option. The sample output showed $55,555.56. But when I ran the report I am getting values like 3456.6700. I am not getting the Dollar prefix and the output is not rounded to 2 decimal places.
Am I missing something? Please let me know
rs
|
|
|
|
|
This is the tipical behavior in a situation like this:
- at design time, you have a number field, and you assign a number format to it.
- at run time, you have not a number value (e.g: it is a string value)
in such a case, format won't apply due to a internal exception handling, I suppose, you have not any signal.
Hope this help
Parsiphal
|
|
|
|
|
Thanks for the reply.
Not sure if I got it . I am new to Crystal Reports.
How do I take care of the exception handling and fix the problem
rs
|
|
|
|
|
Hello guys , i am trying to write smtp server .
there is two problems .
first when i run my server on port 25 it doesn't make clients connect on my pc knowing that this port is free to use on my computer host because i didn't install smtp server that comes in package with IIS6. i didn't install the smtp server that comes with the web server in order to be able to use port 25 but in vain i can't connect clients to send mails in my server on port 25 .
whereas i changed the port number just for testing to 23 and i successfully connect to it using telnet.
second problem:
--------------
i need a good solution to create smtp parser , any body did that before please , please help me please cause i need to create a parser to parse smtp messages in c#
Human knowledge belongs to the world.
|
|
|
|
|
snouto wrote: can't connect clients to send mails in my server on port 25
Does the bind() succeed on 25?
snouto wrote: i need a good solution to create smtp parser
The SMTP protocol is public. You can find documentation for it all over the internet. http://www.google.com/search?hl=en&q=SMTP+RFC&btnG=Search[^]
led mike
|
|
|
|
|
pls suggest me an upload progressbar control(ASP.net, c#) that shows me how much an image has been copied from one location to another.
thanks.
|
|
|
|
|
The rad Controls one is pretty good.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
for that u have to upload that file or image async. mode and keep check the response status...
i will suggest go for AJAX.. or ATLEAST ATLAS...
|
|
|
|
|
Hi,
i hav two classes as following;
class1.cs
----------
namespace NAS
{
// fields
// properties
public class Class1
{
public Class1() {}
}
// member methods
// ...
}
class2.cs
-----------
namespace NAS
{
public class Class2
{
private Class1 class1Obj;
public void Meth()
{
class1Obj = new Class1(); // here i get an error
} // it throws TypeInitializationException
}
}
when i create an object of Class1 under Class2, i m getting
TypeInitializationException.
But i hav referred the class corretly in Reference..
Please help me..
NAS
|
|
|
|
|
If that code is exactly identical to what you are running there is no way that you would get that exception.
Im guessing there is some form of reflection and/or remoting going on somewhere!
|
|
|
|
|
Hi J4amieC,
You are right..!!
i got it.. Actually i m using Threading inside one delegate methods which causes an error.
Thanks.
|
|
|
|
|
hi,
In my form i have a buttons, textBoxes, comboBoxes, labels,....
When i click on of the buttons a listbox that was set invisible is set visible.
It shows some names. The list box is located directly at the right-bottom corner or that button.
What i want is to make the listbox invisible whenever the user clicks the mouse at any location outside the listbox
I tried using the FocusLost event of the listBox, but that didn't work perfectly.
The problem it has is that whenever i click a label or a panel or something that doesn't receive focus, ofcourse the function is not executed.
With the FocusLost i tried to implement the MouseDown event of the form. That also didn't work.
Is there any way to do that without implementing a mouse click event on every label and every panel in the form.
thanks in advance
|
|
|
|
|
private void button1_Click(object sender, EventArgs e)
{
listBox1.Visible = true;
listBox1.Focus();
}
private void listBox1_Leave(object sender, EventArgs e)
{
listBox1.Visible = false;
}
private void WindowsApplication1_Click(object sender, EventArgs e)
{
listBox1.Visible = false;
}
|
|
|
|
|
hi, thanks for you reply but i have some comments
first what is this:
bobsugar222 wrote: private void WindowsApplication1_Click(object sender, EventArgs e)
there is no events for the windows application.
and if you mean by it form1 than i tried it and it didn't work
please clarify.
thanks again
|
|
|
|
|
Sorry, I that was from an earlier test of mine... I didn't think you were able to have the same class name as the parent namespace, so I renamed Form1 to WindowsApplication1... So it was the Form.Click event, yes.
There is no reason for it not to work. If you click the form, the listBox is made invisible. I think the reason your original method didn't work was because you never explicitly set the focus to the ListBox like I did in my Button.Click event handler.
|
|
|
|
|
Assuming the regular events dont offer a solution, here are two more ideas:
- you could use MouseMove and try and detect a mouse move going to leave the listbox.
this probably would involve two borders (two to detect the direction of motion, you
must allow the mouse to enter the listbox !). You may have to allow for some mouse jitter.
And be careful with the scroll bars.
- you could use a timer that periodically checks the mouse is still inside the lisbox
(with Control.MousePosition).
Luc Pattyn
|
|
|
|