|
Hi,
I have a requirement to read the data from an INI file. Even though I searched in google, I got the code in C++, not in C#. Can anybody help me please? Providing me the link also will be great.
Thanks in advance,
Meeram395
|
|
|
|
|
I don't think C# has direct support, you could p/invoke the C++ APIs or just read the file and parse it yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Here's a nice article one of the local boys came up with :v)
http://www.codeproject.com/csharp/cs_ini.asp
I prefer INI files over the app.config file myself if only because it's a lot easier to hand edit an INI file.
|
|
|
|
|
one of my posts here was about taking a screen shot. and i get the answer
MemoryStream ms = new MemoryStream();<br />
int screenWidth = Screen.GetBounds(new Point(0, 0)).Width;<br />
int screenHeight = Screen.GetBounds(new Point(0, 0)).Height;<br />
Bitmap screenShot = new Bitmap(screenWidth, screenHeight);<br />
Graphics gfx = Graphics.FromImage((Image)screenShot);<br />
gfx.CopyFromScreen(0, 0, 0, 0, new Size(screenWidth, screenHeight));
i then tried to draw the cursor on the screenShot image using :
Graphics g = System.Drawing.Graphics.FromImage(screenShot);<br />
Cursor cur = Cursors.Arrow;
cur.Draw(g, new Rectangle(Cursor.Position.X, Cursor.Position.Y, cur.Size.Width, cur.Size.Height));
when using Cursors.Arrow the arrow shap is drawon on the image, but to draw the current
cursor i tried Cursor.Current but it dosn't work, it always draw arrow.
my question is, how to determine the shape of the cursor and then draw it on the image?
thanks in advance
Hussam
|
|
|
|
|
Hi, i have a COM dll with a COM object that sends events.
The COM was written in ATL VC6.
in VB6 i get the events by using "Dim WithEvent ..." .
I don't know how to do it with C#.
The com object is ComApplication and the event is OnIpresult(ComIpResult* pIR).
Can you give me the sample code according to my com event?
Thanks,
Dudi
|
|
|
|
|
hi..
code to transfer multiple .jpg files to webservice
|
|
|
|
|
You can't send files directly. Just read the contents of the files into byte arrays and send to the web service.
---
single minded; short sighted; long gone;
|
|
|
|
|
i am working on three tier architecture. and i need to know when an exception is generated from database DAL just do nothing and roll it to the BLL.BLL accept it and its a webservice. now i want to save my Database exception error code that was sent from the Database because when webservice genrate a soap execption my object that was generated from database lost its values. how i can get only my error message from the system exception object. because the message is too big when it comes from DAL........
what u people suggest what i should do tu retain my values of system exeption to send then into the my presentation layer.
|
|
|
|
|
hi ,
i am using the user control of drop down i am not able to find out the selection changed value of drop down on the same aspx page
|
|
|
|
|
Wrong forum, mate. You want the ASP .NET forum.
Cheers,
Vıkram.
Déjà moo - The feeling that you've seen this bull before.
Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
Probably your control is data bound, and you're binding it in your load event, which will reset the selected index. You should do this in prerender, and even then not do it on postback.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
How carry out msn massaer's faces-box?
how make sure its location,when the face-box show?
Thanks.
|
|
|
|
|
It's an owner drawn list box, probably
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 want to carry out it with ListView control.
but I do not know how anchor it anear Button that it opened ListView.
Can you give me some idea?
Thanks.
|
|
|
|
|
You can position a control anywhere you like by setting it's Left, Top, Width and Height properties.
In this case, it seems to me that it's another form that is opening.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi,
I'm writing a simple Rdp client in C#. In the Remote Desktop connection provided with windows, we can redirect the winkey, and other hot keys such as alt+tab. So I know its possible but I've been unable to do so. Reading on MSDN i thought the following will work -
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
userControl11.axMsRdpClient1.Server = "testserver";
userControl11.axMsRdpClient1.Connect();<br />
userControl11.axMsRdpClient1.AdvancedSettings2.EnableWindowsKey = 0;<br />
userControl11.axMsRdpClient1.AdvancedSettings2.HotKeyCtrlEsc = 0x23;<br />
}
but it doesn't seem to work.SO every time i hit the windows key, its the local windows menu that pops up. I want the remote computer's windows to do so. Same with the alt+tab and other escape sequences Anybody knows how to do this?
Rahul
|
|
|
|
|
I guess the Windows key works in Full Screen mode right? However, you still can not use CTRL+ALT+DEL. You have to use 'Windows Security' menu from Start -> Settings.
|
|
|
|
|
Nope there is an option which lets u allow redirect these keys even in the window mode. Yeah, ctrl+atl+del is SAS.. so i don't redirect that...agreed. But the rest can be redirected. Just try it on the rdp thing provided with windows.
|
|
|
|
|
can anyone give details about httphandlers and httpmodules.
please tell where can we use this and what r the fundamentals of httphandlers and
httpmodules.
hello every one
|
|
|
|
|
Hi..
i want to convert string[] to byte[].suppose i have two .jpg file,first i have convert .jpg file to string[] by using Regx expression in c#. now i want to convert string[] to byte[]. but it overlapping the byte[].just i want string[] to append the
byte[]..
|
|
|
|
|
abdulsamad.shaik wrote: first i have convert .jpg file to string[] by using Regx expression in c#.
Sounds very dubious to me....
abdulsamad.shaik wrote: now i want to convert string[] to byte[]. but it overlapping the byte[].just i want string[] to append the
byte[]..
This sounds like a real mess. Do you want the file in jpg format as a byte array, or the actual image data ?
System.IO.File.ReadAllBytes will give you the former, my image processing articles will show you how to do the latter.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
abdulsamad.shaik wrote: i have convert .jpg file to string[] by using Regx expression in c#.
Just what are you trying to do?
Cheers,
Vıkram.
Déjà moo - The feeling that you've seen this bull before.
Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
This all sounds pretty strange. I think that you have to explain what it is that you are trying to accomplish really.
abdulsamad.shaik wrote: i want to convert string[] to byte[].
That part is easy, using the Encoding classes.
suppose i have two .jpg file,first i have convert .jpg file to string[] by using Regx expression in c#.
No you haven't, as that is not possible. An image file is a binary file, and regular expressions work with string data. If you read the binary file as if it was text, you will lose a lot of data.
just i want string[] to append the byte[]
You can't change the size of an array, so you have to create a new array that has room for both arrays, and copy the data into it.
---
single minded; short sighted; long gone;
|
|
|
|
|
hi there...
This is regarding reading events from event log viewer of windows.
I am working on an application which prints the event log entries on the console.
Basically I am NOT directly connecting to event-viewer. Rather I am provided with a dll, which is reading events from eventviewer and sending the instance id to my application.
I could manage to get the event-id from instance id.(with the help of hexadecimal code 3FFFFFFF)
But the problem is that
I need to get the instance id from event id...
We know that instance id is combination of eventid and some 16 bits(with 2 bits on) before it.
But if somebody can tell me on what basis the value of first two bits is set, we can find the instance id from event id - I hope
As far as, I realised is that... if the event is information we get the bits 01.
but the values keep on varying when it comes with warning or error.
(can someone help me out, to find the Instanceid from event id...)
Thanks
Rahul
|
|
|
|
|
Hi... Sorry for my english...
I have this code...
<br />
<br />
public void Connect()<br />
{<br />
NpgsqlConnection cnxPg = new NpgsqlConnection("Connection string...");<br />
cnxPg.Open();<br />
}<br />
<br />
public void pgSelect(string strQry)<br />
{<br />
if(cnxPg.State.ToString() == "Open")
{<br />
NpgsqlCommand npgComm = new NpgsCommand(strQry);<br />
}<br />
}<br />
Ok... firs that all... that doesn't works
Then i want to do something like this...
<br />
public void pgRow()<br />
{<br />
}<br />
How can i return the connection to use it in other functions? How can i return the query results to uset it in other functions too?...
Did you understand me?... my english it's not so good, so i did my best...
Please help me
Thank you all
|
|
|
|