|
Sorry,i am a newer of codeproject,i don't know what do you mean :
Guffa wrote: unless you explain why you can't just tell me
i want a notifyicon to active the webbrowser,you can try it.
for example:
your form's location is(300,200),
and have a webbrowser fill the form ,
when you minisize the form to the notifyicon,
and then double-click the notifyicon,
you'will see the webbrowser's location is(0,0),always (0,0)
Thanks
|
|
|
|
|
Which takes us back to the question I asked before:
"What in your opinion is the "right" position for the browser, then?"
---
b { font-weight: normal; }
|
|
|
|
|
Perhaps my English is not very well,i mean i want control the webbrowser's position,but i can't.
ex:if i want webbrowser's location in(200,200),but it always in (0,0)
|
|
|
|
|
In your double-click event handler for notifyIcon1 just set this.Location to wherever you want it positioned onscreen.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
i have try this already,it can't solve my problem
would you run my code and solve my problem already?
wait you reply
|
|
|
|
|
Sorry, I just provide help on the forum where I can. For consultancy I charge £45/hr
Anyway, nobody can just copy your code and run it, were missing your resource file, the project etc etc.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
-- modified at 6:09 Thursday 27th April, 2006
|
|
|
|
|
Original code :
http://delltool.dell.com/email_images/TWBSDQ1WK11_i6400(main).jpg
Encoded code : http://delltool.dell.com/email+AF8-images/TWBSDQ1WK11+AF8-i6400(main).jpg
Ok guys, i really hope someone can help me here.
I have a system that code using c# but the support person is no longer available to help.
I'm still trying to understand the code, but it would be really great if someone can help me out.
The thing is, a html email submited by a user is always encoded by utf7/utf8 (depends on the user's region).
When that email sent out, the html become encoded, this cause a lot trouble where the images path is no longer valid.
Is there any way or "tag" i could put in so that the particular line won't be encode? Or any suggestion please please please.
Thanks in advance!
Regards,
KC
-- modified at 20:52 Wednesday 26th April, 2006
|
|
|
|
|
anyone
|
|
|
|
|
Hi i am having an issue about getting data from list view. I am wanting to get data from a listview and place it in 3 textboxes.
Here is the code i have to place it from the 3 textboxes to the listview but i am wanting to reverse this.
string[] myItems = new string[]
{
textBox1.Text,
textBox2.Text,
textBox3.Text
};
ListViewItem lvi = new ListViewItem(myItems);
listView1.Items.Add(lvi);
thanks for you help in advance
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
To get the data from a list view you use the Items property. For example if you wanted to get the data from the selected item in the list:
int selected = listView1.SelectedItems[0].Index;
textBox1.Text = listView1.Items[selected].Text
textBox2.Text = listView1.Items[selected].SubItems[1].Text;
And so on...
Hope that helps
|
|
|
|
|
Thanks for your help sean. I tried that but i couldn't get it to work. Let me explain what i have going on in this program.
First i have a button that opens an "openFileDialog". After i select the file it puts the fileName in textbox1.text, in textbox2.text it has the filetype, in textbox3.text it has "pending". Then after that i have it set up to move to the listview by the code i posted above.
What i'm wanting to do is to be able to push a button and it will move the filename back from the listview to textbox1.text. Then from there i will be able to do File.Copy(path, path2) ((path would be textbox1.text))
I don't know if you even understand what i'm saying (i think i just confused myself as i'm posting this). As you can tell i am still learning
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
I understand what your trying to do The only way I know how to get the data from the list view is by the way I posted earlier. Thats odd that this is not working for you though Could you post the code that you have written to get the data out of the list view?
|
|
|
|
|
Alright here is what i got going on:
This button does the openfile and puts it in the textboxes:
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog music = new OpenFileDialog();
music.Title = "Add a music file";
music.InitialDirectory = "C:\\";
music.Filter = "Supported File Types|*.mp3,*.wma|All files (*.*)|*.*";
music.FilterIndex = 2;
music.RestoreDirectory = false;
if (music.ShowDialog() == DialogResult.OK)
{
music.Multiselect = true;
foreach (string fileName in music.FileNames)
{
textBox1.Text = fileName;
textBox2.Text = "Audio";
textBox3.Text = "Pending";
}
string[] myItems = new string[]
{
textBox1.Text,
textBox2.Text,
textBox3.Text
};
ListViewItem lvi = new ListViewItem(myItems);
listView1.Items.Add(lvi);
}
}
what i'm wanting to do before i do file.copy is move the filename in the listview back to
textbox1.text (textbox2 and 3 also but it doesn't really matter as of right now)
private void button6_Click(object sender, EventArgs e)
{
string path = textBox1.Text;
string path2 = textBox4.Text;
try
{
File.Copy(path, path2);
this.syncstat.Text = "Status: Files Copied";
}
catch
{
this.syncstat.Text = "Status: Cannot copy into the same folder";
}
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
I'm sorry sean i shoulda read more clearly. this is how i tested it
private void button6_Click(object sender, EventArgs e)
{
int selected = listView1.SelectedItems[0].Index;
textBox1.Text = listView1.Items[selected].Text;
textBox2.Text = listView1.Items[selected].SubItems[1].Text;
textBox3.Text = listView1.Items[selected].SubItems[2].Text;
}
but i couldn't get it to show in the 3 boxes
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
I set up a program with the code you posted and it works fine. So I don't know what else to tell you
|
|
|
|
|
I dont know if this works but I doubt it cause its wierd the way your putting it to a question:
ListViewItem myItems = (ListViewItem) listView1.SelectedItems[0];
textBox1.Text = myItems.Text;
textBox2.Text = myItems.SubItems[0].Text;
textBox3.Text = myItems.SubItems[1].Text;
But thats just my guess :shrug:
|
|
|
|
|
I posted something just earlier regarding a similar issue. This isnt something I would normally have trouble with, as this is pretty basic data handling. However, I have another problem
I am executing the following query:
SELECT * FROM Groups WHERE Group = 1
on this table(Group being the primary key):
Groups:
Group | In_Stock | On_Order_Short | On_Order_Long | Lead_Time
1 13 0 0 30
2 3 0 0 30
3 6 0 0 21
4 7 0 0 21
5 10 0 0 21
6 1 30 70 30
It says there is a syntax error in my WHERE clause... It doesn't look like there is an error to me. Can anyone think of something that would be causing this It seems to only be doing it when I use "Group" in the WHERE clause, any other column it will work fine.
Thanks again for any responses
-- modified at 22:10 Wednesday 26th April, 2006
|
|
|
|
|
Group is a sql keyword. Put braces around it it.
SELECT * FROM Groups WHERE [Group] = 1
|
|
|
|
|
I probably should have known that Thanks a million!
|
|
|
|
|
How Can I drag and drop an image inserted to a win richTextBox control ?
|
|
|
|
|
Hi, I am writing a program in C# that runs several stored procedures and then (through another stored procedure) creates and XML file in SQL. I am needing help getting the C# program to read the file and write it to a fixed length text file. Any help would be greatly appreciated.
|
|
|
|
|
Use the XML parsers which the .NET frame work provides and use streamwriter class for writing the file.
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Can someone tell me why this is returning 0?
<code>
static void Main(string[] args)
{
string dataPath = @"C:\Documents and Settings\Administrator\Desktop\Transimount_Data.MDB";
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.JET.OLEDB.4.0; data source=" + dataPath);
OleDbCommand cmd = new OleDbCommand("SELECT * FROM Mounts WHERE Group_Number = 1", conn);
conn.Open();
int count = cmd.ExecuteNonQuery();
conn.Close();
Console.WriteLine(count);
}</code>
I am using this to get how many records are in Group 1 of a collection of parts.
The datatable in the database currently looks like this:
Mount_Number Carrier_Part_Number Group_Number
KMC84191 72-62039-02 5
KMK64191 72-62039-00 3
KMK71074 72-62030-aa 1
KMK71374 72-62030-bb 1
KMK72073 72-62030-cc 1
KMK72673 72-62030-dd 1
KMM61901 72-62038-03 6
KMM61990 72-62038-05 2
KMM62600 72-62038-04 6
KMM62690 72-62038-02 2
KMM64191 72-62039-01 4
I'm a little tired so I hope this is a stupid mistake
Thanks for any help!
|
|
|
|
|
Hi Sean,
If all you want the the count then just change your SQL to
SELECT COUNT(*) FROM Mounts WHERE Group_Number = 1
HTH
Web design and hosting
http://www.kayess.com.au
|
|
|
|
|
Thanks for the response! I tried it and it still seems to be returning 0.
Even if I change the query to select everything:
SELECT * FROM Mounts
It still seems to say that the number of rows affected is 0.
I'll just use this till I decide to figure out whats wrong:
OleDbCommand cmd = new OleDbCommand("SELECT COUNT(*) FROM Groups", conn);
conn.Open();
OleDbDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
int count = reader[0];
}
conn.Close();
It works at least
|
|
|
|