|
|
hi verma,
we r sailing in the same boat. i am also new to C#.
it is better to do some sample appliations which are related to real time applications.
and work practically each and every concept of C#.
already u r into C++ (into Object oriented Programming), so u should not worry much about C#.
i saw one site,and felt to good for one who is new to C#. it is csharp-station.com.go thru the each and every lession in the Tutorial. and work on their samples.
this site(i mean www.codeproject.com) is also very usefll for us. in
General C# sections, u will find C# Samples. they are really good to learn C# coding standards.
all the best,
rahi
|
|
|
|
|
hi all,
i want to ask a few questions about controlling internet explorer with C#:
* let's assume i am using IE7:
1. (if my browser is open)
- how can i change the first tab's url ? (assume there are a few open tabs)
- how can i add a new tab & open a url ?
2. (if my browser is not open)
- how can i start ie7 with and url ?
* let's assume i am using an older version of IE
1. (if there are a few open IEs)
- how can i change the first IE's (first one on the TaskBar) url ?
- how can i open a new IE with a url ?
thanks in advance, bye.
MFA
|
|
|
|
|
u acn try
System.Diagnostics.Process.Start("http://www.msn.com");
it will open the site in default browser of ur system.
rahul
|
|
|
|
|
HI,
Use this.
process1.StartInfo.FileName="iexplore";
process1.StartInfo.Arguments="NishuSoft.com";
process1.Start();
Which browser you want to use..give its exe file path.....Aand try....
<marquee>nishu
|
|
|
|
|
i have 4 projects/applications and 1 project/application containig a form with 4 panels. when a user click one of these panels the program is supposed to run one of the other 4 programs. how do i do this, presuming on the targetr computer all three will be installed??
rzvme
|
|
|
|
|
u can use
System.Diagnostics.Process.Start("full path with application name");
rahul
|
|
|
|
|
so i'm supposed to knoe where the user installed the projects?!
rzvme
|
|
|
|
|
|
You can also at a "Add Application" option on your program. Let the user find and add the items themselves.
|
|
|
|
|
i think following way colud help you
make your every project a user control and embed them on the panels.and on of click event on every panel you can run your program.
sameer
|
|
|
|
|
suppose my combo is populated and i want when i will press down arrow key then the list of my combo will be shown.pls help with sample code.
tbhattacharjee
|
|
|
|
|
if focus is in ComboBox.then write following code on the key down event of the combobox
if(e.Keycode==Keys.Down)<br />
{<br />
myComboBox.DroppedDown =true;<br />
}
sameer
|
|
|
|
|
Hi
i want to search for a specific folder (the folder will have a unique name and will not reside in more than one partition) in all the partitions of hard disk. What is the simplest way to do that. Can anyone suggest please.
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
u can try out FolderBrowserDialog tool.
rahul
|
|
|
|
|
Create a directory with a formatted GUID as the name.
|
|
|
|
|
can you please explain your answer a little more with some sample code?
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
i mean, i can create a directory, but don't know how to create a directory with a formatted GUID as the name.
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
System.Guid.NewGuid().ToString()
|
|
|
|
|
Does any 1 have any idea how to join a m/c to a domain to which it is physically connected?
Sankalp Verma
|
|
|
|
|
Hi there,
I am trying develope an internet chat application in C#.Net using Visual Studio 2005.
I am struggling succeeding in this and basically ended up creating a network chat app.
What i want to do is create an app that direct chats over the internet (like on a network chat). only my friend and myself will use it so no rooms or anything is needed its just a plain direct chat over the net.peer 2 peer like.
I know the using of sockets or remoting but everywhere i look it all just goes down to an tcp/ip chat.
Could anyone please help me with this or direct me somewhere where i can get help please?
Kind Regards
Deon
|
|
|
|
|
Tell me 1 thing buddy are you in a private n/w or on the public n/w?
If youa re in a public n/w thn it should not b a issue.
|
|
|
|
|
Im in a private network and my friend will be in a public network.
hmmmm i guess firewalls will be a problem ouch.
any suggestions maybe?
im so confused and i know this is not alot of code it only has to be the most simplest
app which sends text like p2p.
i have some code i you want to take a look at it and maybe direct me from there.
Thanks alot
|
|
|
|
|
If neither of you has a static ip then you'll need a web service to keep track of the ip-s for peer discovery, even if the app will be used by only the two of you.
|
|
|
|
|
yea you right but my friend will have a static ip i think and with me well im using a netowrk ip address to connect to the internet.
funny actually i dont know lol
well for now lets say both of us have a static ip.
here is the code i have so far what do you guys think?
ok this is written so for now you chat with yourself. the strfriend will be the ip of my friend obviously lol.
<br />
using System;<br />
using System.Windows.Forms;<br />
using System.Drawing;<br />
using System.Net.Sockets;<br />
using System.Threading;<br />
using System.IO;<br />
using System.ComponentModel;<br />
using System.Net;<br />
using System.Drawing.Drawing2D;<br />
<br />
namespace MyTalk<br />
{<br />
public partial class Chat : Form<br />
{<br />
private TcpClient objClient;<br />
private Thread thdListener;<br />
private TcpListener objListener;<br />
private string strFriend;<br />
private string strMe;<br />
<br />
IPAddress ipadd;<br />
public delegate void Invoker(String t);<br />
<br />
public Chat()<br />
{<br />
strFriend = "10.0.1.166";<br />
ipadd = Dns.GetHostEntry(strFriend).AddressList[0];<br />
strMe = "Me";<br />
<br />
thdListener = new Thread(new ThreadStart(this.Listen));<br />
thdListener.Start();<br />
<br />
InitializeComponent();<br />
}<br />
<br />
private void Listen()<br />
{<br />
string strTemp = "";<br />
objListener = new TcpListener(ipadd,1000);<br />
objListener.Start();<br />
do<br />
{<br />
TcpClient objClient = objListener.AcceptTcpClient();<br />
StreamReader objReader = new StreamReader(objClient.GetStream());<br />
while (objReader.Peek() != -1)<br />
{<br />
strTemp += Convert.ToChar(objReader.Read()).ToString();<br />
}<br />
object[] objParams = new object[] { strTemp };<br />
strTemp = "";<br />
this.Invoke(new Invoker(this.ShowMessage), objParams);<br />
} while (true != false);<br />
}<br />
<br />
private void ShowMessage(String t)<br />
{<br />
rtbMessage.Text += strFriend + ": " + t + "\n";<br />
}<br />
<br />
private void btExit_Click(object sender, EventArgs e)<br />
{<br />
objListener.Stop();<br />
Application.Exit();<br />
Environment.Exit(0); <br />
}<br />
<br />
private void btSend_Click(object sender, EventArgs e)<br />
{<br />
rtbMessage.Text += strMe + ": " + rtbType.Text + "\n";<br />
objClient = new TcpClient(strFriend, 1002);<br />
StreamWriter w = new StreamWriter(objClient.GetStream());<br />
w.Write(rtbType.Text + "\n");<br />
w.Flush();<br />
objClient.Close();<br />
rtbType.Text = ""; <br />
}<br />
|
|
|
|