|
Are you using native forms (System.Windows.Forms.Form) or custom inherited forms. I'm asking this because in many situations the derived form (or control) sets for example size or position in constructor and this would lead to the behaviour you described.
|
|
|
|
|
I have been exerimenting and searching for answers. I believe I may have fixed the issue. I have created one main form and I show all child forms in a panel of the main form. My font default for each form was different. When I changed the font of each form the sizes changed for the whole form. What caught my attention was a previous question in another forum was sub forms inheriting the parent forms formatting. So what I did is went through all the forms and panels changing the font to match the parent form. I only hope that this is the fix. So far so good. Thanks for all your suggestions!
|
|
|
|
|
Hello,
I'd like to change Windows system fonts dynamically and programmatically.
Like we do by right-clicking on the desktop, selecting "properties"->"Appearance" tab->listbox "Font size".
I found some information about the API SetupChangeFontSize, but it requires restarting the computer (and sometimes asks for the install CD), which isn't what I'm looking for.
I tried also to modify some registry keys/values under HKCU\Control Panel\Desktop\WindowMetrics, HKCU\Control Panel\Appearance.
Then sending a modification message to all the windows with SendMessageTimeout.
Without success.
Any idea?
Regards
|
|
|
|
|
Minart wrote: ike we do by right-clicking on the desktop, selecting "properties"->"Appearance" tab->listbox "Font size".
I found some information about the API SetupChangeFontSize, but it requires restarting the computer (and sometimes asks for the install CD), which isn't what I'm looking for.
Of course it does this. Those changes usually won't take effect until the system restarts.
You simply have no choice. A restart will be required to do this.
|
|
|
|
|
Then, if a restart is mandatory, how Windows does this when an user choose the menu?
|
|
|
|
|
We have a crystal report contains additional functions to get same text.
It works well if we exporting report to PDF file directly,
but display empty value if we preview report in Crystal Report Viewer.
We declare a global variable in one sub report,
it is a handle of an array, then we get same text from this global variable in other sub report.
any suggestion for this case?
Glad to discuss with you and best wishes.
|
|
|
|
|
Before the preview, is the ReportDocument.Refresh method called?
|
|
|
|
|
I tried add Refresh before preview, but it didn't work.
Glad to discuss with you and best wishes.
|
|
|
|
|
Is this possible??
I've tried all manner of possibilites including (but not limited to):
- "File:///C:/MyApp.exe" args1 args2
- "File:///C:/MyApp.exe args1 args2"
- "File:///C:/MyApp.exe%20args1%20args2"
- %22File:///C:/MyApp.exe%22%20args1%20args2
also tried with forward slash and backslash.
Any help is appreciated,
Adam.
|
|
|
|
|
Isn't it done using siwtches? /p etc
or using the -
myapp.exe -arg1 -arg2
?
Those look vaguely familiar?
|
|
|
|
|
Are you doing this in command line or from a program?
In both cases, you could simply remove the File:///. If command line, otherwise it's fine but if from program using Process.Start, you must separate the program and the arguments and deliver them as different parameters to the start method.
|
|
|
|
|
I have a DataGridView binded to this table:
[Users]
ID Name
-- ----
11 Qwe
22 Asd
Grid is directly binded with a typed dataset.
I have a second table like this:
[Records]
ID UserID Data
-- ------ ----
67 11 ....
68 11 ....
Records.UserID is connected to Users with a foreign key.
What I want to do is: when the user doubleclicks User #11 I open a new grid, binded to Records table but only binded to rows where UserID = 11 . Doubleclick, getting ID, new grid etc. those are I'm OK with. I wouldn't had any problems if I was doing this connected with sprocs but I want it to be binded and I simply have no idea how to do this.
Can you please give me any ideas?
|
|
|
|
|
I would use a dataview to service the records gridview.
When the user double clicks you set the rowfiler of the dataview
Dataview1.RowFilter = String.format("UserID = {0}",UserIDValue)
changing the filter of the dataview automatically updates the records gridview
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for the reply. The problem with Filter is that you have to retrieve all of the records first, than display the ones according to filter. Is there a way to retrieve just the records you want in the first place?
|
|
|
|
|
kensai wrote: Is there a way to retrieve just the records you want in the first place?
But of course. You have the userid, create a proc that returns the records for that user and bind the resulting datatable to the datasource. Changing datasource is a standard operation!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Unfortunately, the database is Sql Server CE which doesn't support sprocs
I think I need a way to bind data to a tableadapter custom method which returns records according to a parameter, in this case ID. No idea how to do this though
|
|
|
|
|
How do you get your data now, presumably SQL strings if procs are not supported. What's wrong with the following.
Select * from Records where UserID = iUserID
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello All,
I have a problem with event that I am generating after file download.
The flow is like this
1.initialize the DownloadfileCompleted event handler.
2.DownloadFileAsync(URI,str2)
3.After download completed it should display "download complete"
4.return "downloaded successfully"
but the problem is if the downloading takes more time it is directly coming to step 4. without waiting for completeion of step 3.
how can i make step 4 to wait until completeion of step3..
Thanks in Advance,
Ashok
ashok
|
|
|
|
|
How does step 1 look like in code?
I are troll
|
|
|
|
|
1. objWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(Event_DownloadFileCompleted);
2.objWebClient.DownloadFileAsync(new Uri(p_strSourcePath), l_strDestinationPath);
3.MessageBox.Show("Updated Successfully");
4.public void Event_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
MessageBox.Show("Download Completed");
}
ashok
|
|
|
|
|
I wrote same code before, it works well.
please check source file before download,
and you add try catch block to get whether exception.
Glad to discuss with you and best wishes.
|
|
|
|
|
To make it block the execution;
public bool downloadIsDone = false;
public void ZeDownloadMechanism()
{
objWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(
Event_DownloadFileCompleted);
objWebClient.DownloadFileAsync(new Uri(p_strSourcePath), l_strDestinationPath);
while (!downloadIsDone)
Application.DoEvents();
MessageBox.Show("Updated Successfully");
}
public void Event_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
downloadIsDone = true;
MessageBox.Show("Download Completed");
}
Why would you want to block execution on a Async-download?
I are troll
|
|
|
|
|
ThanQ for your help, can u brief the differences between normal download and async-download?
ashok
|
|
|
|
|
Sync (normal) blocks execution, Async doesn't. Simple example, if you normally play a soundfile in VB6, then the computer will not execute anything until the sound is finished playing. If you play it async, the computer will "move on", and execute your next instruction.
Hope this helps
I are troll
|
|
|
|
|
Hello,
I have an issue regarding executing a file.
The file is exectued by a launcher and we want to modify this launcher.
Unfortunately the source code for this launcher has been lost and we do not know how to execute the file anymore.
Therefore the launcher must be totally recreated, which has been done up to this single part...
Is it somehow possible to find out how to execute this file?
Or better asked: Is it possible to find out what command the launcher sends to execute the file?
Any solution to find this out would be nice!
I can already tell it is executed with several arguments by the launcher.
I thank you sincerely in advance,
OsoreWatashi
|
|
|
|