|
One thing is you can use GZipStream, which writes the text in compressed format - so no one would understand what it is - Or you can develop your own streamWriter.
Cheers
|
|
|
|
|
You can develop your own streamWriter? I didn't know. Do you know of any tutorials on this subject? (Thanks a lot for the GZipStream, by the way)
-----
Note: *** Never give me an answer have anything to do with Visual Studio. I don't have this program, and it'll be that way for a long, long time. ***
|
|
|
|
|
|
Hi guys,
Please help!!!
How do I check before entering something in a listview if it exists? if it does then don't add otherwise add.
Please advice.
sasa
|
|
|
|
|
The word "exists" is ambiguous. If you don't want to add a duplicate string (my assumption), you could use this method to check for its presence:
bool StringPresentInListView
(ListView lv,
string s)
{
foreach (ListViewItem lvi in lv.Items) {
if (lvi.Text.Equals (s)) {
return true;
}
}
return false;
}
/ravi
|
|
|
|
|
I can't seem to figure out how to install files to the %ALLUSERSPROFILE% folder in a visual studio 2005 setup and deployment project.
Microsoft recommends this folder for the purpose I'm putting it to in this article:
http://msdn.microsoft.com/msdnmag/issues/07/01/UAC/[^]
" If, on the other hand, you want machine-wide state that individual users can modify, you would want to put this in the %allusersprofile%, as in the high scores example mentioned earlier."
I have a firebird embedded database file that needs to go into a shared location for all computer users and be editable. This seems like the logical place to put it.
In the "Add special folder" option in the file system editor there is no option that matches. I've tried adding a custom folder with %allusersprofile% and [ALLUSERSPROFILE] but both result in a network path error when the installer first fires up saying it can't access that network path.
I'm a bit stumped, on the one hand Microsoft is endorsing this, on the other it can't be done AFAICT. (I do have all the latest updates and patches for VS 2005 including the Vista ones).
"110%" - it's the new 70%
|
|
|
|
|
I'm developing an a plugin application that will allow the plugins to define the menus of the host. The problem i'm running into is how to access the host window from the plugin dll. I do not want to pass a refernce of the host window, but was wondering if there is another way using the dot net framework (IE: remoting or such)
Thanks
Sal
|
|
|
|
|
Typically, an application would query the plugin for its name and list of commands (each of which has an associated display name). The app would then modify its user interface appropriately (perhaps by adding a submenu with the plugin's name under the existing "Plug Ins" menu, and adding command items to the plugin's newly created submenu).
This is how applications like Photoshop work (see the Filter and Help | About Plug-In commands, for example).
/ravi
|
|
|
|
|
Thanks Ravi, I was trying to do something different by using the Ribbon style menu system. I wanted each plug-in to have the ability to setup its on tabs or groups or whatever it needed. IE: Reports plugin would create a tab for reports and groups based on report functionality. Thus the question of how can a plugin access the main mdi window.
Sal
|
|
|
|
|
Hi Sal,
I'd urge you to consider using the same concept. Let the MDI window (the presenter) be responsible for modifying the GUI (i.e. adding tabs, groups, buttons, etc.) by querying the plug-in for a list of commands. The response to the query can be in a form that corresponds to the GUI (i.e. it contains a collection of objects that represent groups, tabs and individual commands).
The importance of separating presentation from logic cannot be overstressed. It will come in very handy if down the road you decide to overhaul the GUI and use vanilla menus or another set of controls.
/ravi
|
|
|
|
|
Thanks for the help. After reading your last comment, i feel your right and will take the suggested approach. An overhaul of the GUI would be simplified in the host, then i wont have to change all the plugins for the new gui features or changes.
Thank you
Sal
|
|
|
|
|
Hi.
I'm calling managed (C#) code from (unmanaged) Fortran. The Fortran code uses an unmanaged C/C++ Flat API (in a DLL), which calls into a managed C++ wrapper (currently in a separate DLL), which then calls into my C# code, which does all the work...
I'm using Visual Studio 2005 for everything except the Fortran stuff. The Fortran code is built with Visual Studio 6.0. I have to use it because that's what the Fortran coders use. Furthermore, I might not even have the Fortran source -- only the executable.
I'd like to set a breakpoint in my C# code, just at the point where the Fortran code calls it via the C++ API. But I don't know how to start an instance of my code when it's called from an unmanaged DLL -- especially one for which I might not have the source code.
How can I do this?
Help. Thanks.
Just Mike
|
|
|
|
|
Hi.
I'm calling managed (C#) code from (unmanaged) Fortran. The Fortran code uses an unmanaged C/C++ Flat API (in a DLL), which calls into a managed C++ wrapper (currently in a separate DLL), which then calls into my C# code, which does all the work...
I'm using Visual Studio 2005 for everything except the Fortran stuff. The Fortran code is built with Visual Studio 6.0. I have to use it because that's what the Fortran coders use. Furthermore, I might not even have the Fortran source -- only the executable.
I'd like to set a breakpoint in my C# code, just at the point where the Fortran code calls it via the C++ API. But I don't know how to start an instance of my code when it's called from an unmanaged DLL -- especially one for which I might not have the source code.
How can I do this?
Help. Thanks.
Just Mike
Just Mike
|
|
|
|
|
Hello,
currently I'm writing an installer for my c# application in VS2003 (.net 1.1).
The app is multilingual, so I want the installer to be too.
I'm using the VS2003 build in "Setup-Project".
I would like to have a dialog at the beginning of the installer which provides a "choose your language" option. Then all following dialogs should be displayed in the choosen language.
Any idea if that's possible with the vs2003 build in setup-project?
If not, which free installer-software provides that feature?
Looking forward to your answers.
Thx so far
~humppaaaaaaa!
|
|
|
|
|
I don't know about if that's possible with the VS2003 setup projects but I usually use NSIS. It has multilingual support as well.
|
|
|
|
|
Thank You sir.
I made an installer with NSIS, which features everything i need.
NSIS is a good and powerfull tool.
bb
~humppa
|
|
|
|
|
I am trying to add checkbox to the DatagridView programmertically. Can anyone help me out here. Here is the sample of my code.
DataSet ds = new DataSet();
string sql;
sql = @"SELECT lastName,firstName,MiddleName,LoginName,Passwd,ReadOnly,Updates,Deletes,Inserts,OTCPriviledge FROM Users ";
SqlDataAdapter da = new SqlDataAdapter(sql, conString);
da.Fill(ds, "Users");
//dataGridView1.DataBindings.Clear();
dataGridView1.DataSource = ds.Tables["Users"];
DataTable dt = ds.Tables["Users"];
CheckBox chkbox = new CheckBox();
------------------------------------------------------------------------------
I want the following columns to be checkbox when loaded into the dataGridView.
ReadOnly,Updates,Deletes,Inserts,OTCPriviledge
-- modified at 13:21 Friday 13th April, 2007
|
|
|
|
|
msogun wrote: dt.Rows[0]["Inserts"] = chkbox.Visible = true;
First what is this ?
|
|
|
|
|
That line should not be there. I was testing for something. The line is out now.
|
|
|
|
|
Try to change the property of the column to boolean
like DataGridview.Columns[index]
you can change the type of this column to boolean
My small attempt...
|
|
|
|
|
Index is not part of the context. Here is my code.
DataSet ds = new DataSet();
string sql;
sql = @"SELECT lastName,firstName,MiddleName,LoginName,Passwd,ReadOnly,Updates,Deletes,Inserts,OTCPriviledge FROM Users ";
SqlDataAdapter da = new SqlDataAdapter(sql, conString);
da.Fill(ds, "Users");
dataGridView1.DataSource = ds.Tables["Users"];
DataTable dt = ds.Tables["Users"];
CheckBox chkbox = new CheckBox();
dataGridView1.Columns[index] . ......;
What should be next?
|
|
|
|
|
try to change the datatype i mean value type of the column to boolean
My small attempt...
|
|
|
|
|
I'm having some problems incorporating a date range in a SQL SELECT expression when I use the dates as strings. The SQL expression doesn't return the correct data. I assume the SQL comparison of dates as strings is not accurate, but I assume that if I switch the data to date/time variables, then it will produce the correct results, but I'm experience a data criteria mismatch error, which I assume is due to syntax. How would I express:
"SELECT * FROM Results WHERE TestDate Between X AND Y"
WHERE X AND Y are Date/Time variables?
Thanks.
|
|
|
|
|
There is nothing wrong with your query per se, but it's better to avoid using strings as dates in your code when talking to databases - if the date formats are different, you will land in trouble.
It would be better still to avoid queries and use stored procedures.
Cheers,
Vikram.
"But nowadays, it means nothing. Features are never frozen, development keeps happening, bugs never get fixed, and documentation is something you might find on wikipedia."
- Marc Clifton on betas. Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
Hello all,
I am rather new to .Net and c# and I'm involved in a project using ip cameras to acquire video in asf/MPEG4 format. I would like to convert these videos to avi. I don't really want someone to give me an entire application to do this, but rather to point me in the general direction which I should take. I have already searched a bit on the net, but I haven't found a lot of interesting stuff.
Thank you in advance for any help you might give me.
Erik Ekhaugen
|
|
|
|