|
Yes, your customers would have to install the .NET Framework before using any application developed in a .NET language. The .NET Framework is not required for C++\MFC, but it is however required if you use MC++.
|
|
|
|
|
Your customer MUST install the .NET Framework (the same version you developed your app under) in order to run your application.
If you app was written using C++/MFC, without using any managed extension, then you can get away with deploying your app without the .NET Framework. But, if your app was coded in Managed C++, then your customers will have to install the Framework in order to use your app.
There are projects out there that will strip down the .NET Framework and install only those components requires by your application, but this is NOT a recommended practice. It makes the Framework lighter in terms of disk space, but if your custom were to try and install a Service Pack for the .NET Framework, it won't work. Also, if you run into problems and must consult Microsoft on the issue, the FIRST thing they'll tell you to do is install the ENTIRE .NET Framework.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi all,
(1)i've got 24 columns in my Ms access database. After selecting a row, i need to extract each of this value and store them in an array. Currently, i'm using this method which is kinda long:
foreach (DataTable getTable in graph_ds.Tables )
{
foreach (DataRow getRow in getTable.Rows )
{
//extract the values from the 24 columns
string a = getRow["col1"].ToString();
string b = getRow["col2"].ToString();
string c = getRow["col3"].ToString();
string d = getRow["col4"].ToString();
string e = getRow["col5"].ToString();
..........
string x = getRow["col24"].ToString();
..........
//store them in an array
float [] b = new float[24];
b[0]= float.Parse(a);
b[1]=float.Parse(b);
b[2]=float.Parse(c);
b[3]=float.Parse(d);
..........
b[23]=float.Parse(x);
}
}
Is there any other shorter method.?
(2)i've got 24 column in my database. after i've selected a row based on a certain condition, how do i get the biggest value in this 24 column?
Chris
|
|
|
|
|
why not just throw in another loop there so you dont have to repetitively read each of the 24 columns? Somthing like this:
<br />
<br />
foreach(DataTable dt in myDataSet.Tables)<br />
{<br />
int colCount = dt.Columns.Count;<br />
foreach(DataRow dr in dt.Rows)<br />
{<br />
float [] b = new float[colCount]<br />
for(int i=0;i<colCount;i++)<br />
{ <br />
string colName = String.Format("col{0}",i+1);<br />
b[i] = float.Parse(dr[colName].ToString);<br />
}<br />
<br />
}<br />
}<br />
|
|
|
|
|
I made up a bigger and explicit answer but i wasn't logged on so here is the short version :P :
(1)use the following loooop
<br />
for(int i = 0 ; i < 24; i++) {<br />
b[i] = Convert.ToFloat(getRow["col" + i + 1]);<br />
}<br />
(2)use a sort routine on the vector (actualy a get max value search the whole vector and store the biggest value)
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
hi, thanks for the reply. however, my column name isn't col1 to col24. it goes like this: date, 0000, 0100, 0200....1000,1200,1300..2300. i tried your method. Since i'm using this extracted data to plot a graph, i need to do twice for this:
for(int i = 0 ; i < 24; i++)
{
b[i] = Convert.ToFloat(getRow["0" + i + "00"]);
}
for(int j = 0 ; j < 24; j++)
{
c[i] = Convert.ToFloat(getRow[i + "00"]);
}
But i realise it's not possible to plot the graph. so is there another method where i can extract all the column data in just 1 for loop?
|
|
|
|
|
hi, thanks for the reply. however, my column name isn't col1 to col24. it goes like this: date, 0000, 0100, 0200....1000,1200,1300..2300. i tried your method. Since i'm using this extracted data to plot a graph, i need to do twice for this:
for(int i = 0 ; i < 24; i++)
{
b[i] = Convert.ToFloat(getRow["0" + i + "00"]);
}
for(int j = 0 ; j < 24; j++)
{
c[i] = Convert.ToFloat(getRow[i + "00"]);
}
But i realise it's not possible to plot the graph. so is there another method where i can extract all the column data in just 1 for loop?
anyway sorry for the annoymous msg haha
Chris
|
|
|
|
|
hey i managed to extract the information and plot the graph. thanks alot. anw i'm still stuck on hw to get the biggest value. like i say my column name goes like this: date, 0000,0100,0200.....,0900,1000,1100,..2200,2300. so how shu i go about getting the biggest value from column 0000 to 2300.?
|
|
|
|
|
hey thanks anyway, i solve on hw to get the biggest value.
Chris
|
|
|
|
|
I've written a DirectSound application in C# that controls the playback/streaming of audio data.
In my application, I have three UserControls. The code for each of these Controls performs a particular DSP task.
The following is added in the main form's constructor:
rbDSP1.Tag = new ControlFactory(ctlDSP1.Create);
rbDSP2.Tag = new ControlFactory(ctlDSP2.Create);
rbDSP3.Tag = new ControlFactory(ctlDSP3.Create);
On my main form, I have a panel that is used to display these controls. Clicking one of three radio buttons results in the corresponding control being displayed in the panel area.
The code for this is as follows:
private void DisplayControl(object sender, System.EventArgs e)
{
RadioButton rb = sender as RadioButton;
if (rb != null)
{
if (rb.Checked)
{
if (m_DSPControl != null)
{
panelControl.Controls.Remove(m_DSPControl);
m_DSPControl.Dispose();
}
ControlFactory cf = rb.Tag as ControlFactory;
m_DSPControl = cf();
if (m_DSPControl != null)
panelControl.Controls.Add(m_DSPControl);
}
}
}
public static Control Create()
{
return new ctlDSP1();
}
Just as an example, let's say UserControl ctlDSP1 just has a trackbar that acts as a volume control, and I need to obtain the value of the trackbar to control the volume of the playback buffer (whose code is in the main form).
I used Tom's suggestion (http://tinyurl.com/46yov), and it works.
However, I still face the following problem:
In the main form, how do I ensure that I am creating the Event Handler for ctlDSP1 and not for the other controls?
|
|
|
|
|
If I understand you correctly, you just need some type checking. You're already doing it with as (a safe cast), but you can also use is or a simple type check using GetType and typeof .
You might also consider using polymorphism instead of class factories, since activation in the .NET Framework - both for local and remote classes - is already handled by the Framework. IF all your controls implement the same interface you wouldn't have to worry about differences in types as long as your interface exposes the properties, methods, and events you need.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi all,
I am reading a file which contains 128 byte header and then the actual pixel data. The bit depth is 12bits with the data type given as LSB_MSB (i think it means the first 8 bits of first byte contains LSB's and the next 8 bits contains reamaining 4 MSB bits... am i right?). Means this image file data is 12 bit dpeth with a range of (4096) greylevels. Now I am trying to convert this into 24 bit BMP file means 8 bits per R,G,B layer, since this is a greylevel image we will have same R,G,B value which leaves us with 256 grey levels instead of 4096. Now how can i do this conversion... or should i have to ignore the 4 MSB bits and consider only 8 LSB bits and create an RGB image form it....please help me out.. its very urgent....
Plz atleast any suggestions or ideas are appreciated... I have posted already abt this many times(from 1 month)...but i dont know whether I am not clear to u all... since as this is a site full of experts, i think atleast one may know this...
thanks in advance,
Suman
|
|
|
|
|
I don't think you're right. Did you try to impliment what I suggested to you this morning ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi Graus,
Yeah I have implemented a program which reads my file byte by byte and shows them on a richtextbox...and i did get ur point of shifting but i dont know how to shift the values by 4 (as I am reading byte by byte, becos i have to use 2 bytes of data at time). I think if I get tht shifting, I can implement this conversion program in full.
One more doubt can I use the BitmapCreate function "CreateBitmap" in c# for creating new Bitmap for this data. If so should I have to copy all the data tht i read from previous file into an array and then pass it as the data pointer to this command...
thanks,
Suman
|
|
|
|
|
Hi Graus,
thanks for ur ideas.... and atlast I am almost done with my program (but i don't know whether it gives correct image or not). I am not getting your shifting thing. See we are having 2 bytes of data for each pixel naaa... in which first byte consists LSB bits. and in the next byte we are having MSB bits (does in this byte the first four MS bits are our data or the last 4 LS bits are our data). By shifting... wht kind of shifting are u suggesting... either circular shift(left or right) or just left/right shift of 4 values. after shifting which byte should we have to take (first byte or second byte) after shifting wht happens to the padded values or intial 4 bits. All these doubts are there in my head . Plz, help me out in this and I dont ask u again on this
Suman
|
|
|
|
|
Hi Graus,
Thanks for ur advices and I have done this conversion atlast by using a LUT for (4096 to 256) and will this produces a nice image or not?... actually first of all i read the data in byte format and look over it and it seems pretty much the same as i said the LSB bits in first byte and in the second byte the upper nibble are zeros and the lower nibble is consisting of remainin four bits. Wht i did is i read both bytes at a time and used the value of first byte to add with the calculated value by using the four lower bits of second byte like (Bit0*256+Bit1*512+Bit2*1024+Bit3*2048) which gives me a value ranging between (0 - 4096) and then i used the LUT for getting corresponding greylevel in (0-255) range. Can u tell me whether I am right or not?...
thanks,
Suman
|
|
|
|
|
I have no idea, how does it look ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
can anyone please tell me how to make toolbars and menues looks like those of Windows XP, i managed to to repaint the form (Graphics g=this.CreateGraphics();
Brush paintingBrush=new LinearGradientBrush(this.ClientRectangle,Color.FromArgb(243,244,247),
Color.FromArgb(239,236,213),0.0f);
g.FillRectangle(paintingBrush,this.ClientRectangle);
paintingBrush.Dispose();
g.Dispose();)
but no paint events for menues or toolbars to override or backColor to set transparent
please help.
thnx
Mr.Cooper
C# beginner
|
|
|
|
|
You need to search this site using the text box directly below the top logo on every page. There are several articles on this site that discuss the topic and provide sample code.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
LOL. Heath
Its amazing how hard it is teach a newbie to use a search engine. Finally when it "clicks" its like: "WOW". LOL.
|
|
|
|
|
i'm trying to write a prog that would sit between a client email program (outlook. etc) and the actual email server. it's something like a prog that would intercept all incoming and outgoing mails (POP3 and SMTP) for filtering purposes. i've search all over the web and i couldn't find anything that could help me get started.
so is there anyone who could at least guide me to somewhere so tat i could get started? maybe some code samples or maybe "how to" tutorials or anything.
is it possible if i were to create a prog that would "relay" communication between the email client end the email server? if that's possbible then how do i do it? i know how to go around with a web proxy and a ftp proxy but i just can't seem to figure out pop3 and smtp proxy. so if there's anyone who could help .. i would really appreciate it. i've practically search all over the web for this and i've havent found any yet. thanks
|
|
|
|
|
What you probably need to do is implement a program that provides a pop3 server locally on your computer, that your email client can connect to.
When your program gets a connection, it'll transparently connect itself to whatever the real mailserver is, and pass through any commands from the email client to the real server (and back again)
Once you've got this working, then you'll be able to add code that examines the incoming mail, and does whatever filtering you require.
Try searching google for "pop3 protocol" for lots of info on how pop3 works (and searching for pop3 here gets plenty of articles too)
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
my application consiste of a main form with main menu from this menu i open another forms with (ShowDialog) after closing this form i want to dispode and release the memory used by it , but using memory profiler i noticed that this child form still in memory because it is refrenced by a ThreadStart object
NOTE : i have disposed all member variables of this form and it is really released but how can i dispose thread or threadstart object
please help me
|
|
|
|
|
did u use the abort function to end the thread?
|
|
|
|
|
yes i use it but it does not work
|
|
|
|