|
HI i just created a setup project of my c# application. the primary output has been added to the application folder. and i am getting the default path as c:/programfiles/productname....
i want to change that, i mean i need the default installation flder as c:/productname....
My small attempt...
|
|
|
|
|
Right-click the Application Folder in the left pane and choose Properties Window from its Context menu. In the Properties Window, notice that the DefaultLocation property contains the information that defines the default installation location. The items in brackets are tokens that get replaced when the user is running the setup program. The Manufacturer token pulls its value from the company name you entered when you installed C#.
Visit my blog at http://dotnetforeveryone.blogspot.com
|
|
|
|
|
Hi all,
I have a listbox and i have some items in it but when i select these items
, these items flicker .
so, can anyone help me how can i solve this problem?
Praveen Sharma
|
|
|
|
|
Hi,
when the selection changes, the affected items get painted again.
1.
Is the ListBox painting itself (not userdraw)? if so:
Are your ListBox items simple strings? or complex objects whose ToString() takes some time?
2.
Is the ListBox userdrawn? if so:
is your DrawItem handler taking some time, e.g. fetching data from a database?
Maybe showing some code would help us help you.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi,
I am trying to create a setup program to deploy a .net 2 web app. When I right-click on the setup project and then go Add -> Project Output, I only see "Content Files" in the Add Project Output Group dialog box. Why do I not see the other options like "Primary output".
Any help would be greatly appreciated. Thanks in advance.
Regards,
|
|
|
|
|
hei.. add a new sepup project in the same solution ... then right click that setup project u wil see "add"... from there you can see "project output" . upon selecting that optio you will get the provision to select the primary output . please check the combo box which is at the top, it will contain the project name.
My small attempt...
|
|
|
|
|
I can see "primary output" for a Windows project but Not for a Web Project? Can you see it for a Web Project?
|
|
|
|
|
what are you going to do with "setup" for web project. want to install web page anywhere.. are you crazy????
My small attempt...
|
|
|
|
|
|
Thank you very much J4amieC for this vital piece of information, that for some reason is not mentioned in either of my two books on C# 2008 (at $60 and $40, less a cent each)!
And having done much of my C++ development with the Borland C++ Builder, this was not entirely obvious.
Fred,
(Another BCB Fan)
|
|
|
|
|
hy everyone!
i was asked to do the following:
i do have an access database which contains a list of account infos. the view looks like this:
acc_id subacc_id acc_name acc_child
the first column contains an index number, the second one is either 0 or an acc_id number (if 0 then it is a parent account, otherwise it is a child account of the parent account, which number is found in the subacc_id). the third filed is the name of the account. and the last one is a counter of how many children are available for the parent account.
what i want to do now:
i want to create a (hierarchical) treeview of this situation. so when it is a parent then it is layer 1, if it is a child then it will be located in layer 2 (so child to the refered parent). on the other hand i do also want to insert the infos of the selected element in some outputfield, meaning the columns of the selected element.
my problem is, i did a lot of c# programming, but i have never done this before. the user interface is quit simple but it has to be filled as well.
so to summarize what i want to do:
1) enter the elements out of the database (row by row) in a (hierarchical) tree view (with parent nodes and child nodes)
2) when an element in the treeview is selected then the infos (which acc_id, which childacc_id, which acc_name and the number of children) have to be displayed in some textfields.
could someone help me out of this please?
by the way: is the collapsing and expanding of the treeview done automatically or do i have to code this as well.
thanks again for your help.
stephan.
|
|
|
|
|
Have you tried searching i) CodeProject ii) MSDN documentation iii) Google for information?
The scenario you describe is quite common; there will be plenty of examples on the web to populate a TreeView control. I suggest you do some research, attempt to solve the problem yourself and post back if you encounter any specific difficulties.
Paul Marfleet
|
|
|
|
|
i already did but it confused me more than it helped
i already had a look at codeproject and google, but it didn't really help me.
well to add the infos in the textboxes is very simple. and i guess to add a new node will be as well, but my number one problem is: how do i read from the database, how do i access it? do i have to access it like a textfile or am i able to address the fields? i included the source to my project, so the first step is done ...
well i will try to find out some more details, but if someone could provide me some further infos as well this would really help. (maybe even a link to a page which describes my problem). because all the things i found didn't work or help me so far.
|
|
|
|
|
This article[^] shows you how to fetch data from an MS Access database using C#. It should be straightforward to modify the example to populate a TreeView control.
Paul Marfleet
|
|
|
|
|
Iam using two forms in a windows appln. How can I access the control of the second form from the first form.
Thank you
|
|
|
|
|
2 options really.
1) Expose the whole control as a property of form 2.
on form2:
public TextBox TextBox
{
get{ return this.textBox; }
}
then in form1:
Form2 form2 = new Form2();<br />
form2.TextBox.Text = "Hello World";
2) Expose just that functionality that you need, without exposing the whole control (this way is arguably preferable)
on form2:
public string SomeTextBoxInfo
{
get{ return this.textBox.Text; }
set{ this.textBox.Text = value
}
then in form1:
Form2 form2 = new Form2();<br />
form2.SomeTextBoxInfo = "Hello World";
|
|
|
|
|
Hello,
This[^] is the answere, from Colin!
All the best,
Martin
|
|
|
|
|
Hi,
after created a good serial number generator, and found the way to use my serial with the msi setup project... I'd like to store the serial number (when possible in a file)....
How can I do????
|
|
|
|
|
|
LoL... Sorry!
I didn't get the notification e-mail! It was exactly what I was looking for, but now we decided to go on another philosophy and check the Serial Number every time the program gets started.
Anyway, that helped me a lot finding the answer to my last question.
Life is not short... the problem is only how you organize yourself
|
|
|
|
|
hi i am working on a project under which i have to store a image in access database i know that the data type of the access variable must be ole object
unfortunately i dont have an idea abt storing it. i know that this question is suited for ado.net forum but i hope you guys will help me even a glimps of the c# code will be helpfull
sindhu tiwari
its me sid
|
|
|
|
|
Save the image to a MemoryStream and use the ToArray method to get the data as a byte array. The byte array can be saved in the database field.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
thanks for the code but at run time a error is thrown saying
""'"Data type mismatch in criteria expression."'''"
if u have any idea abt this error please let me know
regards
sindhu tiwari
its me sid
|
|
|
|
|
sindhutiwari wrote: thanks for the code
I didn't provide any code.
sindhutiwari wrote: at run time a error is thrown saying
""'"Data type mismatch in criteria expression."'''"
That is an error message from the database that tells you that your SQL query is invalid.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
This should get you started:
private byte[] ConvertImage(Bitmap image, ImageFormat format)
{
if (image == null)
throw new ArgumentNullException("image");
using (MemoryStream ms = new MemoryStream())
{
image.Save(ms, format);
return ms.ToArray();
}
} The ImageFormat parameter just tells you what format the image is that you want to save, e.g. Jpeg or Png.
Deja View - the feeling that you've seen this post before.
|
|
|
|