|
There is such option available. U mean to say Ispostback Option. If i give the Ispostback option. When the page refresh that will also run.
Regards,
A Jabeer Ali
|
|
|
|
|
Hi,
Im trying to print a data grid view. I currently have 2 methods, one converts the control to an image (DrawToBitmap) and the other goes through the data rows and draws strings.
The problem i'm having is when converting the control to a bitmap, since it only displays what is on the screen, and not the whole control.
Bitmap dataGridViewImage = new Bitmap(dataGridView.Width, dataGridView.Height);<br />
Rectangle dataGridRects = new Rectangle(0, 0, dataGridView.Width, dataGridView.Height);<br />
dataGridView.DrawToBitmap(dataGridViewImage, dataGridRects);
The above code is what i do to convert it to an image. I played around with it abit, and found that if i changed the dataGridView.Width/Height values, it would actually display whats not on the screen. However, since i never know how big the
dataGridView is, how would get the correct size?
Any ideas/anyone had this before?
Regards,
Gareth.
|
|
|
|
|
does any1 know how 2 capture still image from webcam and then paint that image file on the form using C#....... Any article u recommend with more description so that I can get it...........
THANX 4 ur help in advance.........
|
|
|
|
|
Hi,
Have a Scenario like below .
In my prog. there's Async. calls to listen messages from network. Whenever any error occurs i have to pop-up a message window to user. I used Raise event whenever i got error. Raise event calls a Notification manager delegate which will create the notification form and pop up. initially this window greyed out. But added DoEvents()soon after creating window solved the problem.Now i'm able to click on the cancel button in the window. That is control is not transferred to notification window. where as i can still work with other opened windows.
How do i pass control focus to notifaction message box.
BY
BAIJUMAX
"Things are simple by nature ; oh hooo ; Are we making things complex"
|
|
|
|
|
Hello everbody!
Just looked threw my project and found code which I don't like at all.
I'm having an instance of DataRow and go threw it in a loop.
There I need to store the data for example in a double array.
This is what I do now:
if (myrow[x].GetType() == typeof(System.Double))
{
doublearray[x]= (double)myrow[x];
}
For reference types I would use the "as" operator!
Is there a nicer way to do this?
Thanks for suggestions!
All the best,
Martin
|
|
|
|
|
if (myrow[x] is System.Double)
(I rarely use as ; I usually just cast.)
|
|
|
|
|
Hello,
PIEBALDconsult wrote: if (myrow[x] is System.Double)
Does this compile?
I thought it's (is and as) only working for reference type.
All the best,
Martin
|
|
|
|
|
|
Hello,
Sorry!
Just tested it and found out that is also works with valuy types, but as only works with reference types.
All the best,
Martin
|
|
|
|
|
It's better to try something even if you think it won't work.
|
|
|
|
|
hi everybody
how could i disable the movement of form window.when i put the mouse pointer on taskbar and drag it the form window also moves with it and i want to disable it.Give some clue. if possible send some c# code.
|
|
|
|
|
private void Form1_Move(object sender, EventArgs e)<br />
{<br />
int left = 15, top = 15;<br />
this.Left = left;<br />
this.Top = top;<br />
}
-------------------
You can go a long way with a smile. You can go a lot farther with a smile and a gun. (C) Al Capone
|
|
|
|
|
Why do you post this question over and over again??
|
|
|
|
|
Hello,
Maybe the "Locked" property helps you here!
All then best,
Martin
|
|
|
|
|
Hello All
I had used "WebRequestMethods.Ftp.ListDirectory"
but it returns a string contains html format
I thought it returns a string that contains files names
how we can resolve that?
|
|
|
|
|
Can you post an output of what you are getting back?
It is supposed to be a CRLF terminated string of files and there should not be any HTML returned.
|
|
|
|
|
SqlConnection conn = new SqlConnection((ConfigurationManager.ConnectionStrings["HASDBConnectionString1"]).ToString());
hi the above code is what i used in my asp.net to get the connection string from the web.config
now i am trying to get the connection string for my c# window application using visual studio 2005 project
but it sseems the same code dont work can any one show me how?
|
|
|
|
|
Check System.Configuration namespace.
alternatively
My suggestion is to create custom ConfigurationManager sigleton class , initialize at the startup.
BAIJUMAX
"Coolest thing on earth is...? Guess what? as per my knowledge 'ICE' , anythingelse pl's let me know "
|
|
|
|
|
In desktop application u should use
System.Configuration.ConfigurationSettings.AppSettings.Get("ElementName")
|
|
|
|
|
<configuration>
<add name="HASDBConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\HASDB.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</configuration>
hi the above is the part of the configuration file that i am trying to get..
the connection string part.
i tried your method but it doesnt seems to work could you please try to help me again pls?
|
|
|
|
|
<configuration>
<appsettings>
<add key="Connection string" value="server=machinename;database=dbname;">
<add key="Server" value="machinename">
<add key="Database" value="dbname">
you have to modify your app.config file to look like above.
then u can use what i said earlier..
try it and if u still not been able to do it.
then i'll make a sample for u.
|
|
|
|
|
yes an sample would be nice thx u
as my situation is that i am trying to use the connection string in my app.config
however i only know how to do it in an window application
thx in advance
|
|
|
|
|
hello,
i have an MDI form that called FORM1
an I have a child form FORM2
I wrote:
form2.MDIPerent = form1
it works but in the side i get scroll bars
how I get over the scroll bars?
|
|
|
|
|
Hello,
Have you set "AutoScroll" property to "true"?
All the best,
Martin
|
|
|
|
|
if u put in auto scroll = true
the form couldn't be aMDI CONTAINER
|
|
|
|