|
|
Hello everyone,
In my window application I have a ListView which is populated with the list of websites. I would like to be able to load these website once the item in the ListView is clicked. I have set everying reagarding the ListView but I have no clue how to load the website once the item is clicked.
Can someone be kind enough to tell me what code do I need to use for this? I have no clue what so ever for doing so. I have load at the linklable component, but that is not what I am looking for.
Thank you so much and have a great day.
Khoramdin
|
|
|
|
|
One possibility is to use the Process class.
using System.Diagnostics;
Process myProcess = new Process();
Process.Start("IExplore.exe", "www.codeproject.com");
Hope that helps.
Ben
|
|
|
|
|
Hello Ben,
thanx very much for all your help. you saved mt life, mate. There is one question which I have regarding the website loading. this is exactly what I need but this process opens the website in a New Explorer window. Is there any way I can open the website in a designated area in my window application?
thanx alot for your help and have a great day.
Khoramdin
|
|
|
|
|
There is a web broswer control that you can add to your form. If you are using .net 2.0 you can use the WebBrowser control.
private WebBrowser webBrowser1;
this.webBrowser1.Navigate("http://www.microsoft.com");
There is also a control in .net 1.1. Let me know if you are interested in that one.
Hope that helps.
Ben
|
|
|
|
|
Hello Ben,
Thanx for your help and all the information. I think I am going to use the WebBrowser control available in NET 2.
I was wondering for if you do recal the control available in NET 1.1 Framework from top of your help just for the information so at least I know about it?
Once again, thank you very much and have a great day.
Khoramdin
|
|
|
|
|
It is called AxSHDocVw.AxWebBrowser. It is pretty similar to the .net 2.0 one, but it is an activeX control.
Hope that helps.
Ben
|
|
|
|
|
Hello everyone,
I have a windows application with a tabControl. The tabControl has got 4 pages. I have a click event which I would like as the result the 4th page of my tabControl with index of "Zero" to be appeared just as if I have clicked on the Tab of the 4th page. Currently I can only get into the first page of the cabControl using the following code:
this.tabControl1.SelectedIndex = 0;
Could you tell me how I can make it jump to the page4 of the tab control?
Thank you so much for your help and have a great day.
khoramdin
-- modified at 19:59 Thursday 8th March, 2007
|
|
|
|
|
It is a zero based index. So page four would be 3:
this.tabControl1.SelectedIndex = 3;
Ben
|
|
|
|
|
I’m using webbrowser control in an application I’m developing. It works great accept the view will not update while I’m executing my application. When my application halts the web page imminently updates.
I tried using Application.DoEvents(). It worked with a stand-alone application, but when I integrated into my main application, it caused my code to re-enter at the call point to the webbrowser method. I have tried hard to get it to work without success.
So is there are command or set of C# commands to get a webbrowser object to continue? Paint? Generally update while I’m working? Without DoEvents?
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Hi Glenn,
Why not try to put the Webpage loading code which sould be something like
this.BrowerControl.Naligate("https://test.test.com")
in the different thread.
Neo
|
|
|
|
|
I need to create a text file that will be tabular. I am not sure on how to accomplish this. I am attaching an example of the output file. You will see what I am talking about and what I am trying to accomplish.
I am using StreamWriter.Writeline(text) at the moment.
Could someone point me in the right direction?
Dang no attachments. Here is the file output:
<br />
St# Cash Check Credit<br />
1 5543.66 416.67 681.86<br />
2 2763.00 316.62 293.65<br />
3 3097.31 344.00 194.81<br />
4 2099.60 301.80 243.10<br />
5 2935.00 797.51 367.87<br />
6 2203.00 361.31 647.81<br />
7 6245.29 0 300.77<br /> (The message builder is ignoring spaces....)
As you can a 0 goofs it up, and when St# becomes 2 digits that pushes the whole row out one more space to the right.
And here's the actual code:
strTextLine = read["IncStoreNum"] + " " + read["IncCash"] + " " + read["IncCheck"] + " " + read["IncCC"];
w.WriteLine(strTextLine);
Thanx in advance!
Jude
|
|
|
|
|
C# has some nice pading functions, so I guess would suggestion pad some spaces to a set width.
So the code is like var.ToString().PadLeft(4) for the St# column unless you are planning on going over 9999 then pad 5 or whatever. You get the idea.
Hope that helps.
Ben
|
|
|
|
|
You could use something like
String.Format("{0,3 }", read["IncCash"].ToString());
only two letters away from being an asset
|
|
|
|
|
Thanx for the replies! I will try that!
Jude
|
|
|
|
|
Troops,
We have a Windows Forms C# app that is getting the following error on startup. Only one user is having this issue in our new release... rolling back to the previous version works fine. I skipped over some of the stack trace.
An exception occurred
Cannot executa a program. ...\v1.1.4322\csc.exe ...
... ... \Temp\mmjry42r.cmdline
at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated( ... )
...
...
at System.Xml.Serialization.Compiler.Compile()
...
Cng.Tlc.LoggingService.LoggingService..ctor()
...
This happens right upon startup when it runs Main() and builds all the controls, including a web service class used for logging data about our application. This LoggingService is being established as it goes thru the stack trace above.
This user does have MSXML 4 SP2 installed on their machine and the other users at that location do not. However, I have that same SP on my machine and I'm fine.
We tried uninstalling the .Net Framework, reinstalling and there's no change. I don't see much on this topic... others are related to .ASP and IIS from what I've seen.
Any ideas?
Thanks,
Stretch
|
|
|
|
|
Hi,
I send emails using the SmtpClient of namespace System.Net.Mail ...
Is there a way to see if the mailmessage was received or an non-delivered message
was sent back to me?
That is, process a mailbox from C# code supplied with credentials ?
The only way i know know is to use my mozilla thunderbird client to receive non-delivered mails
and that's 2-3 steps more than i want to use.. I want this included in my program!
Are there anyone that knows a way to see if non-delivered messages are sent back to my mailbox using any namespace?
Thanks from Daniel, Sweden.
|
|
|
|
|
It would be easier to view the mails on the mail server via imap or pop and search the texts for key text. The returned text is always different dependant on the server or smtp server that rejects it.
Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture)
http:\\www.frankkerrigan.com
|
|
|
|
|
IEnumIDList folderEnum = (IEnumIDList)Marshal.GetTypedObjectForIUnknown(folderEnumPtr, typeof(IEnumIDList));
while (folderEnum.Next(1, out pidlSubItem, out celtFetched) == ShellAPI.S_OK && celtFetched == 1)
{
}
The cycle "while" execute several time ok but suddenly raises exception "First-chance exception at 0x7c81eb33 in Server.exe: 0x80004002 Not supported"
Info about Studio:
Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Professional
Whats wrong to my code?
|
|
|
|
|
Hi all,
I'm not sure if that is the write word
i want to have a range of charters ( like some ones name)
and be able to go through every possiblity of each Charter
I am trying to write code that will go through each
a
b
c
aa
ab
ac
aaa
aab
aac
aba
abb
abc
aca
and so on
but only with the Char I parse into a string
Anyone got any ideas?
|
|
|
|
|
Google necklace generating algorithms. Personally I like n-ary trees for this type of algorithm where the data structure itself generates the necklace. Check out my bridges of konigsburg article to steal an tree structure that will do it.
File Not Found
|
|
|
|
|
Put the characters into an array and then make all the indexe permutations.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
could you explain a little more?
|
|
|
|
|
It's not difficult but you have to formulate the question in a more accurate way, i.e. I think that the sequence you gave it's not correct (or I cannot guess correctly what do you want to do...)
I mean, you include
aa
ab
ac
but not
bb
bc
and
cc
that, I think, are legal sequences.
Moreover, do you consider
ba and
ab the same sequence or not?
Finally, I repeat, be more accurate in your request (or explain me what i cannot understand...)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
you are correct sorry it slipped my mind when i was giving the example
a
b
c
aa
ab
ac
ba
bb
bc
ca
cb
cc
aaa
aab
aac
aba
and so on
If it were numbers it would just be X=x+1 but in strings i cant figure it out.
|
|
|
|