|
hi guys,
I am building a employee data base management system with lot of datagrid. Its basically a windows app. I am building the whole application in 3 tier architecture. I want to add a combo box to the datagrid. i got some sample from net. They are saying abt adding datagridTextcolumn in datagrid table styles. I tried adding that. No errors but not results i cannot see the combo box. how can i exactly put the combo box in the right cell. How can i map them i tried mapping properties but it does not work and will not work as i am filling dataset using a function in the wrapper class to get a dataset and setting this as the datasource to the grid. so how can i do that any ideas. is my question a bit confusing or vague. sorry for that. how can i do that plz tell me a neat way of doing that.
thanks in advance
anand
anand
|
|
|
|
|
|
Hi~
Can I add item to "new" of the desktop context menu?
Thanks
|
|
|
|
|
Hi,
I can't figure out how the textbox 'knows' where to draw. Can I get a handle to that rectangle and 'move' it over?
thanks,
Roland
|
|
|
|
|
Is there any way I can login to a remote machine from code to allow for a file copy?
If the folder is mapped and connected (entering username/password) it works fine copying to "\\server\share\filename" But if not, I get access denied exception.
|
|
|
|
|
Hello,
I want to save the name of the company in the textBox2. The problem which occur is with the JobId. I will get the JobId number from a previous page as a string. Here I have quoted an example JobId. (the JobIds are saved in the database as uniqueidentifier). The Problem occurs in the ExecuteReader. I think it concerns that the parameter @JobId is of type uniqueidentifier and the the quoted jobId here is from type string. So it occurs a Data conversion failed. error.
jobId = "D4DF269F-F9FB-4C88-A005-11C98B38818A";
this.dataSource = "\\Program Files\\MobileHelpDesk.sdf";
this.strConn = "Data Source = " + dataSource;
this.connection = new SqlCeConnection("Data Source = " + dataSource);
SqlCeCommand command = new SqlCeCommand();
command.Connection = connection;
command = connection.CreateCommand();
command.CommandText = "SELECT c.CompanyName, c.ContactLName FROM Client c INNER JOIN JobDescription p ON p.EmailClient = c.Email WHERE p.JobId = ?";
command.Parameters.Add( "@JobId", jobId);
connection.Open();
drdrDB = command.ExecuteReader();
while (drdrDB.Read())
{
textBox2.Text = drdrDB["JobId"].ToString();
}
drdrDB.Close();
connection.Close();
Does anybody know how can I solve this problem or parse the jobId string in the corresponding type?? or is there another error? But the Select String is correct, I tried it in VS.NET.
thx
patrick
|
|
|
|
|
The parameter value needs to be a System.Guid[^] if the SQL Server type is a uniqueidentifier.
For example:
Guid jobGuid = new Guid(jobId);
command.Parameters.Add("@JobId", jobGuid);
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
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
|
|
|
|