|
Found this
article here on Code Project
|
|
|
|
|
Setting AutoArrange to false and setting ListView.Alignment to ListViewAlignment.Default only takes effect if the ListView.View is set to View.LargeIcon or View.SmallIcon . Is this the case as well?
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i have done this... but i think that i must resolve some events and i dont know which one
|
|
|
|
|
i have done that but still not working
|
|
|
|
|
how to grab a frame from webcam in c# ?
thanks...
|
|
|
|
|
You can use either the SDK for the WebCam, obtained from the manufacturer's website (http://developer.logitech.com[^] for Logitech cams) or try the Windows Image Acquisition API, docs are found here[^].
RageInTheMachine9532
|
|
|
|
|
How do you do anything useful with the Scroll event for a DataGrid ? I ned to take some action depending on which portion of the grid is visible, but there's no FirstVisibleRow property, although there is a FirstVisibleColumn .
I could do this with the scroll bars in an MFC ScrollView, but I can't see it in .NET.
|
|
|
|
|
Oh what, you're saying their example for the Scroll event in the SDK docs that pops up a MessageBox every time you scroll isn't practical?!
You could simulate a FirstVisibleRow of sorts (if you're extending DataGrid , it would definitely make a good read-only property) by calling DataGrid.HitTest with coordinates that would always be in the upper-left corner, like 1, 1 .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
But the Scroll event has a EventArgs not a MouseEventArgs so I can't do a hit test can I? If I could find the position of the slider (relative to top & bottom of the scrollbar) that would be enough.
|
|
|
|
|
For one, you can get the mouse position in screen coordinates at any time from the static Control.MousePosition property, but you didn't read my reply so this really doens't make a difference.
When you scroll, obviously a new row is displayed at the top of the DataGrid , right? All you need to do is call HitTest with the coordinates 1, 1 (or new Point(1, 1) and that will get you the row currently at the top of the DataGrid 's view. This is a very simple workaround.
If you want the slider position, simply P/Invoke the SendMessage API and send the SBM_GETPOS message to the DataGrid control using its Handle property (the HWND for the control). This will get you a value of between 0 and 100, so you'll need to take the row height into account and calculate everything, but the workaround above is so much simpler and doesn't require you to P/Invoke anything (making your code more portable).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I did read your reply but didn't know that HitTest could be used for anything other than a mouse position - that's what the help for HitTest suggests.
But I'm still not getting there...
DataGrid.HitTestInfo hti = valueGrid.HitTest(1,1);<br />
int row = hti.Row;<br />
if (row >=0)<br />
{.......<br />
but row always gives -1 no matter where the scroll position is.
I've also tried
DataGrid.HitTestInfo hti = valueGrid.HitTest(valueGrid.Location);
but no joy, and even tried checking the point in the middle of the top left cell, but again always row = -1.
Obviously I'm missing something very obvious!
|
|
|
|
|
How can i Open OUTLOOK EXPRESS from another Application .Example Suppose I have a Button upon a form in C#.net and I want that I will click upon the button a Outlook should be opened .
Thanks
This is Jitendra
|
|
|
|
|
This is very simple!
Step 1: Create an instance of an System.Diagnostics.Process Object.
Example: private System.Diagnostics.Process process1;
Step 2: Set the properties of process1.
The following property is important: StartInfo.FileName
Example: this.process1.StartInfo.FileName = "[path]";
Step 3: Start the process.
To start the process you call the method Start().
Example: this.process1.Start();
If you need the complete code sample let me know.
Good luck!
|
|
|
|
|
You can shorten this procedure by using the static Start method.
Process.Start(path, arguments);
The parameter arguments is optional, so the method call will look like this.
Process.Start(path);
|
|
|
|
|
Try this one (replace the address to the actual address)
Process.Start("mailto:someone@hotmail.com");
|
|
|
|
|
<HelpMePleaseFor$>
The author of this letter do not know which forums to put it in to get best response from please help the author by coping his request
to any forum or group that you know it's better and faster to reply
</HelpMePleaseFor$>
Hello
I'm Yaser zia sistani
And Iranian c# Developer
I want an app and anybody who help me in finding it or/and buying it
or who give me some c# source code to develop it will payed
according to the price that he wants.
Program that i want :
c# app with source code that let a user in an intranet
manipulates its data in a sqlserver database
which means:
1-create and manipulate sql server tables,views,stored procedure
preferably by a good sql designer gui
2-create web forms dynamically from web by
selecting the tables,views, stored procedures
from a sql server database and let user save the form
in sqldb or xml file
3-create web reports with save capability and good
report generator or designer
easy to use and powerfull gui are beter for our personel
4-security is needed in all above needs
I want a full package to buy ,please send me the price and brochour
If you have some libraries that helps me approching this goal
I can buy them from you with good price
Please help me Really I will pay for it.
But Please hurry up
Yaser Zia Sistani From Iran
A C# Developer
yzsfsg@yahoo.com
|
|
|
|
|
yzs wrote:
I'm Yaser zia sistani
And Iranian c# Developer
Please, what keeps you from developing it yourself and learning along the way?
- Nick Parker My Blog | My Articles
|
|
|
|
|
Try ur luck at http://www.rentacoder.com/RentACoder/default.asp
I would have loved to do it but I have my hands full
------------------------------
"There is no reason anyone would want a computer in their home"
Ken Olson, chairman & founder of Digital equipment, 1977
|
|
|
|
|
I m using the Com namespace "SHDocVw" .but when i m making Setup it gives me the following error and setup uncompleates.
i have also copied this file in my application's bin dir but again same problem ,it gives me following error when i make setup ...
ERROR: 'shdocvw.dll' should be excluded because its source file 'C:\WINDOWS\system32\shdocvw.dll' is under Windows System File Protection.
please if possible give me the solution
This is Jitendra
This is Jitendra
|
|
|
|
|
Generate the assembly with a different name, like Interop.SHDocVw.dll, which is what VS.NET would call it if you did imported the typelib in the shdocvw.dll library by adding a COM references in the Add Reference dialog.
If you're using tlbimp.exe, use command line switches like this:
tlbimp /out:Interop.SHDocVw.dll %WINDIR%\System32\shdocvw.dll Type the following for more information about the switches available for tlbimp.exe:
tlbimp /? You should also consider signing this and keeping it in a global directory that's easy to reference. If you do sign it, you can install it in the GAC. Believe me, this is a common assembly in many applications, except that everyone signs it with a different key, if they sign it at all (production code should always be signed to help protect the integrity of the product, not to mention it's so easy there's no excuse not to).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
You can convert the components of SHDOCVW.DLL to ActiveX components.
NOTE: This requires Visual Studio .Net!
Copy the file: C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin\AxImp.exe in any directory.
Then make a shortcut (or a link [I don't know the English word for it ]) to this file.
Type this text in "target" field:
"[location]\AxImp.exe" [path] [path] is the dll file to convert.
After doing that in the directory will be following files:
AxSHDocVw.dll and SHDocVw.dll !
Reference the file AxSHDocVw to your project.
An instance of a Browser Object looks like this:
private AxSHDocVw.AxWebBrowser axWebBrowser1;
You can use this Object like any other Windows Components.
If there are any questions left, let me know!
Good luck!
|
|
|
|
|
petermax2 wrote:
NOTE: This requires Visual Studio .Net!
No it does not, Aximp.exe comes with the .NET SDK, which is free to download. Also, if you have Visual Studio .NET, you can easily add the web browser from the toolbar and it will automatically generate the interop assemblies for you.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Why go to all that trouble to execute aximp.exe or any SDK utility for that matter? Simly add "C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin" to your PATH environment variable in your System control panel. This environment variable is used to resolve executable paths when you run a problem. If it exists in the PATH, you don't need to type the full path to the executable file. It's also used by the executable loader to locate DLLs that need to be mapped into the process space.
While you're at it, also add the Framework directories (ex: "C:\Windows\Microsoft.NET\Framework\v1.1.4322" so you can use the compilers and the assemblier without typing the full path. Do this for a good developer workstation setup. I make great use of it because I really don't use VS.NET for most code samples.
And Nick is right, you don't need VS.NET for the Framework SDK. The .NET Framework SDKs are freely downloadable installations separate from the Framework installations that provide everything you find in "C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK" on your machine, since VS.NET just includes the Framework SDK installation.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
You are rigth!
Sorry...
|
|
|
|
|
if i have a mdi child form within a mdi form and i want to restrict the child so it can't move outside of the parent form, how would i do this? this is what i have but when i'm moving the child form i get some weird painting effects.
protected override void OnMove(System.EventArgs e)<br />
{<br />
if (this.Left <= this.Parent.Left)<br />
this.Location = new System.Drawing.Point(this.Parent.Left, this.Location.Y);<br />
if (this.Right >= this.Parent.Right - 3)<br />
this.Location = new System.Drawing.Point(this.Parent.Right - this.Size.Width - 4, this.Location.Y);<br />
if (this.Top <= this.Parent.Top)<br />
this.Location = new System.Drawing.Point(this.Location.X, this.Parent.Top);<br />
if (this.Bottom >= this.Parent.Bottom - 3)<br />
this.Location = new System.Drawing.Point(this.Location.X, this.Parent.Bottom - this.Size.Height - 4);<br />
base.OnMove(e);<br />
}<br />
thanks,
Rob Tomson
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|