|
you add a regular string value and put "[~]" between your string values and it will be added to the registry as a REG_MULTI_SZ value. In my case I only added one value, then still put {~] after it and it recognized it correctly.
Some Pictures[^]
BugReporter[^]
BlackDice
|
|
|
|
|
Hi,
Does anyone know of a Visual C# example that demonstrates displaying an XML file, using XSL, displaying the data, specifically a short document that might run for a few pages, in a standalone app? By that I mean the XML and XSL files would be resident on the Pocket PC (and a PC version would be nice, but I assume I could retrofit from the former to the latter) and not have to be accessed through the Internet.
Thanx in advance.
Derek
|
|
|
|
|
Hi,
In my WinForm App, I have a blocking call to dll that takes a while to return. I want to indicate the user to wait, probably by showing an animated gif or progress bar.
I dont want to go into threading. Is there any other way to do this.
I created another form that looks like small dialog with the animated gif and text box.I changed the FormBorderStyle property to FixedDialog.
I called it from my form as
<br />
WaitDialog WaitD = new WaitDialog(this); <br />
WaitD.Show();<br />
<br />
<br />
<br />
WaitD.Dispose();<br />
What happens is, it shows the wait form, but none of its controls ( the animated gif and text box) is shown. I get a blank white boxes in their places.
What should I do. Any ideas.
Thanks in advance.
-- modified at 15:10 Tuesday 28th February, 2006
|
|
|
|
|
Manu_81 wrote: a while to return. I want t
A blocking call is a blocking call, there's really no way around this. Once your UI thread makes the blocking call to your dll, you're stuck in that you cannot update your form. You *could* pass your form instance into the blocking call, and have the blocking call call form.Update or Application.DoEvents(), but that's sounding more like a hack than anything.
What's wrong with threading for this?
|
|
|
|
|
Apart from the blocking call, I also call various other functions from the dll and display the return results to the user. So if I do thread, that would be like updating the UI inside this thread, which I dont want to do.
I also want to avoid thread for this, as my app uses some threads in different places. I just dont want to use so many threads in my app...
So there is no way to get around this???
-- modified at 15:49 Tuesday 28th February, 2006
|
|
|
|
|
Manu_81 wrote: I just dont want to use so many threads in my app...
Threads are a good thing. They allow you to utilize multi-core and multi-processor machines far more than a single-threaded application would. They also keep your UI thread responsive, which end-users will praise you for.
I recommend that your DLL do its heavy lifting on another thread. While that thread is running, have the dll just display a "loading..." or "please wait..." dialog of some kind. Then, when the thread is finished, return the results to the UI thread for display to the user.
You can use the BackgroundWorker[^] class to help you do this in a simple manner.
The only other option would be to make a call to .Update() your form from your dll or call Application.DoEvents. However, there are caveats and gotchas associated with those solutions; the best solution is to do heavy lifting on a background thread.
|
|
|
|
|
Hi there,
I'm building a website. In my aspx files I have some text in german. The Umlaute (äüöß) are correctly displayed. But certain aspx.cs files are loading their content from text files. I'm using the StreamReader for this:
if (File.Exists(sPhysPath))
{
StreamReader sr = File.OpenText(sPhysPath);
_litContent.Text += sr.ReadToEnd();
}
_litContent is a LiteralControl which is used to display the text.
The problem I'm having is, that if the text in the textfile contains Umlaute, they are not displayed at all in the resulting html.
Can somebody help? Thanks in advance!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
The StreamReader will try to read the file as Uncode. Use for an example a BinaryReader instead, so that you can specify the encoding to use when reading the file.
---
b { font-weight: normal; }
|
|
|
|
|
Hello Programmers,
I'm working on a Chat Messenger. I've different types of control on the Form to beautify the look. Some Panels With Background Images etc. When I resize to grow, restore after minimize and Maximize the Window It Flickers and some black patches are shown on the Form.
Any suggestion which may solve the problem?
Thanks Alot in Advance,
Best Regards,
Rizwan Ahmed
|
|
|
|
|
Use double buffering. You can set a control's DoubleBuffered property to true. The DoubleBuffered property is protected, though, which means you can only set it if you're inheriting from the control. There are several articles on double buffering on CodeProject if you care to search.
|
|
|
|
|
Yeah I already tried double buffering and set double buffer property of all the conntrols on the form But it does not work at all. I see the same black paches while maximizing, restore etc. And also It consumes Lot Much CPU Time.
Any other Idea? And yeah of Course I know about double buffer:P and used it an image editor before.
Any further help will be appreciable.
BEST REGARDS,
|
|
|
|
|
dotnetdev83 wrote: And yeah of Course I know about double buffer
Then why didn't you mention that you had already tried this approach in the original message? It would have been useful info.
|
|
|
|
|
My code has the follwing structure:
public class A {<br />
static MessageBox msgBox;<br />
static Thread boxThread;<br />
<br />
static public showBox(string message) {<br />
boxThread = new Thread(new ParameterizedThreadStart(showForm));<br />
m_thread.Start(message); <br />
}<br />
<br />
static prvate showForm(object blah) {<br />
msgBox = new VWMessageBox();<br />
msgBox.Message = (String)stateinfo;<br />
Application.Run(msgBox);<br />
}<br />
<br />
static public hideBox() { }<br />
msgBox.Close();<br />
boxThread = null;<br />
}
When the other parts of my program try to call hideBox(), it gives me error saying cannot access something thats on another thread. I know that i should somehow use Invoke to call the delegate to hideBox, but this is static, how can i do this?
|
|
|
|
|
public static hideBox()
{
if(msgBox.InvokeRequired)
{
msgBox.Invoke((ThreadStart)hideBox);
}
else
{
msgBox.Close();
boxThread = null;
}
}
|
|
|
|
|
i was wondering if there is anything out there that will help me capture voice from my mic and save it as a wav file/data stream in c#?
DirectSound a good place to start looking?
SpeechSDK?
all help is greatly appreciated...thanks guys
|
|
|
|
|
|
Thanks, i took a look at this previously and downloaded it. The program didn't seem to demonstrate or do anything...not sure if im just too dumb to see it. any clarification of what this program does?
|
|
|
|
|
Hi everyone,
I'm putting some members and methods in a base class to reuse the code in various derived classes. I don't want the base-class items to be exposed beyond the derived class but I'd prefer direct access to the base-class items from the drived class.
For instance:
public class B
{
public string m;
public void baseFunc()
{
// foo
}
}
public class D : B
{
m = "my string";
baseFunc();
}
What is the proper base-class access modifier to use on m and baseFunc() so that D does not expose these? Perhaps protected?
Thanks.
|
|
|
|
|
Yes. The internal modifier might also do what you want, depending on whether you want it to be visible outside the module.
I would make the variables private, though, and provide a public, protected or internal property to access it.
---
b { font-weight: normal; }
|
|
|
|
|
Hi all,
I am looking for any info on how to write a custom control. I want to write my own control which looks like the visual studio .net editor with the text fold option (code folding). Could someone give me a tip on how to start, where to start? I have never written a control before so I am new. I will be using C#.
Many many thanks in advance.
dream2code
|
|
|
|
|
leppie has an open source text editor, AdvancedTextBox, akin to the VS editor. You can find his website with links to the source code here[^].
|
|
|
|
|
Hi
for yours custom control you have to derive it from System.Web.UI.UserControl
and there you can add properties as per yours requirements.
|
|
|
|
|
I have the following defined in my app.config file:
<configSections>
<sectionGroup name="FeedServices">
<section name="SsnConfiguration" type="FeedLib.SsnConfigurationHandler" />
<section name="AgencyConfiguration" type="FeedLib.AgencyConfigurationHandler" />
<section name="CompConfiguration" type="FeedLib.CompConfigurationHandler" />
</sectionGroup>
</configSections>
<FeedServices>
<SsnConfiguration type="FeedLib.SsnConfiguration">
...
</SsnConfiguration>
<AgencyConfiguration type="FeedLib.AgencyConfiguration">
...
</AgencyConfiguration>
<CompConfiguration type="FeedLib.CompConfiguration">
...
</CompConfiguration>
</FeedServices>
I also have the following code in a .dll file:
config = (SsnConfiguration)ConfigurationManager.GetSection("FeedServices/SsnConfiguration");
I have a command line application with a reference to the .dll file above, and when the above line is called, config is set to null; it's not finding the configuration section. Any ideas?
Thanks in advance.
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
The value returned from GetSection() will be the object (if any) returned from your IConfigurationSectionHandler.Create() implementation.
Put a breakpoint in your...
FeedLib.SsnConfigurationHandler.Create()
...method - it should get hit and you can see any issues in there.
|
|
|
|
|
Hi guys,
I've got a form that has a number of textboxes. When a button is clicked I want the data in the boxes to be sent to the class that opened the form. How do I go about doing this?
In myClass I call the form using
<br />
myForm.Show ();<br />
This opens the form but how then do I get the data from it? It seems to want an instance of the calling class in the myForm, but I can't do this.
Hope that makes sense.
|
|
|
|