|
Goodness knows what you're using, but the DPI settng is just metadata, it's meaningless to image quality unless you're using WPF.
You're using a p/invoked API ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
first i created a new file of .cs type
there in the namespace i wrote the following code.
internal class Class1
{
public int a;
}
then in the program.cs file i created an instance of the file
static void Main()
{
Class1 d = new Class1();
}
Should not this had created an error , while creating an instance of class1
because it is accessible only within the assembly.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Are the two files in different assemblies? I think you created them in the same project.
Cheers,
Vıkram.
Be yourself, no matter what they say.
- Sting, Englishman in New York.
|
|
|
|
|
program.cs creates itself after the new program creation.and i created one file named class1.now both are in same project.
I wanted to ask that if In the same project internal members are accessbile in the derived classes and also i can create the instance of the instrnal class , one more thing , internal members are accessible in the instance of the class(eve if the class is declared public).
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Sonia Gupta wrote: now both are in same project.
Then your classes are in the same assembly, so the internal class is visible to Main (and everywhere else).
Sonia Gupta wrote: I wanted to ask that if In the same project internal members are accessbile in the derived classes
internal members are visible everywhere in the same assembly. It's as simple as that.
Sonia Gupta wrote: internal members are accessible in the instance of the class(eve if the class is declared public).
From where? Internal members of a public class will be visible in the same assembly. Internal members of a public class will not be visible outside the assembly, even though the class itself will be.
You can try out all of this yourself; it will teach you a lot.
Cheers,
Vıkram.
Be yourself, no matter what they say.
- Sting, Englishman in New York.
|
|
|
|
|
Hi all,
How do I able to get all the icons and extension of my files in my computer using coding?
is there anyway?
I know is something to do with HKEY_CLASSES_ROOT but I not sure how to code it. is there any sample? thanks.
I wish to take them out and then place it on a treeview. so user can see the all my treeview having diff icons.
|
|
|
|
|
Unless a file is associated with an extension in Windows Explorer, nothing is stored in the registry. Do you only want to find registered file types ? Then they are in the registry. Otherwise, you can't find them.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I got this link from this thread..
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
O the thread is good.. but I do need some sample as I have no idea how to start.
|
|
|
|
|
Adrian Soon wrote: I do need some sample as I have no idea how to start.
As I wrote ~
I got this link from this thread..
Don't you see the sample code in that link? Well, it is VB code so you might need VB to C# converter.... or you can simply change this code to C# if you have some idea about VB..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi I tried pasting the code.
but it fails.
Conversion was attempted, however the following errors were reported:
-- line 6 col 9: invalid NonModuleDeclaration
I nt sure how to get it done.
what went wrong?
|
|
|
|
|
I created a Setup project (with Orcas beta 2) and I could see in View => User Interfaces
That there are Administrative Install screens.
What are those?
How do I use them?
How do I do an administrative install on plenty of computer?
Is there a possibility to have a silent install?
Also, in the case of the administrative install, I would like to be able to do some additional task (i.e. write some data in the registry) but I need user input for that (i.e. the registration key), how could I do that?
I mean:
- I could have an additional screen, but it has to be entered for every computer, not pratical. (beside how could I use those user input in my System.Configuration.Install.Installer subclasses?)
- could I use command line parameter in MSI? (and how could I use those user command line parameters in my System.Configuration.Install.Installer subclasses?)
|
|
|
|
|
Hi!
I need to colourize C# code on my blog. Is there any ready solution for these?
|
|
|
|
|
|
|
thanx a lot!
But I'm writing my own blog engine, so I need colourizer like some independent class.
|
|
|
|
|
i have made a small application that can load programs compiled into dll files, i managed to get the application to load my dll files correctly but now i am having issues with how to unload the dll files correctly. inside the dll program, when i go to close the program i can not use the normal means to close as it would cause the whole program including the loader to close. so if someone could please give some advice on how to properly unload a dll after its loaded, it would be very much appreciated.
|
|
|
|
|
If you load your dlls dynamically, you can unload them. If they are referenced by your project at build time, they will be loaded for the lifetime of your app instance.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Your question is not clear. Are you saying you want to unload a DLL or are you saying calling Environment.Exit() from a dynamically loaded DLL doesn't work? If it's the former, feel free to browse Google[^]
If it's the latter, there's little anybody can do without your code. FYI, I loaded an assembly using Assembly.Load , instantiated a type and called a method on it which called Environment.Exit() and the app was cleanly shut down. Again, you may want to post a code snapshot.
Cheers,
Vıkram.
Be yourself, no matter what they say.
- Sting, Englishman in New York.
|
|
|
|
|
Hi,
I am trying to convert a Big Endian data file to something readable on most Windows PCs. I do ok with integer data but I cannot convert the floating points (32-bit IEEE).
1) Is it possible for a BinaryReader to account for Big Endian, such that .ReadSingle() would return the correct value?
2) If I have to read the bytes one at a time and reverse them, is there a way to type cast it to a float?
I pursued #2 for a while, but C# type-casting seems to convert the actual value and not the binary that represents it. So the result is something like 1.12E9 instead of 89.9.
I really don't know how to make it work correctly. I would be grateful for any help.
Regards,
Piote
|
|
|
|
|
Hi,
AFAIK there is no direct .NET support for big-endian data.
You need to swap all bytes in each larger data item, whether integer or float.
The BitConverter class will help you interpreting bytes once you have put them
in the right order. See ToSingle() method.
You could construct your own BinaryReader derivative that hides the endianness
conversion, (only if BitConverter.IsLittleEndian returns true).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thanks for help. I'll try to use that.
Regards,
Piote
|
|
|
|
|
Hi got this code that is a potential solution to my Database login problem.It was originally in VB but I ran a converter on it. Now I have a OleDbDataReader method called Item(String) that was there when the code was in VB but now does not exist on the OleDbDataReader class in C#(dont know if that possible). Here is the full code. I need help to find the equivalent of this Item method in C#. The code connects to a access database and compares a textbox password entry to one in the database under the same user name given on another textbox...
private void btnLogin_Click(object sender, System.EventArgs e)
{
//The connection string is used to describe the type of database, the security information and the location to the database.
string ConString = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=\"databasename.mdb\";";
//Create a new connection object and assign the ConString Connection String above
OleDbConnection DBCon = new OleDbConnection(ConString);
// g_login is a global variable defined in a Module that captures the login name and passes it from form to form. To create this, just create a Module, say Module1.vb and in it put "Public g_login as String" {g meaning global and login to represent the global login}
GlobalVariables.g_login = this.textBox1.Text;
string strPassword = this.textBox2.Text;
if (GlobalVariables.g_login == "" || strPassword == "")
{
MessageBox.Show("You are missing information. Please make sure that both the username and password fields are filled out.", "Missing Info");
this.textBox1.Focus();
return;
}
// The database has two fields in the Users table. A UserID field, which is the primary key and declared as a text. The other field is Password, which is a text as well.
string strsql = "SELECT [UserID], [Password] FROM Users WHERE [UserID]='" + GlobalVariables.g_login + "' ";
OleDbCommand cm = new OleDbCommand(strsql, DBCon);
OleDbDataReader dr;
bool valid = false;
bool HasRows = false;
try {
DBCon.Open();
dr = cm.ExecuteReader();
if (dr.HasRows) {
while (dr.Read()) {
if (strPassword == dr.Item("Password")) {
valid = true;
}
}
HasRows = true;
}
dr.Close();
}
catch (OleDbException exO) {
MessageBox.Show(exO.Message);
}
catch (Exception ex) {
MessageBox.Show(ex.Message);
}
finally {
if (DBCon.State == ConnectionState.Open) {
DBCon.Close();
}
cm = null;
dr = null;
DBCon.Dispose();
GC.Collect();
}
iCount = iCount + 1;
if (valid == true) {
Form n = new Form4();
n.Show();
this.Hide();
}
else if (iCount == 3) {
MessageBox.Show("Contact Developers!", "Invalid Info");
this.Close();
}
else if (HasRows == false) {
MessageBox.Show("Invalid user name, try again!", "Invalid Info");
this.textBox1.Focus();
this.textBox1.Text = "";
this.textBox2.Text = "";
}
else {
MessageBox.Show("Invalid password, try again!", "Invalid Info");
this.textBox2.Focus();
this.textBox2.Text = "";
}
}
Thanks in Advance.
Is this chair taken
|
|
|
|
|
Hi
It seems like you are looking for the indexer operator under the VB.
In order to read the field values use one of the following methods:
1.indexer operator - dr["Password"] or dr[index]
2.GetValue - dr.GetValue(index)
3.GetValues - int count = dr.GetValues(object[] results)
|
|
|
|
|
I require a drill-down feature in one of my application (exactly similar to Data Tips in Visual Studio .NET 2005).
Here's a brief on what I have:
1. I receive the final output through several steps (say 5 steps) and I need to display the output at each step.
2. Each sub-output has different number of parameters (or you can say No. of Columns)
Considering this, I think something like Data Tips would be the best option for presenting this data to the user.
Problem is that I don't know how to re-create or derive this existing Visual Studio's feature. I am a beginner in C#. I searched everywhere, but all I got was DebuggerVisualizer (which works only in debug mode of Visual Studio and they are not about creating Data Tips).
I want Data Tips to work outside of Visual Studio, in my own application.;)
|
|
|
|