|
for each(myStruct in myStructArray)
{
//code segments
}
Nigah M Manzoor
|
|
|
|
|
Can some one please point to a sample CLR project developed using VC++ .net 3.5 framework. Or a book which describes on creating projects in vs 2008.
Thanks
|
|
|
|
|
Everything you need to know is this (for VS 2008):
File -> New -> Project then look for Windows Form Application
click to Form1.h, you can see Form1.h [Design] and you can place some components from Toolbox there. In Properties are the characters of components.
|
|
|
|
|
Xaria wrote: Can some one please point to a sample CLR project developed using VC++ .net 3.5 framework.
Well I have not installed VS2008 yet but VS2005 and all the way back to like VC6 came with samples in the Installation. Take a look in your Programs Files/<VS install folder> etc., they may already be there, if not run the Installer and look for Samples as an option and install them.
led mike
|
|
|
|
|
Xaria wrote: Or a book which describes on creating projects in vs 2008.
Here's my short book on creating a CLR project in VS2008:
1) Start VS
2) From the file menu, choose New/Project...
3) In the New Project dialog, select .NET Framework 3.5 with the drop-button on the upper right.
4) Select Visual C++/CLR in the Project Types tree
5) Select a template in the Templates list
6) Give the project a name and location in the appropriate dialog fields, creating a solution if necessary
7) Click OK
8) Open the solution explorer window (View menu/Solution Explorer)
9) Right click the new project in the solution explorer and click Rebuild
You should now have a working sample CLR project developed using VC++ .net 3.5 framework.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Wow, I just saw this. Do you have a short book on toilet training also?
I mean if someone needs those instructions they have no reason to launch Visual Studio to start with.
led mike
|
|
|
|
|
|
Hi. I'm using Visual Studio 2005 C++/CLI. I have setup my application to print a document (basically the screen). I had to set the e-Graphics->PageScale = 0.85 to get the screen to fit the page, but I need to have every page be of Landscape orientation. I have tried this->printDocument->PrinterSettings->DefaultPageSettings->Landscape = true and this->printDialog->PrinterSettings->DefaultPageSettings->Landscape = true (and some slight variations) but the document is always printed as set in the print dialog (which defaults to Landscape - Portrait). Is it because there are more than one printer on our network? Do I have to read the array list of InstalledPrinters and determine which one I am using and change the orientation that way?
Thanks,
Buck
|
|
|
|
|
Answer to my own question. It is this->printDocument->DefaultPageSettings->Landscape = true before calling the printDialog->ShowDialog();
|
|
|
|
|
Dear All,
I am developing an application for decoding MPEG streams using DirectShow in VC++ Windows Application forms. Now I have connected all the pins of the filters after creating the graph. I want to run the graph, when I call pControl->Run(), a movie window will be created automatically and plays the movie. Instead of playing in automatically created window, I want to play the movie in the window created by me, bcoz I need to specify the size of the window and to have the full control of the playing window.
I have tried this in MFC and it is working fine by creating my own class and inheriting the CWnd class and using the CreateEX method to create the window. The problem is I dont know how to create the same window using VC++ Windows forms application. Please kindly advice.
Many thanks in advance.
|
|
|
|
|
bhanu_8509 wrote: The problem is I dont know how to create the same window using VC++ Windows forms application.
Maybe the NativeWindow Class[^] will help...
May be some useful info here too:
Interop (How Do I in Visual C++)[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hi,
can u tell me how to connect database to .net windows form application
Thank you,
|
|
|
|
|
|
hi,
thanks for reply.
I am using MSAccess. can you give me some example links, i couldn,t understand.
Thanks again,
|
|
|
|
|
rose196 wrote: can you give me some example links
No, I can't.
If you do some research (starting at that link), you'll see there's many methods
available for accessing databases from C++. Each has pros and cons.
Choose a method, learn how it works, then I can maybe help.
ADO.NET is probably the easiest to get started with in managed code, but
even explaining ADO.NET here is a bit much to ask.
You'll find tons of working sample code in the documentation.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
rose196 wrote: how to connect database to .net windows form application
Try googling, or doing a search on this site. www.connectionstrings.com[^] is also very helpful.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello guys,
I want to read the content of a textbox (a path) and then edit a file at this path.
The type of textbox->Text is System::String^ but file manipulating functions all need char* type parameters. How can I cast the text of the textbox into a char* variable, or are there newer functions than fopen(), fprintf() and so on, which work with managed type variables?
Thanks and best wishes,
Manfred
|
|
|
|
|
Hi,
in .NET you can do most of not all text processing using the String type; have a look at
the File and/or FileInfo classes.
|
|
|
|
|
array<wchar_t>^ szArray = strPath->ToCharArray();
char buffer[50]={0};
int i = 0;
for each(wchar_t ch in szArray)
buffer[i++] = ch;
Nigah M Manzoor
|
|
|
|
|
Thanks, it's working now
|
|
|
|
|
It is giving an error undeclared identifier i dont know why ?
I am making Win32 Window through WINAPI , WNDPROC, WNDCLASSEX now, in
WNDCLASSEX structure i have define "static LPCTSTR szAppName= L"OFWin""
WindowClass.lpszClassName= szAppName;
So wat to do in order to resolve it. ?
Headers windows.h is included.
|
|
|
|
|
Why is the compiler looking for "OFWin" as an identifier when
"OFWin" is characters in a string?
This compiles for me:
static LPCTSTR szAppName= _T("OFWin");
WNDCLASSEX wce;
wce.lpszClassName = szAppName;
Also...
static LPCTSTR szAppName= L"OFWin";
should be
static LPCTSTR szAppName= _T("OFWin");
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I am using Visual c++ NEt 2005, I need to set the title of my DataGridView when I printed it using gridDrawer dll but I can't.
Who have try to put a title to his printed DataGridView using GridDrawer dll. I need help
|
|
|
|
|
If you are talking about the Article here on CodeProject you should ask the question in the forum at the bottom of the article.
led mike
|
|
|
|
|
Can i use a beforeNavigate2 event with a webbrowser form contorl?
I have two forms with webbrowser controls. When I click on a link in webrowser1, the page should be displayed in webBrowser2.
to do this i wish to use beforenavigate2 to cancel the request and then use the url to open in webBrowser2.
How can I accoplish this?
|
|
|
|