|
What do you mean? How could I possibly misinterpret your question, when I haven't even interpreted it?
---
b { font-weight: normal; }
|
|
|
|
|
sorry plz answer my question
|
|
|
|
|
http://www.c-sharpcorner.com/Code/2004/April/Transformations05.asp
M[4][3]=1 all the rest 0 using those notations
|
|
|
|
|
To open a file on Listbox Click event,
I used System.Diagnostics.Process.Start(filename)for Windows Application.
It worked fine.
But for Windows Mobile Application I dont have that option.
Please help me.
|
|
|
|
|
|
Hi
I am trying to set SocketOption in Windows Mobile Application, but its throwing Exception.
Please let me know how to set Receive Time out for socket in Windows Mobile VS2005 application.
s=new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
s.Bind(new IPEndPoint(IPAddr, port));
s.Listen(1);
s.SetSocketOption(SocketOptionLevel.Socket,SocketO ptionName.ReceiveTimeout,40000);
Socket actualReader = s.Accept();
|
|
|
|
|
|
which is a better way to represent business entities in my application:xml or object entities? the objects are currently consumed by classes but that will soon become web services. Considerations include performance and which is a better coding practice?
Tilewa
|
|
|
|
|
Hi ,
well guys , i think i have a problem right here
i was programming in vb.net , but i realized that C# is two much better cuz i was enjoying programming on Java so the C# & Java are approximatley the same . but today i was trying to right this line of code :
in vb.net we right :
DataSet.Tables.Rows(0).Items(0)
in C# i tried :
DataSet.Tables.Rows(0).Items(0); but it doesn't work can you tell me why ?
& as a beginner in C# i ask everybody who wanna help me if somebody can give me a link of a C#.Net book i'll be gratefull
Thank you very much for your help
try to be good if you can't be the best
|
|
|
|
|
VB uses parantheses both for method parameters and indices. When you convert code to C#, you have to know if it's a method call or an index that you are using, as C# uses brackets [] for indices.
DataSet.Tables.Rows[0].Items[0]
---
b { font-weight: normal; }
|
|
|
|
|
Mohammed Amine wrote: beginner in C# i ask everybody who wanna help me if somebody can give me a link of a C#.Net
C# books - ever thought of using google (or any other search engine) or even visiting Microsoft for C# tutorials.
Try this link [^]
or perhaps reading Marc Clifton's 2 part series starting with [^] or any of the other beginner tutorials here on Code Project
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Richard A. Abbott wrote: C# books - ever thought of using google (or any other search engine)
Strange how so many people seem never to have heard of Google! Perhaps if he's asked for C# book recommendations, rather than just C# books. Perhaps that's what he meant to say. If so he's excused, as English is not his first language.
Kevin
|
|
|
|
|
Hi , pls can you tell me & explain to me what is difference between the two Objects ?
Thank you
try to be good if you can't be the best
|
|
|
|
|
Read up on the two in the MSDN... there is a whole wealth of knowledge on there
Cheers
|
|
|
|
|
Hi
Im writing a neat little app to fetch raw text content from a website.
However, the website im trying to get data from first sends me to a "bandwidth test site", then redirects me to the site i want data from. How can i handle this in c#?
Code so far;
<br />
String url = "http://www1.nrk.no/nett-tv/bokstav/@";<br />
String content = ""; <br />
HttpWebRequest request=(HttpWebRequest)WebRequest.Create(url); <br />
request.AllowAutoRedirect=true;<br />
request.MaximumAutomaticRedirections=200;<br />
HttpWebResponse request = (HttpWebResponse)myHttpWebRequest.GetResponse(); <br />
<br />
Stream receiveStream = request.GetResponseStream();<br />
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");<br />
<br />
StreamReader readStream = new StreamReader( receiveStream, encode );<br />
content = readStream.ReadToEnd();<br />
<br />
textBox1.Text=content;
This only gets the inital page...so, how to get the redirect page?
madsun
|
|
|
|
|
please help me. how do i simulate a key/key combination press. let's say when an event is trigerred, i want the form to act like i presse the escape key, or alt+f4!
rzvme
|
|
|
|
|
|
i had a look at the cide in the web site and i think i got it but i dont understand 2 things:
1) the alt key isn't in your enum VK
2) your call to the send input method (NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput)); NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput)); etc.) where is the alt key or print screen key in your function call? What would change in the code if , for example, i would want to pres ctrl+g instead of alt+print screen
cheers!
rzvme
|
|
|
|
|
i added a few code lines to press enter before and escape after pressing ctrl+g .right now my code looks like this. The ctrl+g part of the code works fine, but the rest doesn't work at all. what's wrong?
// to press enter
structInput.ki.wVk = (ushort)NativeWIN32.VK.RETURN;
intReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput));
// Key up the actual key-code
structInput.ki.dwFlags = NativeWIN32.KEYEVENTF_KEYUP;
structInput.ki.wVk = (ushort)NativeWIN32.VK.RETURN;//vk;
intReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput));
//Press control Key
structInput.ki.wVk = (ushort)NativeWIN32.VK.CONTROL;
intReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput));
// Key down the actual key-code
structInput.ki.wVk = (ushort)NativeWIN32.VK.G;//vk;
intReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput));
// Key up the actual key-code
structInput.ki.dwFlags = NativeWIN32.KEYEVENTF_KEYUP;
structInput.ki.wVk = (ushort)NativeWIN32.VK.G;//vk;
intReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput));
//Keyup control
structInput.ki.dwFlags = NativeWIN32.KEYEVENTF_KEYUP;
structInput.ki.wVk = (ushort)NativeWIN32.VK.CONTROL;
intReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput));
// to press escape
structInput.ki.wVk = (ushort)NativeWIN32.VK.ESCAPE;
intReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput));
// Key up the actual key-code
structInput.ki.dwFlags = NativeWIN32.KEYEVENTF_KEYUP;
structInput.ki.wVk = (ushort)NativeWIN32.VK.ESCAPE;//vk;
intReturn = NativeWIN32.SendInput((uint)1, ref structInput, Marshal.SizeOf(structInput));
rzvme
|
|
|
|
|
hi
i am use .net 2.0 (vs2005)
i was add printdocument to my form and add printpreviewdialog also and set printpreviewdialog.document to printdocument, but when i compile my app printpreview dialog appear but nothing exist in it (it's empty)..
i have a datagridview in my form with many records .. i want to print datagridview records ..
how to do that and if i want to print multipage how to do ??
thanks ..
|
|
|
|
|
in order to print you need to draw using the graphic object of the eventargs on the onPrint event.
If you're looking for an easy way, you can check out for printablelistview in the site. this listview contains a print() method that prints a listview.
if you'de like to print a form you can check out:
http://www.codeproject.com/dotnet/PrintingFormReport.asp[^]
for printing forms.
hope it helps.
|
|
|
|
|
OK, so I'm working on a little app, and I read about this new settings stuff, so I thought I'd give it a go. I've added a lot of stuff to a settings file and generated a class to read/write it, it looks something like this:
public class UserSettings : ApplicationSettingsBase
{
[UserScopedSetting()]
[DefaultSettingValue("1")]
public double SlideshowSpeed
{
get
{
return (double)(this["SlideshowSpeed"]);
}
set
{
this["SlideshowSpeed"] = value;
}
}
// etc
The help is useless, it seems to mostly be VB only. However, while this seems to work, it always returns the defaults. The properties in the app.config are matching the names in my class, as you can see. I have tried making them ApplicationScoped, as I realise I don't have a user named config file, nor do I see where to find one.
Then I read that Properties.Settings should give me a strongly typed collection of the items in my settings file. No, that plain does NOT work, in any way shape or form, despite all the examples on the web that indicate it should.
Is this stuff broken, or just really poorly documented ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I tried using the Settings classes autogenerated by the IDE and it worked fine. I found that the changed settings are not reflected in the exe.config file, instead, it's stored in the user's profile directory (C:\Documents and Settings\<UserName>\Local Settings\Application Data\....\WindowsApplication1.exe_Url_ivvf3kg5nf2omiqzptjeklawxynwvil5\1.0.0.0\user.config). The code I used to read and modify the values is pretty plain
MessageBox.Show(Properties.Settings.Default.TestSetting);
Properties.Settings.Default.TestSetting = "ItWorks";
Properties.Settings.Default.Save(); Hope this helps.
|
|
|
|
|
OK - how did you get that far ? I've added settings and they are NOT available to by via that sort of code, that's exactly what I tried.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Nothing special, I created a new WinForms project, double clicked Settings.settings on Solution Explorer, added my custom setting (TestSetting ). Built the project and that was it, I got Intellisense recognizing the TestSetting property on Properties.Settings.Default . FWIW, I'm using the Express Edition, not VS .NET 2005.
|
|
|
|