|
Thanks for your information. But if I'd prefer using MFC rather than .NET, What about the future of MFC? Will it be obsolete like Win16 Apps when came Win32 Apps?
Is Microsoft still developing MFC? because I've heard that Microsoft stops developing VB6.
|
|
|
|
|
VB6 is as dead as the dodo, because it's evolved to VB.NET. MFC 6.0 is dead, because it's evolved into MFC 7.1. MFC didn't get a lot of attention in the last two compiler releases, but C++ certainly did. Either way, the framework exists, and you have the source code. I don't think MFC is the best way to go anymore, but people still write pre MFC style windows apps, you can use whatever framework you like.
If you're using MFC, why ask in the .NET framework forum ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Actually I plan to port to .NET framework,
but I don't want to waste too much time for porting my existing apps.
Maybe there's an existing MFC-like framework in .NET so I ask in this forum.
Thanx,
|
|
|
|
|
senzafine wrote:
Actually I plan to port to .NET framework,
Well, then use managed C++ to start with, and you'll be in the .NET framework. DON'T write an MFC app, .NET will not support it, you'll be creating rewrite headaches, unless you keep your presentation layer very seperate and resign yourself to rewriting it.
senzafine wrote:
Maybe there's an existing MFC-like framework in .NET so I ask in this forum.
There isn't one that's analogous to MFC, not that I know of.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I have an app developed using Windows Forms. I need to save the size that the user resizes the app to, so as to open the app window to that size when the user restarts the app. I also need to save the desktop location of the app, so as to display the app window at that location when the app restarts.
What is the best way to do this?
I have implemented this using a config file, such that I save the size.width, size.height, and location.x, location.y of the app when the event to close the app is fired. The problem with this is that when the user closes the app in its minimized state, then the app size is 160 x 30, and the app re-opens at this size at the next restart.
Thanks.
-Shefali
|
|
|
|
|
Check first before writing to the config file ,if
if(this.WindowsState==FormWindowsState.Normal)<br />
{<br />
}
|
|
|
|
|
Hey guys, has anyone else run accross this behavior before?
When using dataadapter.update within the context of a transaction, if the transaction succeeds your datasource has .acceptchanges called and everything is fine. If that transaction fails however, .acceptchanges is still called.
this just doesn't seem right to me? according to a post i found on google ms's recommended way of dealing with this is to make a copy of the data before submitting the update, then if the transaction fails, clear the data and merge the previous version back into the main dataset. i was baffled when i came upon this the other day.
does anyone have any insight as to whether this behavior might be changing in the next release of the bcl? i don't have any of the beta's to check it out and i'm more just curious than anything. seems like if the transaction failed they should just leave the rowstate data as is...
-jim
|
|
|
|
|
I'm having troubles with the MonthCalendar control.
I want its culture to be en-US, but is always
shows the names according to the current locale settings.
My locale settings are Bulgarian and the control appears
twice as wide and it's ugly. It displays the whole names
of the days of the week, not just the first three letters
and it's very very wide. I tried changing the culture of the
assembly but it appears that:
Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be localized, Culture should always be empty'
Is there a way to get MonthCalendar always display the
english names?
|
|
|
|
|
Hi,
I use an ArrayList to store class objects which have some public properties defined.
After adding objects to the ArrayList and binding the ArrayList to a datagrid I see all entries of the ArrayList and all public property fields of the class.
However, if I add further objects to the ArrayList or remove some, the datagrid is not updated at all. I have to reset the DataSource property and make a new databinding to see the current ArrayList content
e.g.
dataGrid1.DataSource = null;
dataGrid1.DataSource = myArrayList;
I am sure there is a better way to do that and I guess it has to do with implementing a certain interface, but everything I found so far was quite confusing.
Does anyone have simple example code showing how to do it ?
thanks
ch
|
|
|
|
|
There is a method on the DataGrid object called Refresh ().
Just call that in your code, and it should update the view.
In fact, there is a tutorial right here at the CodeProject, in which the author does something very similar to what you are doing (written for Managed C++ .NET).
http://www.codeproject.com/managedcpp/DataGridSampleMCpp.asp[^]
|
|
|
|
|
Hi guys,
I have created one pocket pc application in C#. I am using
windows pocket pc installation machanism to install the application to
the pocket pc. At the time of installation i am installing .NET
Compact Framework and SQL CE with my application using the
installation machanism.
I have tested it in windows 2000 server and Windows XP with
SP1, it is working fine. But when I tested in windows 2003 server and
windows XP with SP2, it won't able to install the application. What
can I do?. Anybody help me???
Thanks in advance....
Joji Perayil
|
|
|
|
|
Hello Developers,
I want to create a rotated font, and I use the following code to achieve this, like in this sample (http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_fxsamples/html/7c8b073b-5889-45e7-9a99-ebee39fe3b79.asp[^]), but using 1.1 framework.
Font CreateRotatedFont(int angle, Graphics g)
{
LOGFONT lf = new LOGFONT();
// scale a 12 point font for current screen DPI
lf.Height = (int)(-16f * g.DpiY / 96);
lf.Width = 0;
// rotation angle in tenths of degrees
lf.Escapement = angle * 10;
// Orientation == Escapement for mobile device OS
lf.Orientation = lf.Escapement;
lf.Weight = 0;
lf.Italic = 0;
lf.Underline = 0;
lf.StrikeOut = 0;
lf.CharSet = 0; //LogFontCharSet.Default;
lf.OutPrecision = 0;//LogFontPrecision.Default;
lf.ClipPrecision = 0;//LogFontClipPrecision.Default;
lf.Quality = 5;//LogFontQuality.ClearType;
lf.PitchAndFamily = 0;//LogFontPitchAndFamily.Default;
lf.FaceName = "Tahoma";
return System.Drawing.Font.FromLogFont(lf);
}
Am I doing something wrong in this code, or maybe someone did similar code once?
Thank you!
|
|
|
|
|
WinFX is user with .NET framework 2.0.
|
|
|
|
|
Hi,
I'm trying to work out the standard deviation of some numeric data in my form... but I can't see any way to call a StDev function. I've hunted high and low on the web and in the .Net help but I can't seem to find anything like this... can anybody make any suggestions as to how to do this?
TIA...
Mike
|
|
|
|
|
You can calculate StdDev is a simple loop.
1) Calculate the average of all values.
2) For each value X calculate DIFF = (X-AVG).
3) Square each DIFF value.
4) Sum the Squared DIFF values for the entire data set.
5) Divide the Sum of Squared DIFFs by (n-1) where n = number of values.
6) StdDev = Square Root of value calculated in Step 5.
Robert
|
|
|
|
|
Thanks so much for that - I really appreciate it... I'll give that a try when I get a chance to get back to that project.
Mike
|
|
|
|
|
G'day everyone,
I've tried to begin playing with smart device and pocket pc 2003 using VS .net 2003. I can begin a project, no problem, but when I try to debug, it comes up with an error...
One or more files from the Emulator for Windows CE installation is missing,
Please reinstall Emulator for Windows CE and try again.
Well, I've done that numerous times, even tried v 5.0 and 4.2, downloaded and installed just about every tool and sdk for the smartphone and pocket pc and still I get this error.
Im running VS 2003 and XP Pro.
Any ideas on how to get this to work would be great.
Cheers in advance.
Craig
|
|
|
|
|
Running XP SP2? Check this[^] out. Found just by typing the error messAge into Search box on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I know this is fundamental question, but simply I am beginer in WindowsForms.
In VCL in DragDrop events there are Sender and Source, but in WindowsForms there is only Sender. How can I obtain a Source?
TIA
|
|
|
|
|
|
Ok, an example:
I have two ListBox (list1, list2). I'm preparing the drag&drop functionality for this list. I know the basic. First I must do that then that ... So I move item from list1 to list2. Sender point at list2 (I think). In VCL Source point at list1. Is there any pointer in WindowsForms like the Source in VCL? Of course I know I can make a variable and on begining of the d'n'd I can keep the source object in this variable. I wonder if there is "pretty" way to obtain a source object.
TIA
|
|
|
|
|
Well I'm not the d'n'd specialist. But as I see it, I would do the following:
In the OnItemDrag event of list1 you call DoDragDrop() . As the data parameter of DoDragDrop() you set the ListItem that the user is dragging.
In the OnDragDrop method of List2 you have the sender object as well as DragEventArgs .
Sender is List2. DragEventArgs has a property Data with a method GetData() to get the object you passed in the DoDragDrop() method as Data parameter.
And I think that is what you need. Because that is your ListItem the user is dragging from List1 to List2 and that you have to add to List2 now. What do you need a reference to List1 for in this situation, it should be sufficient to have the reference to your ListItem .
Claudio
Claudio's Website
Hommingberger Gepardenforelle
|
|
|
|
|
richTextBoxResult->Find(System::Convert::ToString(textBoxSearch->Text),RichTextBoxFinds::WholeWord);
labelSearchResult->Text = System::Convert::ToString(a);
richTextBoxResult->SelectionColor = Color::Red;
richTextBoxResult->SelectionFont = new System::Drawing::Font(S"Microsoft Sans Serif",8.25f,FontStyle::Bold);
------------
Above, richBoxResult colors only one matched word and changes to Red. However, I need to change the color to red in all my strings. How do I do that? It seems I need to loop the stmts above.
|
|
|
|
|
You do realize this is the C# Forum and not the C++ Forum, right?
[EDIT]
Whoops! My mistake! I just came from the C# Forum.
Your code only finds one occurance of the text. If you want to find more, you'll have to start the Find over again after the occurance you've already found.
Ask this in the Managed C++ Forum[^]...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello, I need help. Can anyone explain me how to create a zip filter to use with pocket pc and web services, bidirecional, since pocket pc does not support WSE 2.0 I can't use "Adding a zip filter to web services". Thanks
|
|
|
|