|
Hi! I'm a newbie and I've wondered how JTable can be implemented in C#. Now I found out that there is an existing class in C# called DataGrid but it can only be used if there is data bound to it from the database. What if I just wanted to generate a number of (empty) cells (horizontally and vertically)? I saw some existing codes in this site but most of them are hard to understand, Is there any other simple way of doing it?
Thanks a lot!
|
|
|
|
|
|
That's not true. You can just create a new DataTable, add columns to it, fill it with data and then bind it to the grid. You won't need a database to do so.
Something like:
DataTable dt = new DataTable();
dt.Columns.Add("Col1", typeof(string));
dt.Columns.Add("Col2", typeof(double));
dt.Rows.Add(new object[] { "Row1", 3.5 });
dt.Rows.Add(new object[] { "Row2", 2.1 });
dt.Rows.Add(new object[] { "Row3", 2341.3646 });
myDataGrid.DataSource = dt;
|
|
|
|
|
Hello All,
Actually I want to port a windows application written in C# to a user control so that i can embed that control in a web browser and be facilitated from all its feature without installing it.(Only the .Net framework is required).
Its working fine but gives me exception when i go beyond the scope of the browser for example i want to save a file in C:\ drive and do some registry operations.
It gives me System.Security.Permissions.FileIoPermission and etc.
Please tell me how to set all the permissions for this control so that i can have full control over the machine on which this control is running in a web browser.
Thanks alot in advance,
Best Regards,
Rizwan Ahmed.
|
|
|
|
|
Anyone know if it is possible to montior the stop, pause and play button controls on the WMP ? I need to know when the user clicks the stop button. I cannot just rely on the PlayStateChange event either, since the player will enter the WMPPlayState.wmppsStopped state at the end of a song. Thanks for any help you may have....
|
|
|
|
|
The states that it goes through are different, I think, but you can also check the position within the track, to see if it stopped at the end.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have to design a system to listen radio & do some DSP task in radio(on Analog to Digital converted) signals.
This task is CTCSS detection/genaration,DTMF detection/genaration, RF Audio detection & also other filtering processing with making of filter graph.
All are done with C#.Net.
Can you help me?
-- modified at 2:18 Monday 16th January, 2006
|
|
|
|
|
As far as I am aware, DirectShow is dead. Does anyone have any ideas what we're supposed to use to play video, to capture video from devices, etc. in the future ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I don't think DShow is dead; it's just not part of the DirectX SDK since it is not limited to games. If what I've read is true, DirectShow is now part of the Platform SDK. *edit* according to this page[^], it was moved to the PSDK this past April. *edit*
What are managed code developers supposed to use? Well, we can use DirectShow via COM interop. There's a good CP article on this here[^]. I think I've mentioned to you before, the WinFX APIs are really where everything's headed; after talking with you recently about this, I looked into WinFX and the multimedia support really blows away what is available today. I saw some a demo of video being played back as the "texture" on interactive 3d objects...all in a pure WinFX application.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Little House on the Flickr
Judah Himango
|
|
|
|
|
Yeah, I've seen WinFX demos, in Seattle. I agree, it's awesome. But, this is what I'm afraid of. That Microsoft is pushing us to use WinFX. Why am I afraid ? Because I can't afford to tell people I work for that my code now targets only Windows XP and above.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
If Windows 98 & 2000 compatibility is really that important, your best bet is probably to use DirectShow via COM interop.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Little House on the Flickr
Judah Himango
|
|
|
|
|
Hi, it's been a long time since my last post here, but here my new one is:
Well, I recently installed visual c# express edition 2005, which seems to work fine. Later I installed the DirectX sdk (december 2005 release). As the readme tells me, only the documentation for managed DirectX should be available in visual studio 2005 express edition document browser. Well, that's fine for me, but there's nothing in visual studio 2005. I installed the express edition in c:\Microsoft Visual Studio 8\, which is not standard, but can this be the reason? I can tell my project where to look for the directx dlls, but the help isn't included though documentation was installed: Nothing in the documentation browser, nothing if I move my mousecursor over DirectX specific code and nothing if I hit F1. Rest of the sdk seems to be installed properly (external documentation, debug version, etc). So how can I fix that? Hope someone can help me.
Thanks.
|
|
|
|
|
The documentation should be in "C:\Program Files\Microsoft DirectX SDK (December 2005)" or some similar folder.
|
|
|
|
|
Well, that's not what I meant. I know where to find the documentation. My Problem is that I can't use the (let me call it) advanced help in visual studio. As I read DirectX help should be integrated in visual studio automatically when visual studio is installed and you install the DirectX SDK. But when I install, there's nothing in VS. Due to the fact that I use Visual C# 2005 express edition only the managed DirectX help should be available (referring to the readme of the December 2005 DirectX SDK), but it is not for me. So that's the problem. I'd still appriciate any suggestions.
Thanks
|
|
|
|
|
I want to actually extract comments ( of both '//' and '/* ..... */ styles ) from a C# code file. I want some halp regarding how to implement this ?
I want to extract all comments as follows
1. starting with //
2. comments inserted in old /* ....... */ style.
please give me any hints or links
ragards,
|
|
|
|
|
You can write a tool that loops over all your source files, opens them, and uses regular expressions to search for the above mentioned patterns, and removes them.
|
|
|
|
|
|
Hi - I need to trap Alt + Down keys together in WndProc - any ideas how i can do that.
i.e. specifically what message values are these keys having been pressed.
I know i can handle this in KeyDown, but if i wanted to do this in WndProc, how to?
Thanks.
|
|
|
|
|
Try this:
private const int VK_LEFT = 0x25;
private const int VK_UP = 0x26;
private const int VK_RIGHT = 0x27;
private const int VK_DOWN = 0x28;
private const int VK_MENU = 0x12;
private const int WM_SYSKEYDOWN = 0x0104;
private const int WM_SYSKEYUP = 0x0105;
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case WM_SYSKEYDOWN:
if (m.WParam.ToInt32() == VK_DOWN)
{
MessageBox.Show("User pressed Alt+Down");
}
break;
}
base.WndProc(ref m);
}
|
|
|
|
|
how i can delete in use files in my program using IO.File class?
-- modified at 9:59 Sunday 15th January, 2006
|
|
|
|
|
You can't. It's as imple as that.
The file must be closed, by every process that has it open, before you can delete it, move it, or rename it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I don't know for sure if there is a way using c#. I encounter same problem with deleting files that are currently in use. You can try using the force delete of vbscript if that is applicable. It works for me.
|
|
|
|
|
Not even that will force-delete a file that is locked open by any process.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Files in use cannot be deleted.
But you can use this:
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
private static extern bool MoveFileEx(string lpExistingFileName, string lpNewFileName, int dwFlags);
const int MOVEFILE_DELAY_UNTIL_REBOOT = 0x00000004;
static void MarkFileToDeleteOnReboot(string fileName)
{
MoveFileEx(fileName, null, MOVEFILE_DELAY_UNTIL_REBOOT);
}
|
|
|
|
|
hi guys,
im listing all the running processes in a machine and put the values inside a listbox control. i want to be able to update the process/application list every, lets say 2 seconds... how can i do that? nid help asap..tnx..
|
|
|
|