|
Maybe you can exclude it from serialization and write a class that converts it to a string or other serializable object.
greetz
Kurt
|
|
|
|
|
Can any one tell me how to program the control "ExchangeTreeViewControl"?
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
hey , i am trying to figure , how can i add an onClick Event to
DataGridViewButtonColumn.
1.as for now i gata a datagridview which one of its columns is a DataGridViewButtonColumn , and i want to make an event so when the user click on any of the buttons in the column that event will fire.
2. another funny thing i cant find where i can change the default color of the button it seems no mater what i do to change it using the class properties it doesnt change.
thanks for helping , i didnt find any articles about that ,
peace
Net
|
|
|
|
|
|
How would i add a bitmap for my mian windows app to load up??? in this program:
#include <windows.h>
/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsApp";
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil)
{
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application are saved */
WNDCLASSEX wincl; /* Data structure for the windowclass */
/* The Window structure */
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
wincl.style = CS_DBLCLKS; /* Catch double-clicks */
wincl.cbSize = sizeof (WNDCLASSEX);
/* Use default icon and mouse-pointer */
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
wincl.lpszMenuName = NULL; /* No menu */
wincl.cbClsExtra = 0; /* No extra bytes after the window class */
wincl.cbWndExtra = 0; /* structure or the window instance */
/* Use Windows's default color as the background of the window */
wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
/* Register the window class, and if it fails quit the program */
if (!RegisterClassEx (&wincl))
return 0;
/* The class is registered, let's create the program*/
hwnd = CreateWindowEx (
0, /* Extended possibilites for variation */
szClassName, /* Classname */
"Windows App", /* Title Text */
WS_OVERLAPPEDWINDOW, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
544, /* The programs width */
375, /* and height in pixels */
HWND_DESKTOP, /* The window is a child-window to desktop */
NULL, /* No menu */
hThisInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);
/* Make the window visible on the screen */
ShowWindow (hwnd, nFunsterStil);
/* Run the message loop. It will run until GetMessage() returns 0 */
while (GetMessage (&messages, NULL, 0, 0))
{
/* Translate virtual-key messages into character messages */
TranslateMessage(&messages);
/* Send message to WindowProcedure */
DispatchMessage(&messages);
}
/* The program return-value is 0 - The value that PostQuitMessage() gave */
return messages.wParam;
}
/* This function is called by the Windows function DispatchMessage() */
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) /* handle the messages */
{
case WM_DESTROY:
PostQuitMessage (0); /* send a WM_QUIT to the message queue */
break;
default: /* for messages that we don't deal with */
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0;
}
Michael
(Up and coming Game programmer)
EST
|
|
|
|
|
How do i link bitmaps to load with my game app window??Like if i'm using Dev-C++ Windows App Templete and want to link a bitmap with it in C. ( btw everything i'm talking about is C not C++)
Here the app program :
#include <windows.h>
/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "NinjaWars";
PAINTSTRUCT paintStruct;
/* Device Context*/
HDC hDC;
/* Text for display*/
char string[] = "Hello, World!";
/* Switch message, condition that is met will execute*/
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil)
{
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application are saved */
WNDCLASSEX wincl; /* Data structure for the windowclass */
/* The Window structure */
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
wincl.style = CS_DBLCLKS; /* Catch double-clicks */
wincl.cbSize = sizeof (WNDCLASSEX);
/* Use default icon and mouse-pointer */
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
wincl.lpszMenuName = NULL; /* No menu */
wincl.cbClsExtra = 0; /* No extra bytes after the window class */
wincl.cbWndExtra = 0; /* structure or the window instance */
/* Use Windows's default color as the background of the window */
wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
/* Register the window class, and if it fails quit the program */
if (!RegisterClassEx (&wincl))
return 0;
/* The class is registered, let's create the program*/
hwnd = CreateWindowEx (
0, /* Extended possibilites for variation */
szClassName, /* Classname */
"Ninja Wars", /* Title Text */
WS_OVERLAPPEDWINDOW, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
544, /* The programs width */
375, /* and height in pixels */
HWND_DESKTOP, /* The window is a child-window to desktop */
NULL, /* No menu */
hThisInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);
/* Make the window visible on the screen */
ShowWindow (hwnd, nFunsterStil);
/* Run the message loop. It will run until GetMessage() returns 0 */
while (GetMessage (&messages, NULL, 0, 0))
{
/* Translate virtual-key messages into character messages */
TranslateMessage(&messages);
/* Send message to WindowProcedure */
DispatchMessage(&messages);
}
/* The program return-value is 0 - The value that PostQuitMessage() gave */
return messages.wParam;
}
/* This function is called by the Windows function DispatchMessage() */
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) /* handle the messages */
{
case WM_DESTROY:
PostQuitMessage (0); /* send a WM_QUIT to the message queue */
break;
default: /* for messages that we don't deal with */
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0;
}
Michael
(Up and coming Game programmer)
EST
|
|
|
|
|
MMaines2005 wrote: (Up and coming Game programmer)
Not very far, apparently
1 - try using meaningful ( or at least different ) subjects for different questions
2 - You're not likely to find much help here, given that you want help coding in C and on an unusual compiler, but especially not in the C# forum. The visual c++ forum is your best bet.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi its muneeb,
i am using File.Move(sourceFilename, destFilename)method in my windows service, where "sourceFilename" is path of file placed on another IP Address i.e: 12.15.200.114, and my system IP Address is 12.15.194.251, i am getting an exception while calling this method "can't find the file'\\12.15.200.114\Files\abc.pdf'", even it exists !!!!.
I also made a mapdrive (Z:\) for the other system in my system, and made path z:\\Files\\abc.pdf, but Again its not working
To check this out i made a console application for both scenarios and made the same process it is working good, but not working in my windows service.
Their may be an issue for system rights and service logon, but i checked my service with my user account, administrator account and local system account.
Plz help me out, bc its getting to late....
Muneeb
|
|
|
|
|
i make a software help to connect many device with PC,use COM1 in PC.it sent a syntax(have adrees of receiver),and after a little time the device(receiver) sent data to PC in COM1
my problem is if it ask all device,and wait the answer all device,it used many time.that is bad
I want it work multitasking-it ask a device,and when it wait for answer,it can ask other device...
note:COM1 only can sent or receive at the moment
leo
|
|
|
|
|
nta_3886 wrote: help me quickly
Not only is that not a useful subject, it is rude.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Aw crap, I hit the Spam button when I tried to hit the 5, sorry.
|
|
|
|
|
LOL !!
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
lolo lol........
|
|
|
|
|
Here is a XAML snippet (which would run in XAML Pad as well):
<TabControl>
<TabItem Header="One">
<TabControl>
<TabItem Header="OK">
<Button Content="OK"/>
</TabItem>
<TabItem Header="Not OK">
<Button Content="Not OK"/>
</TabItem>
</TabControl>
</TabItem>
<TabItem Header="Two">
<TabControl>
<TabControl.Template>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="true" ClipToBounds="true">
<Grid.RowDefinitions>
<RowDefinition Name="RowDefinition0" Height="Auto" />
<RowDefinition Name="RowDefinition1" Height="*" />
</Grid.RowDefinitions>
<DockPanel>
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" Name="HeaderPanel" ZIndex="1" KeyboardNavigation.TabIndex="1" IsItemsHost="true" />
<Label Content="Something" />
</DockPanel>
<ContentPresenter Name="PART_SelectedContentHost" Grid.Column="0" Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" ContentSource="SelectedContent" />
</Grid>
</ControlTemplate>
</TabControl.Template>
<TabItem Header="Apple">
<Button Content="One Apple a day, keep the doctors away"/>
</TabItem>
<TabItem Header="Carrot">
<Button Content="One carrot a day, ho well, nothing special"/>
</TabItem>
</TabControl>
</TabItem>
</TabControl>
Where every time you select the TabItem "Two" (in the toplevel tab) the inner TabControl would change its selected item.
(every second time it will be "Apple" every other second time it will be "Carrot")
Why does the inner tab changes?
How to work around this bug?
|
|
|
|
|
Please help me, I need to translate the following c# code to VC++ and I don't have too much experience in C#, and don't have time to get the experience. Please help!!.
using Copy_Vendor.API;
namespace Copy_Vendor_Client
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
CopyVendor copyvendor = new CopyVendor();
copyvendor.SendPrintJobInformation(Convert.ToInt32(txtData.Text), 25.93);
}
catch (Exception ex)
{
string temp = ex.Message;
}
}
}
}
|
|
|
|
|
Wrong way, you should always go to C#.
|
|
|
|
|
AntonioRamirezL wrote: using Copy_Vendor.API;
There is #include in C++, but it does something slightly different. Do you have this component in C++ ? If not, you are hosed. You can write a C++/CLI wrapper for this code, but then you need .NET again.
AntonioRamirezL wrote: public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
None of this converts directly, you'll need to create an MFC form to replace this one
AntonioRamirezL wrote: CopyVendor copyvendor = new CopyVendor();
copyvendor.SendPrintJobInformation(Convert.ToInt32(txtData.Text), 25.93);
All this code does, is call the component. Do you have a non .NET version of the component ? If so, it's trivial, if not, you need to use .NET.
AntonioRamirezL wrote: catch (Exception ex)
{
string temp = ex.Message;
}
C++ has exceptions, but not exception objects.
At the end of the day, this is boilerplate forms code, which calls a black box. Either you have that black box visible to C++, or you don't.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you for your answer it was very helpful. Now I understand that I can convert almost all the code but this line is the difficult one
using Copy_Vendor.API;
I already have a Copy_Vendor.API.dll I'm not sure but I think it was written in c# no header file is provided (.h)and I thought I should use import. Don't you have any idea on how to convert this line to VC++?
Regards
Antonio
|
|
|
|
|
using namespace Copy_Vendor.API;
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
C++ to C++/CLI Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
How would I, make a picture show up in the buttom right corner and allow me to click/hold and move it anywhere and it will drop back down to the status bar and walk back to the bottom right corner?
I'm not very good at coding. I've only been looking and learning for the last few days off of here.
Also, how would i add in a initialize program code?
What i mean by that is; A code that when i click the button it will open the correct program i list to it.
For Example: The button says 'Enternet' I'd like when i click it, it will open Enternet Explorer for me.
Any help would be appreciated.
|
|
|
|
|
C# Beginner Nick wrote: Forum C#
Subject: Re: How do i....
Sender: C# Beginner Nick
Date: 21:17 3 Oct '07
How would I, make a picture show up in the buttom right corner and allow me to click/hold and move it anywhere and it will drop back down to the status bar and walk back to the bottom right corner?
I'm not very good at coding. I've only been looking and learning for the last few days off of here.
Also, how would i add in a initialize program code?
What i mean by that is; A code that when i click the button it will open the correct program i list to it.
For Example: The button says 'Enternet' I'd like when i click it, it will open Enternet Explorer for me.
Any help would be appreciated.
Honestly, I'd encourage you to work through a C# book's exercises first if you are just starting out. Spend some quality time with Visual Studio (Express Edition is fine) and read lots and write lots of code.
It is unclear to me what you are trying to accomplish, but I think you'll be much more successful if you start out learning the language and working through some exercises. It might seem "boring" or "a waste of time", but it isn't, really.
Good Luck!
TODO: Find a witty quote by someone famous to put here.
|
|
|
|
|
Alright, and i have been. I've been studying at http://www.cprogramming.com for the last 3 or 4 weeks and looking at everyone's codes here to learn other commands.
What i am trying to accomplish is making a little Desktop Buddy that walks around and allows me to right click him and open certain programs that i use alot.
But thanks for the tip and I'll keep on doing that. The excersices at cprogramming.com do not cover what I need to learn, Some of the things i needed to learn I found in the last program I had looked at This.Close I couldn't figure out how to close my program until last night while studying someone else's codes.
The Online help feature of Express Edition doesn't help much either when I type in key words it does almost the opposite of what I need.
Thanks again and I will continue studying and codeing.
-- modified at 7:01 Thursday 4th October, 2007
|
|
|
|
|
Well, to start another app is easy.
using System.Diagnostics;
...
...
Process.Start(@"C:\WINDOWS\system32\notepad.exe");
That, amazingly, would start up notepad. You can also pass an internet address, and it will open the default browser to that address.
|
|
|
|
|
Hi,
I have some simple class (in C# ) that create and start ( by call ShowWindows() method ) some Form.
In creating and showing this Form i want to set the Focus to him - but no matter what i do i cant do it (!! !)
The simple C# class is call and create in/from some C++ class that call the C# by using Com Interop.
Someone can help me please ?
Thanks.
|
|
|
|
|
As this is not a general problem but a problem that is specific to the code that you have written, nobody can help you without seeing any of that code.
---
single minded; short sighted; long gone;
|
|
|
|
|