|
This was quite a while ago
I finished the project but I have no idea what kind of workaround was required...
At my current project we use Janus GridEx instead of the standard WinForms DataGrid(View) which is pretty neat.
http://www.janusys.com/controls/
|
|
|
|
|
Using an icon editor I create the app icon. It contains 48x48, 2 - 32x32, and 2 - 16x16 images (five in all). The first three are for the application, the last two (32 & 16) are for the document file(s) associated with the application.
The problem is that the DefaultIcon key in the registry does not associate the correct icon with the document files.
Example:
C:\Program Files\Test App\TestApp.exe,0 <- regardless the value the results are the same! X| Is there a "How to" for using icons with a VS 2005 Windows Form app?
Thanks,
Mark
|
|
|
|
|
I think you're getting caught out between how .NET handles resources and how Win32 does. Explorer uses the old Win32 model for resources; .NET has a new incompatible model.
You also need to understand how icons work. Logically, each of the images in the same icon file represent the same icon. Windows or .NET pick the appropriate image out of the file depending on the size of the image requested (e.g. large vs small icons) and the screen colour depth (the system will use the highest available colour depth in the icon file that's less than or equal to the colour depth of the screen, for the requested icon size). If it doesn't have an icon in the requested size it will synthesize one by scaling up or down the icons that are available.
What you need to do is separate your images into three icon files: one for the app, and one for each of the document files. You then need to build a Win32-style resource file using a resource script (.rc file) and the Win32 resource compiler, rc.exe, to generate a .res file. You can then go to the Application tab in the project properties in Visual Studio 2005 and select Resource File rather than Icon, and select the .res file you generated.
I think you will need to add a version resource to the .rc file as well, if you want the Version tab to appear in Windows Explorer with your company name information.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Once I ran through the process of using the resource compiler (rc.exe) to create the .res file it occurred to me that I had done this before! Some time ago. Now Windows Explorer shows the correct icons for the document files.
Thanks for the help.
Mark
|
|
|
|
|
I have made a form, but i want to remove it from my windows taskbar, it doesnot mean i want to move it to notification area or want to hide, i want it on the scrren and the same time i dont want it on windows taskbar.
|
|
|
|
|
tamour wrote: have made a form, but i want to remove it from my windows taskbar
Select the form, go to 'Properties' and change the ShowInTaskbar property to false.
|
|
|
|
|
Buddy tahnku very much. In fact really really very much.
|
|
|
|
|
Hi,
From a Windows Form I do a call to a method in an external class. I want to display a Progress Bar that show me the progress of this method.
The progress of the method is increasing in it and my problem is that i don't know how can i update the Progress Bar.
Can somebody help me?
Thanks & sorry for my awful english.
|
|
|
|
|
|
Hi
I have some problem When I'm trying to make install package.
The package what I work is very big program suite. so the package have some editions : Home, Basic, Pro Editions.
What i want is that when user installs this package and enters SN, installer choose one edition which is selected by user and install.
But The tool I'm using is Advanced Installer. but this tool doesn't support what i want.
Are there any tools?
If you know about the tool what i want, please tell me.
Thank you
|
|
|
|
|
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.
|
|
|
|