|
|
What's up? I have two questions for you.
1) Why are you replying to a two and a half year old thread?
2) Why do you think I would be interested in VB code?
|
|
|
|
|
Trying to write a program that allows me to read the Product Key for windows XP.
Does anybody knows where this key is stored in the registry?
any help is greatly appreciated
|
|
|
|
|
|
thank you Guffa but I am not looking for somebody else utility.
I asked if anybody knows where the key is so I can write my own app.
|
|
|
|
|
Hi !
I am using this simple : float.Parse(MyString); where MyString is "3.4" and it works fine .. on machines with language settings set to english (!!) I have tested on a machine with french settings and I get an exception (!geee!)
Unfortunately I can not change the file I parse depending on the local machine .. Is there a way I can change the language set used by the float.parsing ?
Cheers !
Pierre
|
|
|
|
|
Use a format provider with the Parse method. To get a format provider with a period as decimal separator, you can use InvariantCulture:
float.Parse(myString, CultureInfo.InvariantCulture)
---
b { font-weight: normal; }
|
|
|
|
|
Does anyone know how or know of a website that demonstrates how to send sms messages via asp.net code without using an expensive gateway such as simplewire (they cost about 1,400/month)?
I'm not looking to bill through the cell phone (via premium SMS), I'm only looking to send out SMS text messages to users who have opted in to receive our local news & weather messages but I don't know of an affordable way to do so. At most, I would probably have no more than 10,000 SMS messages sent out per month (and even that's optimistic).
Thanks in advance.
-Goalie35
|
|
|
|
|
How can I scale up and down large(10,000*10,000) 1 bit Tiff G4 images. So far I have played with GDI+ transformations and interpolation modes but none helps quick scaling without loosing quality.It takes it more than 1 second to display such image after zoomin/zoomout.
While, Microsoft Document Imaging and IrfanView scales the same images smoothly and in less than half a second.I am willing to explore about image processing techniques, any hints/links about the same??
Thanks,
MaulikCE
|
|
|
|
|
I have to make an application to write and read structures! I have to do it in c#! I know to do this in c/c++ but i have no idea how to do it in c#!
for example, my structure is like this:
(in C)
struct Info
{
int password;
string name;
etc.
}X;
( i used File *f, fopen etc..)
how to write this into a file (*.dat) and the read them...in c#
I found this example:
http://www.codeproject.com/useritems/readwritestructstobinfile.asp
but it seems to be difficult and there are some saying that is a terrible idea!
|
|
|
|
|
Hi,
add this using statement to your code:
<br />
using System.Runtime.Serialization.Formatters.Binary;<br />
use this code to read the file:
<br />
MyClass MyObject = null;<br />
BinaryFormatter binReader = new BinaryFormatter();<br />
System.IO.Stream readStream = File.Open("c:\blah.dat", FileMode.Open);<br />
MyObject = (MyClass)binReader.Deserialize(readStream);<br />
readStream.Close();<br />
and this one to write it:
<br />
MyClass MyObject = new MyClass();<br />
<br />
BinaryFormatter binWriter = new BinaryFormatter();<br />
System.IO.Stream writeStream = File.Open("c:\blah.dat", FileMode.Create);<br />
binWriter.Serialize(writeStream, MyObject);<br />
writeStream.Close();<br />
and this is the class (or struct) you want to write to a file...
<br />
[Serializable]<br />
public class MyClass<br />
{<br />
string SomeString = null;<br />
int SomeInteger = 0;<br />
string AnotherString = null;<br />
}<br />
|
|
|
|
|
Hi everyone,
I have a new and wonderful problem I am using VS2003 and its good working but now I want to create a C# project but It isnt on File->project(when you want to start Visual studio on first page its show that) I can open exist projects(C#) but C# option isnt on project type you can see Visual Basic and Visual C++ and.. but its not show I guess maybe I remove it so I try to add/remove of install cd but again I wonderful on the CD I click on Add/Remove but in front of C# option isnt a mark button(checkbox) ("Select items to install:" all options are good except Visual C#.Net and Visual J#.Net)(I didnt this problem already)
Can you help me
Thanks
|
|
|
|
|
Have you checked out the ListBox.MultiColumn property?
---
b { font-weight: normal; }
|
|
|
|
|
It doesn't matter, i figured out how to do it with a list view, i tried to delete/edit the post a few times, but codeproject keeps crashing my browser >
Whta happens is, i come here, i try to do something (delete for example) the next page starts to load, the current browser window goes extremely slowly, all new windows go exrtremely slowly. The rest of the computer and any other previously open browser windows work fine though.
|
|
|
|
|
If you're having problems, the suggestions forum is the proper place to discus them.
|
|
|
|
|
When the page loads the dropdownlists do not display the date I want unless I press a button on the page and the page postsback to the server. I would like that date to be displayed once the page loads. Any hints?
if (Page.IsPostBack == false)
{
DateTime Yest = DateTime.Today.AddDays(-1);
string YestMonth = Yest.ToString("MMMM").Trim();
string YestDay = Yest.ToString("dd").Trim();
string YestYear = Yest.ToString("yyyy").Trim();
DropDownList2.SelectedItem.Value = YestYear.ToString();
DropDownList3.SelectedItem.Value = YestMonth.ToString();
DropDownList4.SelectedItem.Value = YestDay.ToString();
}
|
|
|
|
|
I do not see where you are inserting the values into the DropDownLists. You can not have a selected Item that does not exist in the DropDownList control. Below is the code I created, using some of your code from your question. I hope it helps.
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DateTime Yest = DateTime.Today.AddDays(-1);
string YestMonth = Yest.ToString("MMMM").Trim();
string YestDay = Yest.ToString("dd").Trim();
string YestYear = Yest.ToString("yyyy").Trim();
ddlMain.Items.Insert(0, YestMonth);
ddlMain.SelectedItem.Value = YestYear.ToString();
}
}
|
|
|
|
|
The items are already inserted in design view. I am just trying to select one of those items. If I insert an item the way you want me to do it I will see duplicates of the same item in the dropdown list.
|
|
|
|
|
Not sure about dropdownlist on t'internet, but the equivelant is a combobax right?
Well even if its not
this.combobox1.SelectedItemValue = some_kinda_string;
doesn't work
this.combobox1.SelectedItem = some_kinda_string;
does work, so i guess that you want to be usin'
DropDownList2.SelectedItem = YestYear.ToString();<br />
DropDownList3.SelectedItem = YestMonth.ToString();<br />
DropDownList4.SelectedItem = YestDay.ToString();
If not, im all out of ideas.
|
|
|
|
|
Ok so it is the exact same thing minus the Insert property.
|
|
|
|
|
i have 2 forms Form1.cs and Form2.cs
i have generated mymodule.netmodule of these two using csc
now i want to generate exe from this module
i am using this command
al c:\mymodule.netmodule /t:exe /out:myexe.exe /main:Form1.Main
i have kept the form1 in the same directory where mymodule.netmodule is
(Form1 contains the main method )
but this give me the error
error AL1037: Unable to find the entry point method
'Form1.main'
|
|
|
|
|
hi.
i wanna execute a PHP file on a remote server in C# and retreive some data from that PHP file! beacuse MySQL server port is closed for remote login.
how can i do this?
maybe System.Net.WebClient class could be useful?
thanks
asamay
-- modified at 13:01 Tuesday 10th October, 2006
|
|
|
|
|
ok you did not google for it as i suggested you to do
WebClient myclient = new WebClient();
FileStream mystream = myclient.OpenRead("http://yourwebpage.net");
while (mystream.Peek() > -1)
{
string line = mystream.ReadLine();
}
i guess/hope this code retrieves the data of the specified page and reads it line by line until end of file.
please try to google for it the next time because there are so many existing pages and explanations about it... i know you even did not try to find something useful about it and thats kinda annoying and makes me not respond to posts like this - thats why if you expect anyone to answer you should follow their advises (or at least try to and tell them why you failed..)
|
|
|
|
|
thank you again Mikone, i have replied. i think u didn't see
your suggest was very helpful for me, i tried to find something in google,
but i just wanted to ask again, maybe somebody knows another method for to do that.
also im new on C#. there are lots of documents about it and i really didn't know where to start.
but now it looks easy. thank you again!!
asamay
|
|
|
|
|
i read the reply and you wrote "i will search for.." but 10 minutes later you already posted the same question again that's why i thought you weren't really searching
next time try to search for terms like:
- "system.net.webclient msdn" (first and third hit)
- "system.net.webclient tutorial" (second hit)
if you get no results when searching for these terms you could search for "webclient msdn/tutorial" or whatever. In generally the .net classes are well documented and they often provide examples.
if you cant find anything in google search for articles or posts in the messageboard - often people asked the same question and there already exists an answer right next to you
keep on learning (as everyone should ) - all this stuff will become less complicated!!
Good luck,
mik
|
|
|
|