|
In reply to your email:
Do you know how do I do this:
I am adding items to a listView, but during runtime I see them being
displayed one next to the other, instead of one below the other.
I mean that I see that item 2 gets added to the listView and is
displayed parallel to item 1 present in the listView instead of being
displayed below item 1. Can you tell me the reason and possible
solution to display it one below the other?
Best Regards
Rahul Taing Set the list view's View property to Details .
/ravi
PS: Am posting your email here so others may benefit from your question. Replying to a post (vs. sending email) is the preferred way of communicating at CP as it allows others to share (and provide) information.
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Hi,
Is there a way to find out Internet Explorer (or Firefox) settings through C#? I am writing a WinForm Application and need to collect information about the user's browser settings, including the list of plug-ins installed for the browser.
Does anyone have any ideas how I can get this information? I really appreciate your help!
Thank you,
Farhat
|
|
|
|
|
Hi,
Check this link http://www.dotnetbips.com/articles/displayarticle.aspx?id=172
I think this may be useful for u...
Thank you,
Vaibhav
|
|
|
|
|
Thanks Vaibhav,
That article seems to talk about getting the browser capabilities from ASP.NET. What I want to do is to create a windows application that can run in the background and monitor the internet settings of the browser, especially what plug-ins have been installed. If a change is made to them, the application can record it in the internal database. I have looked around and can't seem to find a way to do this. Is there a way to accomplish it? Is there a way to enumerate the plug-ins available on the computer?
Thanks,
Farhat
|
|
|
|
|
How to open a html page by IE when click a linkbutton or a button in Compact Framework?
Thanks
Nothing
|
|
|
|
|
Hi, I am using the P/Invoke to call some methods from an API "wrg303API.dll". I am currently facing problems to convert few of the methods and variables to .NET (c#)..
1. [C/C++ declaration] char szSerNum[9];
[C# declaration]
[MarshalAs(UnmanagedType.ByValArray,SizeCount=9)]
public char [ ] szSerNum;
2. [C/C++ declaration]
DWORD dwVcoFreq[8];
[C# declaration]
[MarshalAs(UnmanagedType.ByValArray,SizeCount=8)]
public DWORD [] dwVcoFreq;
Can I write "string" instead of "char [ ]" and then put the limit on its size. Any suggestion for the "DWORD" array
Now the methods which have problem:
3. [C/C++ declaration]
BOOL __stdcall G3BlockScan (int hRadio,DWORD *Freqs, int Count,int StopSquelchRaw,DWORD feedbackTime,
HWND WinHandle,DWORD Msg);
[C# declaration]
[DllImport("wrg303api.dll")]
public static extern bool G3BlockScan(int hRadio,ref uint Freqs, int Count,int StopSquelchRaw, uint FeedbackTime,
IntPtr WinHandle,uint Msg); I am using IntPtr for HWND .. is it right? Or there is an other option.
4. [C/C++ declaration]
BOOL __stdcall CodecStart(int hRadio,void __stdcall (*CallbackFunc)(void *),void *CallbackTarget);
[C# declaration]
5. [C/C++ declaration]
DWORD __stdcall CodecRead(int hRadio, void *Buf, DWORD Size);
[C# declaration]
I need the equivalent of methods 4 and 5 in C#
6. [C/C++ declaration]
BOOL __stdcall G3GetPath(int hRadio, char *Pathname, size_t size);
[C# declaration]
[DllImport("wrg303api.dll")]
public static extern bool G3GetPath(int hRadio, string Pathname, size_t size);
What will be the equivalent of “size_t” in c#
I would appreciate if any1 can help me...
|
|
|
|
|
Hi everybody
Where i can put my code if i whant he to be execude befour postback or how to make some event who start befour post back???
Pleas help me
than you
//using version visual studio 2005
-- modified at 16:54 Friday 14th April, 2006
|
|
|
|
|
Are you talking about postbacks in a web application? If so, then the ASP.NET forum would be right place to ask.
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
if (!this.IsPostBack)
{
// Your code
}
The novice.
|
|
|
|
|
Hello,
Are System.Diagnostics.Debug methods automatically ignored by the compiler when DEBUG is not defined? Or do I still need to wrap it with a #if DEBUG ... #endif ?
I tried testing this by running a System.Diagnostics.Debug.WriteLine(...) on a Release run and it seems ok. I'm just having a problem when it comes to a release installer. Just wanted to make sure that this isn't the cause of the problem.
Thanks much!
~Rafferty
|
|
|
|
|
Rafferty Uy wrote: Are System.Diagnostics.Debug methods automatically ignored by the compiler when DEBUG is not defined? Or do I still need to wrap it with a #if DEBUG ... #endif?
Yes they are ignored. Most methods in Trace and Debug classes have the COnditionaAttribute set. If a method is called with this attibute and the value has not been defined, it will not be called (not even emitted). Pretty nifty, considering the other mentioned alternative
|
|
|
|
|
Great! Thanks for the confirmation leppie!
~Rafferty
|
|
|
|
|
Hello,
I'm posting what I hope will not be too ignorant of a question regarding com interop
A number of times I've seen in examples on this site a piece of code where the author has used com interop to call a method from an external dll (I assume c++ dlls being called from the c# code). My question is if you did not author the c++ dll yourself what is the best method to find out what the classes, methods, etc are that are contained in the dll? Basically, where do you determine what it is that you need to call from the dll?
For example, consider this call to an external dll (from an article here on Code Project):
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
How did the author determine that in the dll that he called that there is a WritePrivateProfileString method and that it takes 4 string parameters? Is there some utility out there that allows you to browse c++ dlls and that you can use to determine what method and parameters you would need to import?
Bear in mind that I'm still learning c# and com interop is one subject that I've struggled to understand fully.
Thanks.
|
|
|
|
|
The DLL has to be documented. That means, the signatures of the functions are described in a text file. MSDN contains a bit of documentation for all Win32 DLLs. If a DLL has no documentation, you're not supposed to use it.
Look, there are the MSDN pages for WritePrivateProfileString and the whole platform SDK.
_________________________________
Please inform me about my English mistakes, as I'm still trying to learn your language!
-- modified at 17:10 Friday 14th April, 2006
|
|
|
|
|
Thanks
|
|
|
|
|
Hi ppl,
I am trying to send a raw IP datagram, and I am having a problem with the insertion of the IP header.
Ideally I would like to send a datagram with my own header, because I would like to have a varying Protocol Field. However when sending the datagram I am forced to use the socket.Connect method because the .send requires an address, and this creates an IP header with an unmanagable Protocol Type Field.
For example the only way to put a TCP value (6) in the Protocol Field is to use
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.TCP);
and this creates a TCP header, which I dont want because I have my own header with different data already.
(btw i used ethereal to monitor the packets)
so....
If anyone could please suggest a way to either
modify the protocol type field, without creating any extra TCP or UDP headers..
(I have used setsocket options without success...)
or a way of sending the whole datagram including the IP header
10ks a lot guys
|
|
|
|
|
I am converting text to images in my c# code.
I want to generate an image for the word H20 with the 2 as a subscript.
The <sub>2</sub> doesnt work as the image is generated at the server and then send to the browser.
And Ideas?
|
|
|
|
|
I am toying with a poker program.
I would like to go into the visual area of the poker program's "form" and capture the upper left portion of the displayed card (approx 16 bits wide, 32 bits tall) ... from the place on the window (form) where the rank and the suit is displayed.
In effect, i would like to grab a 16x32 "selection area" like is typical in a "paint" program selection rectangle.
Once i capture it, i will label it, store it, and recall it so i can identify that specific card when it is displayed in the future.
I think i know how to locate the upper-left point (0,0) in the poker program's form, but i have no clue how to capture the 16x32 bit rectangle.
Any suggestions would be appreciated.
Thanks.
-- modified at 15:13 Friday 14th April, 2006
|
|
|
|
|
I am trying to build a component in which it can support all kinds of relation in two (DataGridView)s style and it has its own filtering, navigation ,edit,insert and delete buttons to support appropriate actions on bound data. So its better to accomplish these actions automatically than write "Update","Delete","Insert" commands manually.
I am in wonder whether SqlCommandBuilder does generate "Update","Delete","Insert" commands automatically in a master-detail relation or not ?
If it does or if there is any other way to handle the problem would you please let me know it either.
THANK YOU IN ADVANCED...
|
|
|
|
|
Greetings to all,
First, thank you for taking the time to read my post. I was wondering if it is possible to create a printer driver in C# that would actually save the output to an image file such as a TIFF as opposed to printing to a physical printer.
I am fairly new to .NET and Windows applications, so any help or references are greatly appreciated, especially regarding driver development. Is C#/.NET even the proper avenue for such a task?
Thanks in advance for any assistance or references.
|
|
|
|
|
C# is not the proper language to be writing drivers in. C# is a high-level, application programming language. Driver development is low-level close-to-the-hardware development more suited for a language like C.
|
|
|
|
|
Thanks for the quick response. I came across this KB article that will hopefully point me in the correct direction:
http://support.microsoft.com/kb/893388/en-us[^]
Hopefully this will help others seeking similar solutions.
Rock on CodeProject!
|
|
|
|
|
Hello everybody!
I have two Forms! Form1 with the webBrowser Control and Form2 with a button.
I want to navigate the webBrowser1 Control by the click of the Button in Form2!
BUT HOW?
webBrowser1.Navigate("www.google") in the Form1_Load() works.
Form1 Frm1 = new Form1();
Frm1.webBrowser1.Navigate("url") -> doestn work!
|
|
|
|
|
Make your webBrowser1 variable public rather than private.
Or if you want to follow better encapsulation rules, make a public getter property that exposes the WebBrowser.
Better yet, add a public method called Navigate that accepts a string. Have that method call webBrowser1.Navigate.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: I luv teh choco
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Hey, thanx so far...
I have:
on Form1:
public void navigate(string uri)
{
MessageBox.Show(uri);
webBrowser1.Navigate(uri);
}
on Form2:
Form1.navigate("http://www.google.de");
The MessageBox shows the string, but the content of webBrowser1 doesnt change...
___________
!bless you!
¯¯¯¯¯¯¯¯¯¯¯
|
|
|
|