|
Thank you very much, now it works!
patrick
|
|
|
|
|
I have received a request from a client to limit the amount of streaming video that users can download from their site. A company has its own webspace, but leases space and bandwidth from an ISP when users at the company click on links to watch videos.
I can imagine an object that doles out "streaming objects" that know how much data they have streamed, and when the limit is achieved no more "streaming objects" are allowed to be created.
Problem is, I don't know if there is anything server-side that I can use to stream the files to the client.
Can anyone point me in the right direction?
|
|
|
|
|
i think u'r pointer is looking for a "Traffic Shaper". i don't know of open source code one
there are no facts, only interpretations
|
|
|
|
|
Hi.
I've been looking everywhere for sample source to help out with dynamic properties. I want to create a new custom control that contains a new property closely replicating the standard (DynamicProperties) property in MS controls. I want to be able to either create it from scratch or somehow override the behaviour of the (DynamicProperties) property to allow the control to use a global value whenever an object is instantiated from the same control class. As per current (DynamicProperties), each time the code is compiled a reference will need to be compiled into the InitializeComponent for each selected Dynamic Property.
Thanks in advance
Les
Les
|
|
|
|
|
Hi all I'm again.
I'm looking for the Input and Output Control Codes for the following Consts:
IOCTL_CDROM_GET_CONTROL
IOCTL_CDROM_PAUSE_AUDIO
IOCTL_CDROM_PLAY_AUDIO_MSF
IOCTL_CDROM_RAW_READ
IOCTL_CDROM_READ_TOC
IOCTL_CDROM_RESUME_AUDIO
IOCTL_CDROM_SEEK_AUDIO_MSF
IOCTL_CDROM_STOP_AUDIO
I can't find any information about the control codes. I've searched in the MSDN in different foren, in the Plattform SDK and in the Windows DDK. I only get the Consts like listed on top of this thread but nowhere the Codes.
The main problem is, that the API "DeviceIOControl" needs the Control Codes.
Hope, that someone can help me.
Thanks in advance
BB
|
|
|
|
|
If you install the Platform SDK (BIG install!), you can search the header files (*.H) for the constants your looking for. They probably show up like:
#define IOCTL_CDROM_GET_CONTROL 0x0400
or something very similar.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks men.
Now I know my problem. I haven't got the full Platform SDK.
Best wishes
BB
|
|
|
|
|
what i'm trying to do is change the cursor from arrow to a hand when i hover over a particular subitem in my listview. catching a listview mouse_down event passes you in mouseEventArgs, from which you can get an X and Y coordinate, which u can then pass to GetItemAt and get back that particular subitem you clicked on. i naturally thought a mouse_enter/leave/hover would work in the same way, but no mouseeventargs are passed in. so how do i go about finding out which subitem i'm hovering my cursor over if i get no x and y coordinates? thanks!
|
|
|
|
|
I recently did something similar to this, but my aim was to display tooltips for each ListViewItem (the tooltip data is contained in the ListViewItem.Tag property). I used the MouseMove event.
The following code could easily be modified to change the cursor or perform any other task:
private ToolTip lviTip = new ToolTip();
...
private void myList_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
ListViewItem lvi = myList.GetItemAt(e.X, e.Y);
if (lvi != null)
{
string tipText = lvi.Tag.ToString();
lviTip.SetToolTip(myList, tipText);
}
else
{
lviTip.SetToolTip(myList, string.Empty);
}
}
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
Hi all,
I want to use the Windows API "DeviceIOControl" for reading the TOC of a inserted CDRom.
Therefor I need some structs with wich i have a lot off problems to translate.
Is anybody able to help me?
The API "DeviceIOControl":
BOOL DeviceIoControl(
HANDLE hDevice,
DWORD dwIoControlCode,
LPVOID lpInBuffer,
DWORD nInBufferSize,
LPVOID lpOutBuffer,
DWORD nOutBufferSize,
LPDWORD lpBytesReturned,
LPOVERLAPPED lpOverlapped
);
The following structs are needed:
typedef struct _CDROM_TOC
{
UCHAR Length[2];
UCHAR FirstTrack;
UCHAR LastTrack;
TRACK_DATA TrackData[MAXIMUM_NUMBER_TRACKS];
} CDROM_TOC, *PCDROM_TOC;
typedef struct _TRACK_DATA
{
UCHAR Reserved;
UCHAR Control : 4;
UCHAR Adr : 4;
UCHAR TrackNumber;
UCHAR Reserved1;
UCHAR Address[4];
} TRACK_DATA, *PTRACK_DATA;
typedef struct __RAW_READ_INFO
{
LARGE_INTEGER DiskOffset;
ULONG SectorCount;
TRACK_MODE_TYPE TrackMode;
} RAW_READ_INFO, *PRAW_READ_INFO;
Or has anybody a better thought?
Thanks in advance
BB
|
|
|
|
|
you surely tried translating all pointers to
IntPtr<code>, handles words to int's, UCHAR to byte, etc.? What specifically is the problem? <br />
<br />
there are no facts, only interpretations
|
|
|
|
|
Hi,
You detect the main problem that I have. In the Help for examaple I have found, that the meaning for UCHAR is Unsigned CHAR. That' what I don't understand.
So if you are able to complete the list you have started or you can tell me where to find the exact translation I was delited.
Thanks in advance
BB
|
|
|
|
|
hope this helps:
struct _CDROM_TOC
{
byte[] Length = new byte[2];
byte FirstTrack;
byte LastTrack;
TRACK_DATA TrackData[MAXIMUM_NUMBER_TRACKS];
}
struct TRACK_DATA
{
byte Reserved;
byte Control;
byte Adr;
byte TrackNumber;
byte Reserved1;
byte Address[4];
}
struct RAW_READ_INFO
{
Int64 DiskOffset;
UInt32 SectorCount;
TRACK_MODE_TYPE TrackMode;
}
I'm not sure that LARGE_INT translated to Int64 but it should, otherwise define a struct to hold it (check it out at MSDN). You also didn't specify what is TRACK_MODE_TYPE structure.
Try checking out MSDN documentation on the Marshal class
there are no facts, only interpretations
|
|
|
|
|
I have my listview where I plot some data. I want to show the data to a table, so I am using listview. I do have problem using the subitem function. I can show my x data to the fist column, however I am having problem to show the y data to the next column
here is my code
<br />
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
double[] dData = new double[200];<br />
double[] dData2 = new double[200];<br />
<br />
for(int i=0;i<200;i++)<br />
{<br />
dData[i] = Math.Sin(0.09*i);<br />
dData2[i] = Math.Cos(0.1*i);<br />
listView1.Items.Add(i.ToString());
<br />
}<br />
waveformPlot1.PlotY(dData);<br />
waveformPlot2.PlotY(dData2);<br />
}<br />
so my output looks like that
col 1 col 2 col 3
0 blank blakk
1 blank blank
show how can I show subitem in the listview
|
|
|
|
|
You have to use ListViewItem Class. First you need to add the columns to ListViewItem and add the ListViewItem to the ListView Control.
Try this...
private void button1_Click(object sender, System.EventArgs e)
{
double[] dData = new double[200];
double[] dData2 = new double[200];
ListViewItem newItem = null;
for(int i=0;i<200;i++)
{
dData[i] = Math.Sin(0.09*i);
dData2[i] = Math.Cos(0.1*i);
newItem= new ListViewItem();
newItem.SubItems.Add(i.ToString());
newItem.SubItems.Add(dData[i].ToString());
newItem.SubItems.Add(dData2[i].ToString());
this.listView1.Items.Add(newItem);
}
Cheers,
jagan
|
|
|
|
|
I have tried it over and got it right;
this was the only line that I missed
this.listView1.Items.Add(newItem);
|
|
|
|
|
also the first column is blank. The index which is i doesn't show on the fist column
|
|
|
|
|
Hmmmm thats interesting... Anyway this is not right way but try this..
private void button1_Click(object sender, System.EventArgs e)
{
double[] dData = new double[200];
double[] dData2 = new double[200];
ListViewItem newItem = null;
for(int i=0;i<200;i++)
{
dData[i] = Math.Sin(0.09*i);
dData2[i] = Math.Cos(0.1*i);
newItem= new ListViewItem(i.ToString());
newItem.SubItems[1].Text = dData[i].ToString();
newItem.SubItems[2].Text = dData2[i].ToString();
newItem.SubItems.Add(dData[i].ToString());
newItem.SubItems.Add(dData2[i].ToString());
this.listView1.Items.Add(newItem);
}
Cheers,
Jagan
|
|
|
|
|
I received the following error on that line
newItem.SubItems[1].Text = dData[i].ToString();
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in system.windows.forms.dll
Additional information: Specified argument was out of the range of valid values.
|
|
|
|
|
However by removing the two lines, the rest of the code works fine. This is the one that works
<br />
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
double[] dData = new double[200];<br />
double[] dData2 = new double[200];<br />
ListViewItem newItem = null;<br />
<br />
for(int i=0;i<200;i++)<br />
{<br />
dData[i] = Math.Sin(0.09*i);<br />
dData2[i] = Math.Cos(0.1*i);<br />
newItem= new ListViewItem(i.ToString());<br />
newItem.SubItems.Add(dData[i].ToString());<br />
newItem.SubItems.Add(dData2[i].ToString());<br />
this.listView1.Items.Add(newItem);<br />
}<br />
waveformPlot1.PlotY(dData);<br />
waveformPlot2.PlotY(dData2);<br />
}<br />
|
|
|
|
|
Actually i had commented those two lines . However while posting i had mistakenly uncommented those . Sorry for the confusion.
|
|
|
|
|
Hello,
I am sure that I have open only one connection to my SQL Server CE Database but I worked then with another project which also has opened a connection to the same SQL Server CE Database file, but I closed this connection. Now when I want to execute my previous project the File Sharing violation. A different preocess might be using the file. How can I ensure that no more process will use the file?? I also looked in the settings but there is nothing more.
patrick
|
|
|
|
|
Is it possible to draw the drop down list of a combobox a other position?
Is it possible to draw the drop down list to the right side of the combobox?
If possible, what i have to do?
Thanks, Roland
|
|
|
|
|
Hello,
I want to my program to capture the a webpage as an image and show it to the user. Can you please tell me how to do it? I know I should use a WebBrowser control but how can I capture the webpage?
Thanks in advance
|
|
|
|
|
I've got a client who is driving me nuts! They want the user interface for their application to look '24th century' (Trek fan) and have read enough to believe that DirectX is the way to give them a totally unique UI.
I've explained that all the usefullness of the standard Windows controls isn't available when you're using DirectX, but they're determined that their application will look like no other.
From the research and googling I've done it appears that there is some information available about this, but not a lot. Has anyone out there attempted anything like this, or have a pointer to a project by chance?
Or, do I triple my price to cover the effort and start from scratch?
|
|
|
|