|
There isn't a merge module, but some installer programs let you mark the requirement, and they will download it.
I wrote a C++ program that installs the framework from CD then runs the MSI ( and does some other stuff, but that's irrelevant )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello
1- Open your project.
2- File => New => Project
3- Other Projects types => Setup and deployment => Setup project
4- Include the primary output of your project
5- Setup Project's properties => Prerequisites => Check on the folowwing
a- .Net framework
b- Windows Installer
c- Below that list check "Download prerequisites from the same location as my application"
NB.
Check other prerequisites as you may need more than just .Net framework depending on your project. eg. SQL Express or MSDE
Regards
|
|
|
|
|
I am coming from VB6. I looked up NET database examples for MS Access and find there are several ways to do the same thing. I saw one example use a OleDb provider, one used a ADO provider, and one used a SqlClient. My quesiton is- what should i be learning? Which should i use? What do most programmers use? My program philosophy is KISS. I think OleDb provides generic access? But i am not sure. Some advice from experienced programmers would be helpful.
|
|
|
|
|
Hello
Depending on which database you are building you should choose the data provider. The data provider actually is nothing but a mediator between the real DBMS and you .Net code.
So if you are using/accessing an Access DB then OLEDb is best for you.
OTOH if you want to make SQL server database for sure you'd use SQLDb provider.
for Oracle and other ODBC engines ODBC provider is intuitively your choice.
Was that what you were asking for? And what is KISS BTW?
Regards
|
|
|
|
|
Sorry, i forgot about all the non-english speakers on this forum. KISS stands for Keep It Simple. I am not a programmer who always reaches for the latest technology to solve a problem because often the technologies are not mature and
have many undocumented problems.
I learned that ADO from VB6 is supported in NET for backward compatibility. That was confusing me. I now understand that OleDb is the choice to use for NET.
|
|
|
|
|
Anyone seen something like this?
I have an application created with VS2003 with a setup project in the solution
nothing fancy. In this setup project I use the registry tab to instruct the install program to generate a certain registry key HKLM\Software\[Manufacturer]\etc...
But when I execute the install no such key is created!
Creating the key via a reg file works, meaning there is nothing wrong about the key
but despite the fact that I specify "create allways" nothing is ever created!
What could be wrong?
Ulf Rosvall
|
|
|
|
|
I am able to print a webpage from a webBrowser using the WebBrowser.Print() method, but I need to know how to print the page without the header or footer. The Print() method automatically adds these to the printed page and I don't want it.
I know I can remove this by calling WebBrowser.ShowPageSetupDialog() and clearing the header and footer fields, but I don't want my users to have to do this manually.
Is there a way I can remove the header and footer from the printed page?
Scott Clayton
|
|
|
|
|
Hi All,
Anyone know how to separate email address into two parts (username + domain name)in C#?
Thanks
H
|
|
|
|
|
string mail = "someone@domain.org";
string user = mail.Substring(0, mail.IndexOf('@'));
string domain = mail.Substring(mail.IndexOf('@') + 1);
This is a very basic version. You could first do a check if the format is valid using a regular expression. But when you know you got a valid email, you may use this one.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I should say...
If I am going to check for specific domain name (for example: *ah* in yahoo.com) Thanks
|
|
|
|
|
To check is a specified string is in another string use the following...
string test = "yahoo";
bool answer;
answer = test.Contains("ah");
answer = test.Contains("xp");
|
|
|
|
|
Hi Everybody!
Man, what would I do without this board ?! I think everything I know in programming is because of everybody's help in this board and code project's articles! THANKS! (REALLY!)
anyway, enough being emotional and all .
I created a thread that receives a stream from the net to get a string.
I want that string to be displayed on the application textbox (or in other words, instant messanger).
The problem is that when I'm trying to assign StreamReader's text into textbox.text I'm getting exception saying that:
"Cross-thread operation not valid: Control 'textBox1' accessed from a thread other than the thread it was created on."
I REALLY don't understand why is that. is it because textbox1 is on ONE thread (the window form thread) and the StreamReader is on the other (the thread I created)?
if so, how can I fix it?!?!?!
That is the code of the service() method ran by the thread:
<br />
private void service()<br />
{<br />
while(true)<br />
{<br />
socket = listener.AcceptSocket();<br />
<br />
try<br />
{<br />
Stream stream = new NetworkStream(socket);<br />
<br />
StreamReader sr = new StreamReader(stream);<br />
<br />
StreamWriter sw = new StreamWriter(stream);<br />
sw.AutoFlush = true;<br />
<br />
string text = sr.ReadToEnd();<br />
this.textBox1.Text = text;<br />
<br />
stream.Close();<br />
}<br />
catch(Exception e)<br />
{<br />
<br />
MessageBox.Show(e.Message);<br />
<br />
}<br />
<br />
socket.Close();<br />
}<br />
}
Thanks!!!!
|
|
|
|
|
Green Fuze wrote: I REALLY don't understand why is that. is it because textbox1 is on ONE thread (the window form thread) and the StreamReader is on the other (the thread I created)?
Exactly. You're not allowed to access controls from a thread other than the one they were created on. Use Invoke or BeginInvoke to resolve the problem. There's also a very good article on this topic here on CP Search for Invoke and you should find it.
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks alot!
I'll try that.
by the way, I'm stealing your signature for my personal mail, ok? (its hilarious!)
|
|
|
|
|
Green Fuze wrote: I'm stealing your signature for my personal mail, ok?
Why wouldn't it be? It's a quote, so he "stole" it himself.
---
b { font-weight: normal; }
|
|
|
|
|
Hey
I am just starting with generics:
How can I convert a float to type T (which is either a float or a double and is iconvertible)?
I get the error:
Cannot convert type 'float' to 'T'
Problem 2...
The error:
Operator '*' cannot be applied to operands of type 'T' and 'T'
when I multiply two numbers
What can I do about this? Does float inherit from some class that defines basic mathematical operations?
All help is greatly appreciated
|
|
|
|
|
Perhaps a snippet or two of your code would help?
|
|
|
|
|
It's rather simple:
#1:
this.X = (T)xValue;
where this.X and xValue is float and T is double or float.
#2:
Math.Sqrt( X*X+Y*Y);
where X,Y are of type T which is either double or float (and impleements iconvertable).
thank you!
|
|
|
|
|
Hello
Actually this is not the snippet he was lokking for. You should post the definition of your generic class/method itself rather than just its call.
Also don't forget to check "Ignore HTML tags..." checkbox present below the editting textbox.
Regards
|
|
|
|
|
hi frens
i wan't to develop a software like circuitmaker, that's capable of making DFD's for that i need to implement drag and drop of objects , i have no idea how to make that happen , so that they can be drawn as well as scaled,etc. a solution with XML shall be a great help
Sameer Sood
|
|
|
|
|
Hello
ssoffline wrote: i need to implement drag and drop of objects
here take a look at these two articles:
How to tutorial (very good)[^]
TreeViewDragDrop[^]
ssoffline wrote: can be drawn as well as scaled
You can do all that using a Graphics object.
ssoffline wrote: a solution with XML shall be a great help
Now that's a bit weird!!
Regards
|
|
|
|
|
how can set print layout and zoom
by default as in this image
http://www.shoppinp.com/report.gif
??
Palestine
|
|
|
|
|
I'm developing a chart library with C# that outputs a SVG (Scalable Vector Graphic) file. SVG is pure XML output so there are no WinForms involved whatsoever.
In order to avoid overlapping text I'd like to use the MeasureString(...) and then set text properties (font size) accordingly, if overlap occurred. The Graphics object seems to be a prerequisite as it provides MeasureString(...). Is there a way of using MeasureString(...) functionality without using Graphics.
I've seen a possible solution which creates a random Graphics object out of a Bitmap which can then be "abused" to provide MeasureString(...) functionality:
<br />
Bitmap bmp = new Bitmap(1,1); <br />
Graphics g = Graphics.FromImage(bmp); <br />
g.MeasureString(...)<br />
Would you call this an elegant solution or is it just a workaround?
Once again: Is there another possibility of calculating the width of a string without Graphics?
Cheers.
|
|
|
|
|
Hello
I don't know about SVG formats but isn't displaying the text without overlapping would be the problem of the form that will read the file??
Anyway, if you want a graphics object, you don't need a bitmap, simple make call CreateGraphics() from your form -you still got one, right?-, and it will return a graphics object to work with.
Regards
|
|
|
|
|
Hello,
thanks for your reply.
Let me make things clearer.
SVG is a vector graphics format based on XML. The .NET application I'm currently developing generates such a SVG file. In this file various shapes, text elements, paths are described. Once the file is created the job is done.
As mentioned there are also text elements in the SVG, e.g. "This is a text" rendered as Arial, Bold, 12pt. MeasureString(...) would be ideal to calculate the size of any text although I'm eventually creating a SVG file.
Bear in mind: There is no form involved, so CreateGraphics() can't be invoked. Any further advice?
Thanks
|
|
|
|