|
Think I have done it - a test will tell
Right Click on the Deployment Project
Select View
Select Registry
On [HKEY_LOCAL_MACHINE] add key "SYSTEM"
On [System] add key "CurrentControlSet"
On [CurrentControlSet] add key "Control"
On [Control] add key "Session Manager"
On [Session Manager] add key "Environment"
On [Environment] add keystring Variable Name and in it's properties add the value
Hope this helps someone else
|
|
|
|
|
how to download a file from a remote server using FTP through ASP.NET/C#
-- modified at 1:42 Saturday 12th November, 2005
|
|
|
|
|
hi everyone,
I'm new to Directx . If you don't mind I'd like to ask a question .
Should I use window controls in full screen mode or I have to create a new ones.
Thank you for answering my question .
Sincerely,
|
|
|
|
|
You can use windows controls in DX fullscreen mode. There's a call SetDialogBoxMode which will enable controls in fullscreen mode, it has several limitations, however.
You better use your own custom drawn directx controls or use the ones from the DX samples in the SDK.
For directx associated questions I recommend you to use the Gamedev.net directx forums. You can find them here
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I have two tables in my db. One is an invoice table and the other is a sales table. The sale table has all of the items on the invoices (referenced by invoice number). I want to grab specific invoices at a time (say 3 or more ) The best way I though to do this would be to use an IN statement in the where clause of the SQL stmt. Since I don't know how many I am going to need to grab, I was wondering if it was possible to pass one parameter to the IN clause ( a set of invoice numbers). Or would it be easier to just grab one at a time and append the result to my dataset?
For instance:
SELECT INVOICES.*, SALES.* FROM INVOICES INNER JOIN SALES ON INVOICE.invoice_number = SALES.invoice_number WHERE (Invoices.invoice_number IN (?));
Where ? could be {1002, 1004, 1100,...)
|
|
|
|
|
instead of messing with parameters, why don't you just build the string in code and put it in the select command text before you execute it?
|
|
|
|
|
Hi
I'm Antonio and write from Italy.
I hope you help me.
(sorry for my bad English!)
I created a Menu custom control with a nested components collection.
It works fine, if I used the Collectionform-Designer to add and remove
the components.
But if remove the custom control or the "Granchild" item from the form designer window the
generated code the "Granchild" items wil be removed but "Child" items still remaining in the Form class and I have to remove manually the declaration and the code in
Initializecomponents.
Example:
-----------------------------------------------------------------------------------
| MainItem | MENU CUSTOM CONTROL
| Item1 |-----------------------------------------------------------------------
| Item2 > | Item3 | still remaining
| removed | | Item4 | still remaining
| |
------------
The components is a Component derived class, the collection is a
Collectionbase derived class.
thanks for your time.
Sincerely,
Antonio Lettieri
|
|
|
|
|
OK, so this is a hack. We are creating a MDI program, but the first few releases will not support the MDI feature. I want to open one MDI maximized, and disable the _, [], and X from showing in the upper right. I can disable the functionality of the buttons on the mdi form itself, but the parent will not give up these buttons. The Close and minimize do not work, but the restore, [], still works. Anyone know how to 1. disable this, 2. remove the buttons themselves.
Thanks so much,
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
I'm writing an app that has a UI like The Gimp's or early versions of VB - i.e. there's one toolbar at the top. clicking on various buttons int he toolbar drops down controls or opens up windows.
e.g. think of the volume icon in the system tray, when clicked the volume slider pops up. My app toolbar would work the same way. When a control in the toolbar is clicked, it would drop down to show its full form.
something like this -
<code>
------------------------------------------------------------------------------------
| --------------------------------------------------------- --- --- ---------- |
| | | | <tab control with tabs> | | | | | | |controls| |
| --------------------------------------------------------- --- --- ---------- |
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
| --------------------------------------------------------- --- --- ---------- |
| | | | <tab control with tabs> | | | | | | |controls| |
| | |--------------------------------------------- --- --- ---------- |
--| |_____________________________________---------------------------------
| |
| |
| < dropped down tab > |
| |
| |
| |
--------------------------------------------------
</code>
My problem is - if the main Form is the toolbar (quite possibly the ToolStrip control, containing all the child controls), then all child controls are restricted to the form's display area and hence cannot extend beyond it.
Whats the best solution for this. I can think of displaying a modeless Form whenever a toolbar item is clicked, and position it appropriately. But I won't be able to use a standard TabControl then.
Any ideas?
-- modified at 17:37 Friday 11th November, 2005
|
|
|
|
|
DISCLAIMER: I have no ties to this group except that I purchased their component to do this. It is a GREAT! component.
DotNetBar suite will let you do this and many other UI things.
http://devcomponents.com/dotnetbar/
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
Can you be a little more specific?
I can get the trial version and see if its possible, but my doubt was of a more general nature - i.e. is it possible in WinForms to extend a control beyond its parent boundaries?
I'm playing with the Infragistics NetAdvantage suite as well, but haven't found a way to solve that basic issue.
Thanks
|
|
|
|
|
I've got a main form with a status bar that contains a progress control. I've implemented a search dialog as well as a find next command.
When the search command is selected, A form is presented for the search criteria. After OK is clicked, I close the search form and proceed to call a method that implements the search and periodically updates the value of the progress control. For some reason, after about three seconds, the maximize button on the main form title bar becomes disabled and the progress control stops updating - there's no error or anything, it just stops redrawing. When the search is complete, the progress bar updates itself and displays properly (at 100%) and the maximize button returns to its enabled state.
When the find next command is selected, the progress bar is updated properly and DOES NOT exhibit the problem above - the progress bar makes its way all the way up to 100% without a problem (and the maximize button issue doesn't happen).
The only difference between the two methods is that the first one brings up a form for data entry and closes it. After that, the two methods are identical - they both call another method that does the searching.
My first guess was that this has to do with garbage collection because of the data entry form, which would explain the delay of three seconds or so. But why this would affect the main form like it does is beyond me.
Has anyone run into something like this? It's driving me nuts.
Thanks,
Cheers,
Drew.
|
|
|
|
|
|
I didn't think that would matter, but I'll give it a try.
Thanks leppie!
Cheers,
Drew.
|
|
|
|
|
Hi,
I need to test a string with regex, but i don't know how i need to build up the pattern. A valid string can contain every letter a-z and somewhere in the middle a '-'. Please help me with solving this problem.
Thanks
Frank
|
|
|
|
|
You specify 'can' and not 'must' so I believe that is correct. You dont specify whether there can be multiple '-' 's. I assume you can, and they can follow one another.
@"[a-z]([a-z\-]*[a-z])*"
If you must have only 1, which contradicts 'can':
@"[a-z]+\-[a-z]+"
xacc.ide-0.1-rc2 released! Download and screenshots
-- modified at 16:52 Friday 11th November, 2005
|
|
|
|
|
sorry i forgot first ther must be at least one letter and after this it can be a '-' and ther must be at least one letter after it.
Thanks for help so far...
|
|
|
|
|
Hello,
I have a dataset that has a single table, with 20 columns let's say.
What I want is to create a new table with the first 10 columns of the bigger table. The reason why, is I want to use XmlWrite method on my dataset, but only to dispaly 10 columns. Any ideas?
Thank you.
|
|
|
|
|
I will share a class that I use in these cases. Note that this class is used as part of a select query that I normally use in my code, so you may modify as needed.
<br />
public class SelectCommand<br />
{<br />
StringCollection columnNames = new StringCollection();<br />
public SelectCommand(string selectQuery)<br />
{<br />
string[] tmp = selectQuery.Split(new char[]{','});<br />
for (int i = 0; i < tmp.Length; i++)<br />
columnNames.Add(tmp[i].Trim());<br />
}<br />
<br />
public DataTable ExecuteSelect(DataTable sourceTable)<br />
{<br />
DataTable dt = new DataTable(sourceTable.TableName);<br />
<br />
DataColumn newCol;<br />
foreach (DataColumn col in sourceTable.Columns)<br />
{<br />
if (columnNames.Contains(col.ColumnName))<br />
{<br />
newCol = new DataColumn(col.ColumnName, col.DataType, col.Expression);<br />
dt.Columns.Add(newCol);<br />
} <br />
}<br />
<br />
DataRow newRow;<br />
foreach (DataRow row in sourceTable.Rows)<br />
{<br />
newRow = dt.NewRow();<br />
foreach (string colName in columnNames)<br />
{<br />
newRow[colName] = row[colName];<br />
}<br />
dt.Rows.Add(newRow);<br />
}<br />
<br />
return dt;<br />
}<br />
}<br />
|
|
|
|
|
Hello everyone,
I tried to rename mapped drive in c# but did't find the solution.
Explain me please how can I do that in c#.
I have found some vbscript example, but i need exactly c#
Thanks
|
|
|
|
|
Am I not using the binary formatter correctly?
I've been doing some tests, with this code:
BinaryFormatter bf=new BinaryFormatter();
FileStream fs=new FileStream("foo.bin", FileMode.Create);
bf.Serialize(fs, dt);
fs.Close();
where "dt" is a DataTable. For stress testing, I have table with some 150,000 records. It takes about 80MB when the table is loaded.
When I run the above code, the memory utilization goes through the roof (in fact, it ultimately crashes with out of memory exception).
1) why is running out memory?
2) what is this thing doing internally? If I'm serializing to a stream, it seems like it should behave like a stream--chunks of data, not all this in-memory processing.
3) why is the resulting file so darn big? BinaryFormatter seems to be a major misconception, except that the data itself is serialized in binary. However, all the tags and header stuff etc is all plain text!
Has anyone written a replacement for what appears to be a real POS?
Marc
VS2005 Tips & Tricks -- contributions welcome!
|
|
|
|
|
XmlSerialization would probably be a better choice for DataSet/Table's.
Marc Clifton wrote: why is the resulting file so darn big? BinaryFormatter seems to be a major misconception, except that the data itself is serialized in binary. However, all the tags and header stuff etc is all plain text!
Use a compressor to compress the data. Binary serialized normally contains duplicated data (why? i dunno, perhaps there is an option for that).
xacc.ide-0.1-rc2 released! Download and screenshots
|
|
|
|
|
The BinaryFormatter is misleading. It includes version and other information which meant that in my tests it used 256 bytes to store a bool. I immediately chucked it.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi,
I am fairly new at C# and Windows programming. I am a bit confused why the TreeView has a ContextMenu property when you can not really use ContextMenu_Popup Handler when it does not accurately give you the mouse coordinates. OK I am not being clear, take this code for example:
private void ContextMenu_Popup(object sender, System.EventArgs e)
{
TreeNode node = TreeView.GetNodeAt(PointToClient(Cursor.Position)) as TreeNode;
if (node == null)
return;
ContextMenu.MenuItems.Clear();
ContextMenu.MenuItems.Add(node.Text);
}
When right clicking on a node this pops up the context menu but the node that it displays is (on my app) 80 pixels lower.
On looking through the forums I see that people tend to use something more like this:
private void TreeView_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
TreeNode node = TreeView.GetNodeAt(e.X, e.Y) as TreeNode;
if (node == null)
return;
ContextMenu.MenuItems.Clear();
ContextMenu.MenuItems.Add(node.Text);
}
}
My questions is why even have a ContextMenu property if it does not work. I am probably just missing something obvious. But thanks anyway to any who reply.
Sean
|
|
|
|
|
Sorry, I think I just figured it out. I still have to have the ContextMenu set in order for it to display. So let me rephrase the question. Why do I have to do the processing in MouseUp rather than in Popup? Is there a way to get the accurate mouse information from the ContextMenu_Popup method?
[UPDATE]
Never mind, I broke it again somehow using the MouseUp so I have no clue what I am doing anymore or what I am asking or what I am thinking or anything. I think I need to step away from the computer for a bit...
Sean
-- modified at 14:48 Friday 11th November, 2005
|
|
|
|