|
Hi all,
I have a ToolBar on my form. Each button associated to an image from an ImageList .
Why when I disable the button, the button becomes all gray ( and not grayscale image ) ?
Do I have to apply a second grayscale image for each button for disable mode ?
If so, How do I do it ?
|
|
|
|
|
here is my problem.
i have a RichTexBox with a document in it. after some modifications it needs to be printed. however in the printed version no white spaces must be left from the end of a paragraph to the end of the line.
i have tried to adjust the size of the RichTextBox to the size of the paper used by the printer (usualy A4) and set left and right indentation of text (making a copy of the rtf before this in order to print it unindented, otherwise it will just double the indentation) accordingly to printer settings indentation values.
however print preview and printed version text differs from the one shown on screen. the text is printed as formated text with justified align and different fonts and sizes, using a control derived from RichTextBox witch has such printing support described here
now if anyone has any ideas as to how i can atleast hadle this problem ..
|
|
|
|
|
the toggle field view button is disabled so i can see my fieds any ideas on getting it enabled
|
|
|
|
|
found it myself dam document outline window
|
|
|
|
|
hi,
We are doing a project on Live video conferencing in LAN.File is recoreded on a single PC but the actual thing must do is to send the data on a network.I m using directshow for this in which "IMediaControl Interface" is used for run and stop the file to record.But i need the actual data(streams).The question is:
1.How to get Audio & Video Stream data using Directshow?
2.How to send,replay this data on network?
plz reply me soon.
best regards
shumyla
|
|
|
|
|
hi,
i found something rather odd and was simply wondering if anyone can explain this. I have a thread responsible for displaying a Form (in an event driven manner). When trying to display this form, i've notived that usage of .Show() causes the new form to hang (the frame is displayed, but the text field in it is empty, and the mouse shows an hourglass when hovered over this form). On the other hand, use of .ShowDialog() seems to display it fine. Given that it's displayed in its own thread, it doesn't matter which method i use, as the application continues fine. But i was just wondering if anyone can explain why the behaviour is different in this context?
In case it's of any relevance, here's the code
(running on XP Pro, developed in VS .Net 2003 against SDK 1.1)
<code>
public PopupFactory()
{
Thread t = new Thread(new ThreadStart(waitForEvents));
t.start();
}
private void waitForEvents()
{
while ( true )
{
lock(al)
{
Monitor.Wait(al);
l.log("got a pulse from another thread on al");
string[] z_details = (string[])al[al.Count - 1];
ZTransparentWindow z = new ZTransparentWindow(z_details[0], z_details[1]);
z.ShowDialog();
z.Show();
}
}
}
</code>
thanks!
|
|
|
|
|
The reason Show doesn't work is because your thread doesn't have a message pump. Without a message pump, your window can't respond to user actions. ShowDialog runs its own message pump on the calling thread, so it works. See this[^] article to know more about message pumps and stuff.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I too have come across this seemingly odd error, however the solution is pretty clear once you figure out what's happening. An example solution would be as follows:
private delegate void ShowFormDelegate(string[] details);
...
public PopupFactory()
{
Thread t = new Thread(new ThreadStart(waitForEvents));
t.start();
}
private void waitForEvents()
{
while ( true )
{
lock(al)
{
Monitor.Wait(al);
l.log("got a pulse from another thread on al");
string[] z_details = (string[])al[al.Count - 1];
this.ShowForm(z_details);
}
}
}
public void ShowForm(string[] z_details) {
if(this.InvokeRequired)
{
this.BeginInvoke(new ShowFormDelegate(ShowForm), new object[] z_details});
}
else
{
ZTransparentWindow z = new ZTransparentWindow(z_details[0], z_details[1]);
z.Show();
}
}
Although I haven't tested the code, and therefore cannot guarantee that it works, you should be able to get the idea behind it. I myself am still not QUITE certain why the Show() method doesn't work the way you had it, but I assume it has something to do with the thread that it's being called from. This method guarantees that the form is spawned from the main window. Good luck.
|
|
|
|
|
In richtextbox has Undo(), but it clear all text
I want it excute such as notepad program
hello
|
|
|
|
|
The Undo function in a RichTextBox behaves like the one in a TextBox (what Notepad is, basically).
If you want anything else you'll have to specify it more clearly.
mav
|
|
|
|
|
Dear everybody
I am programming with DataGrid control in C#. The problem is that when my column header text is too long. How can I make this text wrapped into another line? The same problem with the column header but in the case I want the text showed vertically.
Thank you very much
Nguyen Thai Binh
|
|
|
|
|
try it by increasing header font size.
|
|
|
|
|
Font's size doesn't affect anything. When the text is too long, it is just hidden by other columns. And if you want to show the text vertically, you have no way???
|
|
|
|
|
for increasing the column header we can use this code
but i could not find to wrap it.
DataGridTableStyle dgTbStyle = new DataGridTableStyle();
dgTbStyle.MappingName = tb.ToString();
dataGrid1.TableStyles.Add(dgTbStyle);
dataGrid1.TableStyles[0].GridColumnStyles[0].Width = 100;
dataGrid1.TableStyles[0].GridColumnStyles[1].Width = 150;
|
|
|
|
|
Thank you for you timely help. It's easy to change the width of the column's header. But there is no place in DataGrid that support us to change the height. It seems that DataGridView in .Net 2005 has this features. However, I want this for my application. Can you give me the answer?
|
|
|
|
|
How to get first object of checked listview without using foreach loop.
|
|
|
|
|
does this help
DataGridItem Item = lstLeads.SelectedItem;
//get value of checkbox
CheckBox aptCheck = (CheckBox)e.Item.Cells[5].Controls[1];
|
|
|
|
|
tidy up a bit
ListView Item = dtgLeads.SelectedItem;
//get value of checkbox
CheckBox aptCheck = (CheckBox)Item.Cells[0].Controls[1];
|
|
|
|
|
ListViewItem it = lstGuarantee.SelectedItems[0];
if(it.Checked)
{
}
|
|
|
|
|
dataset i created with some merges, i want to put that dataset into another empty database that has the same datastruture already.
|
|
|
|
|
just use t-sql
select * into [your new table] from [source data table]
or
insert into [dest data table] ... select ... from [your source table]
even you can write a c# function also use the same
ASP.NET C# VB VC & SQL Windows APP ...
|
|
|
|
|
Dear Friends,
When i am opening my web page from my localhost which is in ASP.Net with C#.
the page is simple nothing is there on page. it gives me error like
Parser Error Message: Could not load type 'talibgroup.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="talibgroup.Global" %>
Source File: c:\inetpub\wwwroot\talibgroup\global.asax Line: 1
Please help me to solve this problem.
Thanks
Murtuza Patel
|
|
|
|
|
The code is as follows:
this.client = new RTCClientClass();
this.client.Initialize();
this.client.EventFilter =RTCConst.RTCEF_ALL;
this.client.IRTCEventNotification_Event_Event += new IRTCEventNotification_EventEventHandler(OnRTCEvent);
void OnRTCEvent(RTC_EVENT rtcEventType, object rtcEvent)
{
Trace.WriteLine("Entering RTCPresenceCore.OnRTCEvent " + rtcEventType);
switch (rtcEventType)
{
case RTC_EVENT.RTCE_REGISTRATION_STATE_CHANGE:
this.OnRTCRegistrationStateChangeEvent((IRTCRegistrationStateChangeEvent) rtcEvent);
break;
case RTC_EVENT.RTCE_CLIENT:
this.OnRTCClientEvent((IRTCClientEvent)rtcEvent);
break;
case RTC_EVENT.RTCE_BUDDY:
this.OnRTCBuddyEvent((IRTCBuddyEvent2)rtcEvent);
break;
case RTC_EVENT.RTCE_ROAMING:
break;
case RTC_EVENT.RTCE_PROFILE:
this.OnRTCProfileEvent((IRTCProfileEvent2)rtcEvent);
break;
case RTC_EVENT.RTCE_PRESENCE_PROPERTY:
break;
case RTC_EVENT.RTCE_PRESENCE_DATA:
break;
case RTC_EVENT.RTCE_MESSAGING:
OnIRTCMessagingEvent((IRTCMessagingEvent)rtcEvent);
break;
default:
break;
}
}
But I can not receive the event when other client send message to me? Why ?
Help.........
Great thank to those who help me.
|
|
|
|
|
I have a registry search launch condition in my deployment project that store the value that it retrieves in a property called DAVERSION.
The problem is that I need to use that property to get another value in the registry based on that value.
e.g. if DAVERSION = "1.0.3 (en-US)"
i need to go to
HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\1.0.3 (en-US)\Main
and get certain keys from it.
The problem is that apparently the regkey property cannot take in the DAVERSION property like so
HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\[DAVERSION]\Main
Is there a way to do this??
|
|
|
|
|
No.
Christian Graus - Microsoft MVP - C++
|
|
|
|