|
Hi,
I have a two part question, can be written in either C++ or C#
1. How to figure out which versions of VC++ runtime installed on the computer?
2. How do I write a bootsrap program that checks if Visual C++ 2008 Libraries installed or not and then goes and install Visual C++ 2008 Redistributable Package if not installed?
Thanks
Ben
|
|
|
|
|
1. IIRC, there's a Windows Side by Side (SxS) "assembly cache" for native dlls that might contain this information. Ask in the C++ forums for more info.
2. There's already a bootstrapper package in Visual Studio 2008 for this. See \Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages. Or, if you're building your own setup program inside Visual Studio, right-click on your setup project, Add Merge Module, then it will list the VC 2008 modules to include.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
How can I control the types of warning that VS2008 displays?
For example, the compiler currently warns of public members without comments. I want to supress this warning. How can I do that in VS?
|
|
|
|
|
In your project properties under "Build" you can set the warning level of the compiler (0-4) and also enter a list of warning numbers to suppress.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
If that one is bothering you, turn off XML Documentation in the Project->Settings->Build options.
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
OK - So when I select a project in the Solution Explorer, I can select Project > [Project Name] Properties... from the VS menu. Then I can select the "Build" side tab and update the "Errors and warnings" section to suppress the comment warnings.
This is good. However, my solution has 10 projects so I would like to configure this setting at the solution level. Do you know if this is possible?
|
|
|
|
|
Not that I know of. It's on a project by project basis. You could put the XML comments in....
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
In my previous topic I asked how to create more Labels with a button,
That works now, but. How do I make it so, that if I click on one a textbox needs to change.
This is impossable with my current code(?)
Thanks in advance.
|
|
|
|
|
So what you want to do is clicking on a label needs to change the text inside a TextBox?
If that's what you're trying to do, just hook up the LinkClicked event of the label, and inside the handler, set the text of the TextBox.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
private void CreateTextButton(string text)
{
int StartLocationX = 212;
int SpaceBetweenButtons = 5;
int NewPositionX;
if (LastPositionX != 0)
{
NewPositionX = LastPositionX + NPCTextButton.Width + SpaceBetweenButtons;
}
else
{
NewPositionX = StartLocationX;
}
this.NPCTextButton = new System.Windows.Forms.Label();
this.NPCTextButton.AutoSize = true;
this.NPCTextButton.BackColor = System.Drawing.Color.Transparent;
this.NPCTextButton.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.NPCTextButton.Location = new System.Drawing.Point(NewPositionX, PosY);
this.NPCTextButton.Name = text;
this.NPCTextButton.Size = new System.Drawing.Size(32, 16);
this.NPCTextButton.TabIndex = 4;
this.NPCTextButton.Text = text;
this.NPCTextButton.Click += new EventHandler(NPCTextButton_Click);
this.pictureBox1.Controls.Add(NPCTextButton);
this.NPCTextButton.BackColor = Color.FromArgb(0, NPCTextButton.BackColor);
LastPositionX = NewPositionX;
if (LastPositionX >= 452)
{
PosY += 24;
LastPositionX = 0;
}
NPCText.Text = NewPositionX.ToString();
}
NPCTextButton.Text returns me the 'newest' value created.
So, how can i check which one is clicked?
Thanks.
|
|
|
|
|
The sender argument of the event handler will be the one that was clicked.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
I'm a beginner C# and I was wondering if anyone knows where I could find or buy a chart (flow chart) that helps with the vocabulary of all the different terms. Example: Member Variables are part of Member Definitions. Member Variables can be called 'Fields', 'Characteristics', 'Objects' etc. When I reading they use several, what seems to be, interchangeable terms. It would be nice to look over at a chart that would help clarify these as I'm reading. Not just a vocab list but code with lines or something pointing to different parts and what they're called.
JustBFlat4Now
modified on Tuesday, June 17, 2008 3:06 PM
|
|
|
|
|
The best thing todo would be to buy a good book and study it until you can tell the difference between the items. If you happen to have a few examples of items you are getting confused with, please post them. Otherwise, I am not aware of any flow charts with what you are expecting. If you want I can post some suggestions for C# books, but some reliable publishers are Apress and Sams: Teach Yourself.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
You are correct it just takes time, especially for a beginner. I'm learning that studying C# is like walking up to a brick wall, breaking through, then another brick wall and then breaking through, over and over again. I'm amazed sometimes what seems so hard to understand now makes perfect sense one month later. Regarding the chart of terms for beginners, if someone where to create one, I know it would sell. I know I'd buy one.
Again thanks,
Back to my brick walls!
JustBFlat4Now
|
|
|
|
|
I use crystal report XI with .NET 2005. I have a problem that I would like to pass a parameter at runtime. I use this code which I search from google
SaleByDate rpt = new SaleByDate();
string[] objDate = Utils.Utils.SplitDateTime(currentDate);
string purchaseDate = objDate[2] + "-" + objDate[1] + "-" + objDate[0];
ParameterFields pfs = new ParameterFields();
ParameterField pfPurchaseDate = new ParameterField();
pfPurchaseDate.Name = "INVOICE_DATE";
pfPurchaseDate.HasCurrentValue = true;
ParameterDiscreteValue pdvPurchaseDate = new ParameterDiscreteValue();
pdvPurchaseDate.Value = purchaseDate;
pfPurchaseDate.CurrentValues.Add(pdvPurchaseDate);
pfs.Add(pfPurchaseDate);
crystalReportViewerSaleByDate.ReportSource = rpt;
crystalReportViewerSaleByDate.ParameterFieldInfo = pfs;
crystalReportViewerSaleByDate.Refresh();
but when I run the report. The report still asks me to put a parameter again. Is that normal. If not, how do I disable that prompt parameter.
|
|
|
|
|
I do google and somebody said that it is a bug of Crystal Report XI, but the topic was two years ago, and I already update my program to release 4 or the latest. But I still facing the same problem.
|
|
|
|
|
instead of creating new objects reference the ones in the report file, i.e.
ParameterField pfPurchaseDate = rpt.ParameterFields[0];
pfPurchaseDate.Name = "INVOICE_DATE";
pfPurchaseDate.HasCurrentValue = true;
ParameterDiscreteValue pdvPurchaseDate = new ParameterDiscreteValue();
pdvPurchaseDate.Value = purchaseDate;
pfPurchaseDate.CurrentValues.Add(pdvPurchaseDate);
crystalReportViewerSaleByDate.ReportSource = rpt;
crystalReportViewerSaleByDate.Refresh();
thats what you have to use in CR 2008, they keep removing setable properties in each version. Remember just because they release a new version doesnt mean they actually fixed any one perticular problem. There are quite a few people on the net complaining about things that dont work with CR, that were found a while ago that still havent been resolved.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I am having problems implmenting PCX files in my Image Converter application. I am a rookie programmer and I see that .Net does not support it.. Help would be greatly apprecited.
|
|
|
|
|
A simple search for "C# PCX" revealed Viewing PCX files in C#[^].
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
Thanks but I think that's CPP...
|
|
|
|
|
Yes, that's true, but really you can do the same thing in C#. Look at http://courses.ece.uiuc.edu/ece390/books/labmanual/graphics-pcx.html[^] if you need help with the format. Basically, it comes down to creating a Bitmap object and filling it with data from the PCX.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
SO I put this information into the DLL file?
|
|
|
|
|
Hello,
I am trying to add 'more' Labels in my C# application using a button.
So, when I click the button, a new label needs to be created on my form on pos x,y
I managed to do one. But how do I add more?
I think this is done using a List<>, But I have no idea how that works.
Current source:
private void CreateTextButton(string text)
{
int StartLocationX = 212;
int SpaceBetweenButtons = 5;
int NewPosition;
if (LastPosition != 0)
{
NewPosition = LastPosition + SpaceBetweenButtons;
}
else
{
NewPosition = StartLocationX;
}
this.NPCTextButton = new System.Windows.Forms.Label();
this.NPCTextButton.AutoSize = true;
this.NPCTextButton.BackColor = System.Drawing.Color.Transparent;
this.NPCTextButton.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.NPCTextButton.Location = new System.Drawing.Point(NewPosition, 191);
this.NPCTextButton.Name = text;
this.NPCTextButton.Size = new System.Drawing.Size(32, 16);
this.NPCTextButton.TabIndex = 4;
this.NPCTextButton.Text = text;
this.NPCTextButton.Click += new System.EventHandler(this.label1_Click);
this.pictureBox1.Controls.Add(NPCTextButton);
this.NPCTextButton.BackColor = Color.FromArgb(0, NPCTextButton.BackColor);
LastPosition = NewPosition;
}
private void button1_Click(object sender, EventArgs e)
{
CreateTextButton(newNPCTextButtonText.Text);
}
Thanks in advance.
|
|
|
|
|
Hi,
your code looks fine, except maybe for the value of SpaceBetweenButtons; try a larger value,
such as 300 (or calculate it based on the actual width of the previous button).
|
|
|
|
|
OH lol
it does work
I forgot to add the width of the previous button..
stupid me.
Thanks
okay, now that this works.
I need to make the buttons clickable and change the contents of a textbox.
How is this done?
modified on Tuesday, June 17, 2008 1:13 PM
|
|
|
|
|