|
|
I have 3 panels in the screen. All the three panels are in a main panel. The three panels are next to each other horizontally and fill the main panel vertically. All these panels have round corners instead of standard sharp edges( I have panelExt class inherited from standard panel class). Now I need to have a splitter between 1st and 2nd panels and also between 2nd and 3rd. I think because of having the round edges , when I say left and right panels dock propery to left and right respectively, these panels are shifted down by around 40 pixels and then docked. But I want them to fill the main panel vertically. Is there any work around for this?
If there is no solution to this, please suggest any custom splitter which does standard splitter job except for non docked controls.
Thanks,
VPMahank.
|
|
|
|
|
I want to build an icon on the desktop that will load a program that I am working on, which will display a loading page. Any ideas?
|
|
|
|
|
Right-Click on the Desktop and click New, then Shortcut?
Or are you asking how to put a splash screen in your app? Just search, under The Code Project banner at the top of every page, the articles for "splash". There are plenty of examples.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am using this code for check webbrowser's activity
while (wbr.ReadyState != WebBrowserReadyState.Complete)<br />
{<br />
Application.DoEvents();<br />
}
But when I am using
heForm.InvokeMember("submit");
which submits a form on a webpage, ReadyState will not be activated or changed. Also the IsBusy flag doesn't change.
|
|
|
|
|
I wouldn't do that. Application.DoEvents is terribly inefficient, causes many allocations and can result in unexpected scenarios.
Instead, just listen for the wbr.Navigating event, which will tell you when the browser's busy. I believe there's a DocumentCompleted event to tell you when the document is fully loaded.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
Hi Judah,
thx for reply and this tip.
But additionally this won't work with InvokeMember. After firing this code line the application doesn't recognize browser activity.
|
|
|
|
|
Not sure if this is what you are looking for. The following example shows some of my code I've used where I have a timer event handler function call this piece of code every second. Without the if statement this would cause problems because the page doesn't always load in the browser at the same speed - it will make the program stop responding. But with the if statement this checks and makes sure the WebBrowser object is not loading anything at the moment and if it is, it doesn't execute the code (doesn't load anything else - until the statement is true):
if (webBrowser1.IsBusy == false && webBrowser1.IsOffline == false)
{
webBrowser1.Url = new Uri(strUrl);
}
Let me know if I can help further.
|
|
|
|
|
Hi peshkunta,
After InvokeMember (new in .NET Framework 2.0) ->
IsBusy = false
IsOffline = false
that's the problem (tested with your code above as check process)
InvokeMember fire a method of the selected HTML element. I loaded a FORM tag and after submitting it, a new webpage is loaded again.
But if I am in debugging mode and go to the line after InvokeMember I wait a moment and then it works, because the browser don't fire the flag immediately.
|
|
|
|
|
???
i need to capture these events as i have a statusbar on my app, and when i maximize my app it retains the sizing grip and if u click-grab it moves through out the page...so i need to capture the maximize/minimize events to beable to hide/unhide the sizing grip...unless there is a better option out there...
|
|
|
|
|
|
thx
it works beautifully
thx again
|
|
|
|
|
I need to allow an administrator to change login passwords for my application but am having problems with the syntax for the UPDATE statement. Specifically, I want to use Data Commands rather than working through a data set to make the updates because I will only need to do two operations with the MS Access database-verifying the old password/user id combo and updating the password to a new one. It seems to me that the UPDATE statement requires paramaters, but I am unsure of the syntax. Any help would be appreciated. Thanks.
|
|
|
|
|
The syntax for the SQL command you will need is easy:
UPDATE [table] SET [field]=[value],[field]=value,.. WHERE [filterexpression]
Replace the [...] for the actual names and values.
For the rest you need a simple piece of code like this:
OleDbConnection connection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=mydb.mdb");
OleDbCommand cmd = new OleDbCommand(query,connection);
try {
connection.Open();
cmd.ExecuteNonQuery();
}
catch {
}
finally {
connection.Close();
}
Good luck.
WM.
What about weapons of mass-construction?
|
|
|
|
|
If you were working thru a dataset you would not have to know any SQL statements after populating the dataset.
Using the dataset is simple
1> create and fill the dataset with dataAdapter.
2> create new SQL command builder associated with dataAdapter
3> get new row from DataTable edit row(record) - (user/password)
4> simply update the database thru the adapter
Besides from initially populating the dataset no SQL involved
|
|
|
|
|
Hi, can someone help me...??
I have data in a Access-database, i add the data to a arrayList and show the data from the arrayList in a dataGridView. All that works perfect.
Now i want to add data to the arrayList (and then to the Access-database).
I want to use the dataGridView, so i clear it by: dataGridView1.Rows.Clear();
Then i would like to add data to the empty rows and press a Save-button to save the data.
I have tried something like this:
foreach (DataGridViewRow gridRow in dataGridView1.Rows)
{
KampListe.Add(new Kamp(Convert.ToString(gridRow["kampnr"]), Convert.ToString(gridRow["Idrætsgren"]), Convert.ToString(gridRow["Turnering"]), Convert.ToString(gridRow["Dato og Tid"])));
}
but it will not work...., what is the problem...???
Helge
|
|
|
|
|
ArrayList listing = new ArrayList();
int i;
for (i=0;i<=dataGridView1.Rows.Count -1;i++)
{
listing.Add(i.ToString());
}
check this link too
http://blog.kevinsmet.be/PermaLink,guid,22de02a3-2fc8-482a-99f9-c5f293a41c79.aspx
|
|
|
|
|
Hi again, i can still not solve my problem...
In my dataGridView1 i have 9 coloumns, how do i get each cells value in all 9 coloumns...???
Helge
|
|
|
|
|
ArrayList listing = new ArrayList();
int i;
for ( i=0;i<=this.dataSet11.Tables[0].Rows.Count - 1;i++)
{
listing.Add(dataSet11.Tables[0].Rows[i]["column1"].ToString()); listing.Add(dataSet11.Tables[0].Rows[i]["column2"].ToString()); listing.Add(dataSet11.Tables[0].Rows[i]["column3"].ToString()); listing.Add(dataSet11.Tables[0].Rows[i]["column4"].ToString());
listing.Add(dataSet11.Tables[0].Rows[i]["column5"].ToString());
listing.Add(dataSet11.Tables[0].Rows[i]["column6"].ToString());
listing.Add(dataSet11.Tables[0].Rows[i]["column7"].ToString());
listing.Add(dataSet11.Tables[0].Rows[i]["column8"].ToString());
listing.Add(dataSet11.Tables[0].Rows[i]["column9"].ToString());
}
i have done this in windows application, but i havtn free time to write in web app but i hope helps as clue...
|
|
|
|
|
Hello.
How can I fire up a button event without pressing the button?
Thank you
|
|
|
|
|
private void button1_Click(object sender, System.EventArgs e)
{
//Do some code
}
private void timer1_Tick(object sender, System.EventArgs e)
{
this.button1_Click(this,e);
}
ur code which is written in click event of button should execute in everey seconds,minutes,hours,... by timer whithout clicking button
but first set property to true of timer in design view or in form1_load
example :
timer1.enabled=true;
hope helps
|
|
|
|
|
You can event try calling button1.PerformClick() method.
Thanks,
VPMahank.
|
|
|
|
|
Something like
<br />
private byte[] getImageBytes()<br />
{<br />
byte[] buffer = null;<br />
FileStream templateStream = File.Open(@"C:\MyImage.gif", FileMode.Open);<br />
buffer = new byte[templateStream.Length];<br />
templateStream.Write(buffer, 0, (int)templateStream.Length);<br />
templateStream = null;<br />
return buffer;<br />
}<br />
The code runs but I only get a buffer containing zero's
Thanks
Thomas
|
|
|
|
|
Try flushing the file stream (and also, you MUST dispose the FileStream as well). Setting it to null is pointless; you only need to do that in Java.
private byte[] getImageBytes()
{
byte[] buffer = new byte[templateStream.Length];
using(FileStream templateStream = File.Open(@"C:\MyImage.gif", FileMode.Open))
{
templateStream.Write(buffer, 0, (int)templateStream.Length);
templateStream.Flush();
}
return buffer;
}
Please note that if you're using the latest version of the .NET framework, you can use the File.ReadAllBytes method, which is more efficient and requires only a single line of code:
private byte[] getImageBytes()
{
return File.ReadAllBytes(@"c:\MyImage.gif");
}
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|