|
I'd recommend NSIS, it's a very powerful installer and use it whenever I need to create an installer.
There is a bit of a learning curve to it but once you've learnt it you won't regret it.
|
|
|
|
|
I have a main form which instantiated with this command like everybody does:
Application.Run(new pdMainForm());
Problem is I want to access one of its control properties from another form but since it does not provide any instance name I couldn't find the proper way to get one of the form's control properties.
How can I access pdMainForm's control properties from another form?
Thanks in advance.
|
|
|
|
|
I code in VB.Net, and I don't typically use Application.Run() for forms the way you showed in your example. We would do something like pdMainForm.Show() , but I think I understand the concept and what you need to do is create a pointer for your main form before you start running it. So you would declare a variable with the DataType of your form's class first. Then you can run it and later you can still access it's properties the way you want to, so something like this I'm guessing:
Dim myMainForm as New pdMainForm<br />
Application.Run(myMainForm)<br />
<br />
Dim mySecondForm as New pdMainForm<br />
mySecondForm.Text = myMainForm.Text<br />
Application.Run(mySecondForm)
If this isn't what you were looking for, perhaps you could show us some more of your code and explain a bit more.
Hope this helps.
|
|
|
|
|
Try understanding and working with delegates or another approach is to pass current form's reference to other form from which your trying to control form.
|
|
|
|
|
Hi,
I'm experiencing a problem when printing text using Graphics.DrawString(). The horizontal character spacing appears inconsistent for each line of text, depending on the length of the string printed. It's pretty hard to explain what exactly is happening, but for instance, when printing:
Info::Defining 'FORCEBUILD' as 'False'
Info::Defining 'BUILDGLOBALDATA' as 'True'
Info::Defining 'BUILDTRACKINSTANCES' as 'False'
Info::Defining 'BUILDTRACKDYNAMICOBJECTS' as 'False'
Info::Defining 'BUILDTRACKSTATICOBJECTS' as 'False'
Info::Defining 'BUILDPAKFILES' as 'True'
Info::Defining 'BUILDGUIFILES' as 'False'
Info::Defining 'BUILDAICHARACTERSKINS' as 'False'
Info::Defining 'BUILDDRIVERCHARACTERSKINS' as 'False'
The first column of ' characters after Defining are aligned differently horizontally.
This is using the controls standard font MS San Serif 8.25, with all the system default text rendering settings.
I've tried changing the TextRenderingHint in the Graphics object, and found that TextRenderingHint.SingleBitPerPixel gives a consistent alignment, but looks awful, where the default seems to be TextRenderingHint.SingleBitPerPixelGridFit, (although TextRenderingHint.AntiAliasGridFit looks the same to me), giving the mis-aligned text.
[EDIT: In addition to this issue, when printing multi line text as above, the vertical spacing for each line of text is not consistent, ie. the vertical distance between each line of text is not the same number of pixels, some are 12 and some are 13 pixels, suggesting underlying floating point math.]
Any advice appreciated.
Cheers,
Andy.
modified on Thursday, April 24, 2008 6:44 AM
|
|
|
|
|
Hi all,
i am facing one problem in my windows application,
DateTime days;
DateTime day1;
DateTime day2;
day1 = (Convert.ToDateTime(dtdata1.Rows[0]["firstrepaymentduedate"]));
day2=(Convert.ToDateTime(dtdata1.Rows[0]["trenchdate"]));
decimal interestrate;
int outstandingamount;
decimal interestamount = (outstandingamount * interestrate * days) / 365;
here days is in datetime but interestamount is decimal.
so we are getting error in converting datetime to decimal
please any body knows this solution please give reply to me as soon as possible
thanks & regards
sarp
sarp
|
|
|
|
|
Use TimeSpan.Days.
also don't ask us to reply as soon as possible...
|
|
|
|
|
Hello All,
I Have One form when I click button There another form contain login when user click button ok it check user name and password if it is correct it is close login form
How can I do That, Please.
|
|
|
|
|
|
Hi All,
how to freeze the column in listview.for exe: click the listview header,left hand side of the selected column will remain static and visible, especially when the user scrolls right across the table/row to view columns currently out of view.
Thanks,
aravindakumar
|
|
|
|
|
Hi all,
I have 2 forms , formMain and formChild. What i wanna do is when the mouse is leave the formChild then it will become tranperancy. When the mouse move over the formchild then transperancy become 1 again.How can i archive it?
Any tips are welcome.
Thanks in advance
regards
cocoon
|
|
|
|
|
There's a mouse leave event, or you can capture the mouse and detect from it's move event when it left your form.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Christian,
Thanks, i got it
|
|
|
|
|
I have a problem in running application in remote desktop. In remote desktop 'Display' tab if i set color option as 'High color (16 bit)' my application is giving an error message like "Will not be able to display color images with these settings". So we have set 'True color (24 bit)' option. But in this case the application is working fine in some machines. In some machines the options gets changed automatically to 'Medium (16 bit)' and the application shows the same error message. OS used is Windows XP in all the machines.
Can somebody help me in solving this issue?
|
|
|
|
|
Hi All,
Is there any way of converting the windows form design to pdf format. The pdf format can contain only the text of each and every control in the form. I have explained the scenario more briefly in the following section :
I have a windows form(partially big) where the user will enter the details for each and every field. On clicking of the print button i should transfer the form design view to the pdf file and shd open that pdf file with the given data.
Is there any way to acheive this directly or indirectly.
Thanks in advance
Cheers
Mani.
|
|
|
|
|
You can just download a printer driver that spits out PDFs.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Graus,
Can you pls bit more clear...
Regards,
Mani.
|
|
|
|
|
I'm not sure how to be more clear. It's possible to download a printer driver, from the web, which, when you print, will create a pdf of the printed document.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
My requirement is to convert the windows form into a pdf document with certian rules which i have given in my question.
If u need any clarification pls let me know...
Regards,
Mani.
|
|
|
|
|
Your other option is to buy a PDF library and get the form to render to a bitmap ( the form class has a method for this ). But that will only render the visible area, if the form has any scrollable sections. Then you can turn the bitmap into a PDF.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have tried ur option of transferring the form to bitmao and what you said is right it copies only the visible portion of the form. I need to copy the entire form. How this can be done.
Regards,
Mani.
First have the WILL then u WILL
|
|
|
|
|
If you need to draw the form, you probably need to scroll it and stitch it together. The usual way tho, is to implimnet printing code and write the code to represent all your data as you see fit.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
can you pls give me an idea of implementing the printing code.
First have the WILL then u WILL
|
|
|
|
|
We often see in some softwares that when we run them, the main screen becomes dark, and a pop up message comes in front of us demanding for user name and password. At that time if we click the screen(form) behind that login dialog box, it is not click able. Once the application verifies user name and password, the screen(form) behind becomes click able. How can we implement this ?
|
|
|
|
|
Hi,
- Set the Form.Enabled property to false.
- Create a new form and show it (for the username and password etc).
- When you create this new form add an event handler for when it closes (in the parent form).
- If the event handler method, set the Form.Enabled property to true.
Cheers,
|
|
|
|