|
Don't change the Windows Forms Designer generated code. There is a big warning message telling you not to.
If you instantiate the object in the constructor of the form the code in the InitialiseComponent method will replace your version with its own. This is evident if you step through the code with the debugger.
Two options:
* If you want to keep using the designer for this control then you should be passing this information as properties to the control rather than in the constructor.
* If you don't mind the loss of the designer control over this control then do it all manually in the constructor (or your own method called from the constructor)
|
|
|
|
|
I have made a Rss Reader (Windows app) - it takes one Url(i.e. watever.com/rss.xml) and reads its contents. But its not working with those sites which have authentication (e.g. those sites need userid/password to enter and read Rss feed).
My question is how can I authenticate to a site thru my application or thru programming ?
I need some help.
----------------------------
**** JOB23743 Submitted ****
|
|
|
|
|
Depends on the kind of authentication the site requires, if the site uses cookies to set authentication, then use cookies in your code.
|
|
|
|
|
It requires http authentication.
----------------------------
**** JOB23743 Submitted ****
|
|
|
|
|
|
Hi all,
This is the scenario: the user is able to initiate some process by selecting some data from a form, dragging it and dropping it onto another independent form. I want to add the option of introducing a context menu if the user were to use the right mouse button to do the drag&drop just before said process is initiated (using the context menu, the user can define how that process behaves).
My initial attempt looks something like this:
<br />
...<br />
private void HandleDragDrop()<br />
{<br />
doSomething<br />
...<br />
contextMenuStrip.Show();<br />
...<br />
doSomethingElse<br />
}<br />
Two problems with this:
1. contextMenuStrip.Show(); by itself doesn't appear to be blocking. It does display the context menu but then goes ahead and executes all subsequent commands without waiting for user input.
2. The selection made is handled elsewhere using a standard Click event handler so even if I were able to stop the program to await user selection, I wonder if the context would leap from the Click event handler back to the statement immediately following the .Show() command. Sounds too easy for it to be correct...
Ideally, I would like to be able to do something similar to
<br />
...<br />
DialogResult response = MessageBox.Show(...);<br />
if (response == DialogResult.OK)<br />
...<br />
...but using a context menu (because I want to be able to select from a list of options and not just Yes or No but mainly so that users do not get upset if they were to see a Message Box rather than a context menu...).
Any ideas or help would be greatly appreciated!
cheers!
|
|
|
|
|
jozsurf wrote: 1. contextMenuStrip.Show(); by itself doesn't appear to be blocking. It does display the context menu but then goes ahead and executes all subsequent commands without waiting for user input.
that's because contextMenuStrip.Show(); doesn't work like ShowDialog.. it only presents you the menu..
if "...doSomethingElse" depends on what user does/selects in the menu you should put it in context menu items event handlers.. onClick for MenuItems for example..
life is study!!!
|
|
|
|
|
cheers! that makes sense. The code will need a little refactoring though...
|
|
|
|
|
Hi, i'm creating a C# program that measures date differences. for example i have 2 text boxes, one text box contains the date 4/12/2007, the other text box contains 5/23/2008. I need to count the number of days difference from 4/12/2007 to 5/23/2008.
Im sorta new to C# and i have no idea how to do this, since i cant just treat it as simple numerical values, given that it must reference the calendar for the measurements to be exact.
thanks in adavance..
|
|
|
|
|
See the documentation for the DateTime and TimeSpan classes
|
|
|
|
|
Colin Angus Mackay wrote: See the documentation for the DateTime and TimeSpan classes
tnx!
|
|
|
|
|
Please Can you explain me how to use existing .resx file for a new project. I attached the existing resource file correctly. When i do it i ll get a error saying
"Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Mockup.Mockup.resources" was correctly embedded or linked into assembly "OfficePlanSample" at compile time, or that all the satellite assemblies required are loadable and fully signed. "
Here "Mockup" is the new namespace name and the internal class name and "OfficePlanSample" is the new namespace name. please can anybody help me in here. Thanks.
Asith
|
|
|
|
|
just copy in ur project and do something like myresource.mykey, right click on the resource file and check it's properties change to "embeded"
|
|
|
|
|
Thanks for your reply mate, now its working properly.
Asit
|
|
|
|
|
Dear All,
Is there any method avl to export the images in a PDF document via Dotnet.
Thanks In Advance
Dana
|
|
|
|
|
No, there is no PDF support whatsoever, without third party libraries.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Dear Christian,
Thanks for your reply.Is there any free thrid party avaliable.I found one DLL .That is iTextsharp.But it doesnt have the image export method
Dana
|
|
|
|
|
There are free ones, but they generally just create a PDF from text or maybe images. I don't know, if I needed one, I would buy one. b/c if I was making money, I'd spend money to make sure it worked OK.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Can you mention some dll(paid one) which will extract the images from pdf pages
|
|
|
|
|
how to do this? i have this code written:
Dialog1::Dialog1(CWnd* pParent /*=NULL*/)
: CDialog(Dialog1::IDD, pParent)
{
dlg.Create( IDD_DIALOG2, pParent);
}
void Dialog1::OnBnClickedOk()
{
// TODO: Add your control notification handler code here
CRect rectClient;
CRect rectWnd;
GetWindowRect( rectWnd );
GetClientRect( rectClient );
rectClient.OffsetRect( rectWnd.left, rectWnd.top);
dlg.SetWindowPos(&wndTop, rectClient.left, rectClient.top, rectClient.Width(), rectClient.Height(), SWP_SHOWWINDOW);
dlg.ShowWindow(SW_SHOW);
}
but dialog2 shows behind dialog1 and doesn't move follow dialog1
i want make dialog2 as a part in dialog1
Thanks!
|
|
|
|
|
|
i need help for converting c# code to c++.
Is there any kind of coverter for this please send it to me.
please do help me .
MISHAQ
|
|
|
|
|
No, there is not. To convert C# to C++/CLI is trivial, and you can buy converters. To convert it to straight C++ is not really possible via an automated process.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
ok thanx for replying
but sir you can tell me how function ToInt16()or ToInt32()will be converted.
MIshaq
|
|
|
|
|
That depends. You may use a cast, or you may have to use atoi
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|